2020-04-11 19:40:26 +00:00
|
|
|
package logic
|
|
|
|
|
2020-04-18 19:00:31 +00:00
|
|
|
import (
|
|
|
|
"git.dragon-labs.de/alphyron/group_helper/models"
|
|
|
|
)
|
2020-04-11 19:40:26 +00:00
|
|
|
|
|
|
|
type GroupHelperService interface {
|
|
|
|
CreateGroup(*models.Group) (*models.Group, error)
|
|
|
|
UpdateGroup(*models.Group) (*models.Group, error)
|
|
|
|
|
|
|
|
GetGroupByID(int64) (*models.Group, error)
|
2021-03-13 23:22:49 +00:00
|
|
|
GetGroupByDBID(uint64) (*models.Group, error)
|
2020-04-11 20:27:56 +00:00
|
|
|
GetGroupDatabaseSize(*models.Group) (int, error)
|
2020-04-11 19:40:26 +00:00
|
|
|
|
|
|
|
CreateUser(*models.User) (*models.User, error)
|
2020-04-11 20:27:56 +00:00
|
|
|
GetUserByID(int64) (*models.User, error)
|
2020-04-11 19:40:26 +00:00
|
|
|
|
|
|
|
UserJoinGroup(*models.User, *models.Group) (bool, error)
|
|
|
|
UserLeaveGroup(*models.User, *models.Group) (bool, error)
|
|
|
|
IsUserInGroup(*models.User, *models.Group) (bool, error)
|
|
|
|
|
|
|
|
ListGroups() ([]*models.Group, error)
|
2020-06-13 19:20:04 +00:00
|
|
|
ListGroupUsers(*models.Group) ([]*models.User, error)
|
2020-04-11 19:40:26 +00:00
|
|
|
ListUsers() ([]*models.User, error)
|
|
|
|
}
|