Adding groups to storage and cleaning up storage a bit

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
This commit is contained in:
Ethan Wellenreiter 2025-05-01 23:05:49 -04:00
parent 67a62afb98
commit f78f26bda5
3 changed files with 13 additions and 6 deletions

View 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"`
}

View File

@ -1 +0,0 @@
package storage

View File

@ -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)
}
}