Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- type Filter
- type GroupService
- type Invitation
- type MailTemplateConfig
- type OrganizationService
- type PolicyService
- type PreferencesService
- 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 ¶
View Source
const (
DefaultExpiryDuration = 24 * time.Hour * 7
)
Variables ¶
View Source
var (
ErrNotFound = errors.New("invitation not found")
)
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.7.4
type Config struct { // WithRoles if set to true will allow roles to be passed in invitation, when the user accepts the // invite, the role will be assigned to the user WithRoles bool `yaml:"with_roles" mapstructure:"with_roles" default:"false"` MailTemplate MailTemplateConfig `yaml:"mail_template" mapstructure:"mail_template"` }
type GroupService ¶
type Invitation ¶
type MailTemplateConfig ¶ added in v0.7.4
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, f organization.Filter) ([]organization.Organization, error) }
type PolicyService ¶ added in v0.7.3
type PreferencesService ¶ added in v0.7.13
type RelationService ¶
type Repository ¶
type Repository interface { Set(ctx context.Context, invite Invitation) (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, policyService PolicyService, prefService PreferencesService) *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.