Adding groups to storage and cleaning up storage a bit
Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
This commit is contained in:
parent
67a62afb98
commit
f78f26bda5
9
backend/internal/storage/groups.go
Normal file
9
backend/internal/storage/groups.go
Normal file
@ -0,0 +1,9 @@
|
||||
package storage
|
||||
|
||||
type Group struct {
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Users []int64 `json:"users"`
|
||||
Owner int64 `json:"owner"`
|
||||
Moderators []int64 `json:"moderators"`
|
||||
}
|
||||
@ -1 +0,0 @@
|
||||
package storage
|
||||
@ -9,13 +9,12 @@ type Storage struct {
|
||||
Receipts interface {
|
||||
GetByID(context.Context, int64) (*Receipt, error)
|
||||
}
|
||||
Users interface {
|
||||
AddUser(user string, password string) error
|
||||
RemoveUser(user string, password string) error
|
||||
UpdateUserPass(user string, oldPassword string, newPass string) error
|
||||
}
|
||||
Images interface {
|
||||
GetByID(context.Context, int64) (*Image, error)
|
||||
RemoveByID(context.Context, int64) (*Image, error)
|
||||
}
|
||||
Groups interface {
|
||||
GetByID(context.Context, int64)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user