Documentation
¶
Index ¶
- Variables
- type Filter
- type GroupService
- type Invitation
- type OrganizationService
- type RelationService
- type Repository
- type Service
- func (s Service) Accept(ctx context.Context, id uuid.UUID) error
- func (s Service) Create(ctx context.Context, invitation Invitation) (Invitation, error)
- func (s Service) Delete(ctx context.Context, id uuid.UUID) error
- func (s Service) Get(ctx context.Context, id uuid.UUID) (Invitation, error)
- func (s Service) List(ctx context.Context, flt Filter) ([]Invitation, error)
- func (s Service) ListByUser(ctx context.Context, id string) ([]Invitation, error)
- type UserService
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("invitation not found")
)
Functions ¶
This section is empty.
Types ¶
type GroupService ¶
type Invitation ¶
type OrganizationService ¶
type OrganizationService interface { Get(ctx context.Context, id string) (organization.Organization, error) AddMember(ctx context.Context, orgID, relationName string, principal authenticate.Principal) error ListByUser(ctx context.Context, userID string) ([]organization.Organization, error) }
type RelationService ¶
type Repository ¶
type Repository interface { Set(ctx context.Context, invite Invitation) error List(ctx context.Context, flt Filter) ([]Invitation, error) ListByUser(ctx context.Context, id string) ([]Invitation, error) Get(ctx context.Context, id uuid.UUID) (Invitation, error) Delete(ctx context.Context, id uuid.UUID) error }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(dialer mailer.Dialer, repo Repository, orgSvc OrganizationService, grpSvc GroupService, userService UserService, relService RelationService) *Service
func (Service) Create ¶
func (s Service) Create(ctx context.Context, invitation Invitation) (Invitation, error)
func (Service) ListByUser ¶
Click to show internal directories.
Click to hide internal directories.