group

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GroupApp

type GroupApp struct {
	Config    config.Config
	Logger    zerolog.Logger
	GroupPers domain.GroupPers
	UserPers  domain.UserPers
}

func NewGroupApp

func NewGroupApp(config config.Config, logger zerolog.Logger, groupPers domain.GroupPers, userPers domain.UserPers) *GroupApp

func (*GroupApp) AddMember

func (app *GroupApp) AddMember(groupId, userId string) error

AddMember adds a user to a group

func (*GroupApp) CreateGroup

func (app *GroupApp) CreateGroup(name, description, ownerId string, role domain.Role) (*domain.Group, error)

CreateGroup creates a new group

func (*GroupApp) DeleteGroup

func (app *GroupApp) DeleteGroup(groupId string) error

DeleteGroup deletes a group

func (*GroupApp) GetAllGroups

func (app *GroupApp) GetAllGroups(limit, offset int) ([]domain.Group, int64, error)

GetAllGroups retrieves all groups with pagination

func (*GroupApp) GetGroup

func (app *GroupApp) GetGroup(groupId string) (*domain.Group, error)

GetGroup retrieves a group by ID

func (*GroupApp) GetMembers

func (app *GroupApp) GetMembers(groupId string) ([]domain.User, error)

GetMembers retrieves all members of a group

func (*GroupApp) RemoveMember

func (app *GroupApp) RemoveMember(groupId, userId string) error

RemoveMember removes a user from a group

func (*GroupApp) UpdateGroup

func (app *GroupApp) UpdateGroup(groupId, name, description string, role domain.Role) error

UpdateGroup updates a group's name, description, or role

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL