group

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(rg repository.Group, ug repository.User, logger *zap.Logger) *Service

func (*Service) AddMembers

func (s *Service) AddMembers(ctx context.Context, groupID uuid.UUID, userIDs []uuid.UUID) error

func (*Service) Count

func (s *Service) Count(ctx context.Context) (int64, error)

func (*Service) Create

func (s *Service) Create(ctx context.Context, initializers []*group.Update) (*group.Group, error)

func (*Service) Delete

func (s *Service) Delete(ctx context.Context, groupID uuid.UUID) error

func (*Service) Get

func (s *Service) Get(ctx context.Context, groupID uuid.UUID) (*group.Group, error)

func (*Service) GetByName

func (s *Service) GetByName(ctx context.Context, groupName string) (*group.Group, error)

func (*Service) List

func (s *Service) List(ctx context.Context, pagination *model.Pagination, search string) (iterator.Iterator[*group.Group], uint64, error)

func (*Service) ListGroupsForUser

func (s *Service) ListGroupsForUser(ctx context.Context, userID uuid.UUID, pagination *model.Pagination) (iterator.Iterator[*group.Group], uint64, error)

func (*Service) ListMembers

func (s *Service) ListMembers(ctx context.Context, groupID uuid.UUID, pagination *model.Pagination) (iterator.Iterator[*model.MemberEntry], uint64, error)

func (*Service) RemoveMember

func (s *Service) RemoveMember(ctx context.Context, groupID uuid.UUID, userID uuid.UUID) error

func (*Service) RemoveMemberFromAll

func (s *Service) RemoveMemberFromAll(ctx context.Context, userID uuid.UUID) error

func (*Service) Update

func (s *Service) Update(ctx context.Context, groupID uuid.UUID, us []*group.Update) error

Jump to

Keyboard shortcuts

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