Versions in this module Expand all Collapse all v0 v0.16.0 Dec 11, 2024 Changes in this version + func CheckRelation(relation string) error + type Invitation struct + ConfirmedAt time.Time + CreatedAt time.Time + DomainID string + InvitedBy string + RejectedAt time.Time + Relation string + Resend bool + Token string + UpdatedAt time.Time + UserID string + type InvitationPage struct + Invitations []Invitation + Limit uint64 + Offset uint64 + Total uint64 + func (page InvitationPage) MarshalJSON() ([]byte, error) + type Page struct + DomainID string + InvitedBy string + InvitedByOrUserID string + Limit uint64 + Offset uint64 + Relation string + State State + UserID string + type Repository interface + Create func(ctx context.Context, invitation Invitation) (err error) + Delete func(ctx context.Context, userID, domainID string) (err error) + Retrieve func(ctx context.Context, userID, domainID string) (Invitation, error) + RetrieveAll func(ctx context.Context, page Page) (invitations InvitationPage, err error) + UpdateConfirmation func(ctx context.Context, invitation Invitation) (err error) + UpdateRejection func(ctx context.Context, invitation Invitation) (err error) + UpdateToken func(ctx context.Context, invitation Invitation) (err error) + type Service interface + AcceptInvitation func(ctx context.Context, session authn.Session, domainID string) (err error) + DeleteInvitation func(ctx context.Context, session authn.Session, userID, domainID string) (err error) + ListInvitations func(ctx context.Context, session authn.Session, page Page) (invitations InvitationPage, err error) + RejectInvitation func(ctx context.Context, session authn.Session, domainID string) (err error) + SendInvitation func(ctx context.Context, session authn.Session, invitation Invitation) (err error) + ViewInvitation func(ctx context.Context, session authn.Session, userID, domainID string) (invitation Invitation, err error) + func NewService(token grpcTokenV1.TokenServiceClient, repo Repository, sdk mgsdk.SDK) Service + type State uint8 + const Accepted + const All + const Pending + const Rejected + func ToState(status string) (State, error) + func (s *State) UnmarshalJSON(data []byte) error + func (s State) MarshalJSON() ([]byte, error) + func (s State) String() string