Documentation ¶
Index ¶
- func CreatePostgresConnPool(url string) *pgxpool.Pool
- type GroupService
- type GroupUserService
- func (s *GroupUserService) AddUserToGroup(c context.Context, GroupID uuid.UUID, UserID uuid.UUID) error
- func (s *GroupUserService) GetGroupUsers(c context.Context, GroupID uuid.UUID) ([]*bbrecs.User, error)
- func (s *GroupUserService) RemoveUserFromGroup(c context.Context, GroupID uuid.UUID, UserID uuid.UUID) error
- type UserService
- func (us *UserService) CreateUser(c context.Context, user *bbrecs.User) (*bbrecs.User, error)
- func (us *UserService) GetUserGroups(c context.Context, userID uuid.UUID) ([]bbrecs.Group, error)
- func (us *UserService) GetUsers(c context.Context) ([]*bbrecs.User, error)
- func (us *UserService) UpdateUser(c context.Context, userID uuid.UUID, fields bbrecs.UserUpdateFields) (*bbrecs.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePostgresConnPool ¶
Types ¶
type GroupService ¶
type GroupService struct {
// contains filtered or unexported fields
}
func NewGroupService ¶
func NewGroupService(dbpool *pgxpool.Pool) *GroupService
func (*GroupService) CreateGroup ¶
type GroupUserService ¶
type GroupUserService struct {
// contains filtered or unexported fields
}
func NewGroupUserService ¶
func NewGroupUserService(dbpool *pgxpool.Pool) *GroupUserService
func (*GroupUserService) AddUserToGroup ¶
func (*GroupUserService) GetGroupUsers ¶
func (*GroupUserService) RemoveUserFromGroup ¶
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(dbpool *pgxpool.Pool) *UserService
func (*UserService) CreateUser ¶
func (*UserService) GetUserGroups ¶
func (*UserService) UpdateUser ¶
func (us *UserService) UpdateUser(c context.Context, userID uuid.UUID, fields bbrecs.UserUpdateFields) (*bbrecs.User, error)
TODO: pass struct with nil values so they don't get updated? Or always expect to override all columns with new values even if they are not changing
Click to show internal directories.
Click to hide internal directories.