Documentation
¶
Index ¶
- type AcceptOrganizationInvitationQuery
- type AcceptOrganizationInvitationRequest
- type AddOrganizationMemberRequest
- type AddOrganizationTeamMemberRequest
- type CreateOrganizationInvitationRequest
- type CreateOrganizationRequest
- type CreateOrganizationTeamRequest
- type DeleteOrganizationMemberResponse
- type DeleteOrganizationResponse
- type DeleteOrganizationTeamMemberResponse
- type DeleteOrganizationTeamResponse
- type InvitationID
- type ListOrganizationMembersRequest
- type ListOrganizationTeamMembersRequest
- type MemberID
- type Organization
- type OrganizationID
- type OrganizationInvitation
- type OrganizationInvitationContext
- type OrganizationInvitationServiceHooksConfig
- type OrganizationInvitationStatus
- type OrganizationMember
- type OrganizationMemberServiceHooksConfig
- type OrganizationServiceHooksConfig
- type OrganizationTeam
- type OrganizationTeamMember
- type OrganizationTeamMemberServiceHooksConfig
- type OrganizationTeamServiceHooksConfig
- type OrganizationsPluginConfig
- type OrganizationsServiceHooksConfig
- type SendOrganizationInvitationEmailParams
- type TeamID
- type TeamMemberID
- type UpdateOrganizationMemberRequest
- type UpdateOrganizationRequest
- type UpdateOrganizationTeamRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcceptOrganizationInvitationQuery ¶ added in v1.16.0
type AcceptOrganizationInvitationRequest ¶
type AcceptOrganizationInvitationRequest struct {
RedirectURL *string `json:"redirect_url,omitempty" nullable:"true"`
}
func (*AcceptOrganizationInvitationRequest) Validate ¶ added in v1.5.0
func (r *AcceptOrganizationInvitationRequest) Validate() error
type AddOrganizationMemberRequest ¶
type AddOrganizationMemberRequest struct {
UserID string `json:"user_id" required:"true" nullable:"false"`
Role string `json:"role" required:"true" nullable:"false"`
}
func (*AddOrganizationMemberRequest) Validate ¶ added in v1.5.0
func (r *AddOrganizationMemberRequest) Validate() error
type AddOrganizationTeamMemberRequest ¶
type AddOrganizationTeamMemberRequest struct {
MemberID string `json:"member_id" required:"true" nullable:"false"`
}
func (*AddOrganizationTeamMemberRequest) Validate ¶ added in v1.5.0
func (r *AddOrganizationTeamMemberRequest) Validate() error
type CreateOrganizationInvitationRequest ¶
type CreateOrganizationInvitationRequest struct {
Email string `json:"email" required:"true" nullable:"false"`
Role string `json:"role" required:"true" nullable:"false"`
RedirectURL string `json:"redirect_url,omitempty" nullable:"true"`
}
func (*CreateOrganizationInvitationRequest) Validate ¶ added in v1.5.0
func (r *CreateOrganizationInvitationRequest) Validate() error
type CreateOrganizationRequest ¶
type CreateOrganizationRequest struct {
Name string `json:"name" required:"true" nullable:"false"`
Role string `json:"role" required:"true" nullable:"false"`
Slug *string `json:"slug,omitempty" nullable:"true"`
Logo *string `json:"logo,omitempty" nullable:"true"`
Metadata map[string]any `json:"metadata,omitempty" nullable:"true"`
}
func (*CreateOrganizationRequest) Validate ¶ added in v1.5.0
func (r *CreateOrganizationRequest) Validate() error
type CreateOrganizationTeamRequest ¶
type CreateOrganizationTeamRequest struct {
Name string `json:"name" required:"true" nullable:"false"`
Slug *string `json:"slug,omitempty" nullable:"true"`
Description *string `json:"description,omitempty" nullable:"true"`
Metadata map[string]any `json:"metadata,omitempty" nullable:"true"`
}
func (*CreateOrganizationTeamRequest) Validate ¶ added in v1.5.0
func (r *CreateOrganizationTeamRequest) Validate() error
type DeleteOrganizationMemberResponse ¶
type DeleteOrganizationMemberResponse struct {
Message string `json:"message" required:"true" nullable:"false"`
}
type DeleteOrganizationResponse ¶
type DeleteOrganizationResponse struct {
Message string `json:"message" required:"true" nullable:"false"`
}
type DeleteOrganizationTeamMemberResponse ¶
type DeleteOrganizationTeamMemberResponse struct {
Message string `json:"message" required:"true" nullable:"false"`
}
type DeleteOrganizationTeamResponse ¶
type DeleteOrganizationTeamResponse struct {
Message string `json:"message" required:"true" nullable:"false"`
}
type InvitationID ¶ added in v1.16.0
type ListOrganizationMembersRequest ¶ added in v1.16.0
type ListOrganizationTeamMembersRequest ¶ added in v1.16.0
type Organization ¶
type Organization struct {
bun.BaseModel `bun:"table:organizations"`
ID string `json:"id" required:"true" nullable:"false" bun:"column:id,pk"`
OwnerID string `json:"owner_id" required:"true" nullable:"false" bun:"column:owner_id"`
Name string `json:"name" required:"true" nullable:"false" bun:"column:name"`
Slug string `json:"slug" required:"true" nullable:"false" bun:"column:slug"`
Logo *string `json:"logo" nullable:"true" bun:"column:logo"`
Metadata map[string]any `json:"metadata" nullable:"true" bun:"column:metadata"`
CreatedAt time.Time `json:"created_at" required:"true" nullable:"false" bun:"column:created_at,default:current_timestamp"`
UpdatedAt time.Time `json:"updated_at" required:"true" nullable:"false" bun:"column:updated_at,default:current_timestamp"`
}
type OrganizationID ¶ added in v1.16.0
type OrganizationID struct {
OrganizationID string `path:"organization_id"`
}
type OrganizationInvitation ¶
type OrganizationInvitation struct {
bun.BaseModel `bun:"table:organization_invitations"`
ID string `json:"id" required:"true" nullable:"false" bun:"column:id,pk"`
Email string `json:"email" required:"true" nullable:"false" bun:"column:email"`
InviterID string `json:"inviter_id" required:"true" nullable:"false" bun:"column:inviter_id"`
OrganizationID string `json:"organization_id" required:"true" nullable:"false" bun:"column:organization_id"`
Role string `json:"role" required:"true" nullable:"false" bun:"column:role"`
Status OrganizationInvitationStatus `json:"status" required:"true" nullable:"false" bun:"column:status"`
ExpiresAt time.Time `json:"expires_at" required:"true" nullable:"false" bun:"column:expires_at"`
CreatedAt time.Time `json:"created_at" required:"true" nullable:"false" bun:"column:created_at,default:current_timestamp"`
}
type OrganizationInvitationContext ¶ added in v1.15.0
type OrganizationInvitationServiceHooksConfig ¶ added in v1.18.0
type OrganizationInvitationServiceHooksConfig struct {
BeforeCreate func(ctx context.Context, actor *models.Actor, invitation *OrganizationInvitation) error
AfterCreate func(ctx context.Context, actor *models.Actor, invitation *OrganizationInvitation) error
BeforeUpdate func(ctx context.Context, actor *models.Actor, invitation *OrganizationInvitation) error
AfterUpdate func(ctx context.Context, actor *models.Actor, invitation *OrganizationInvitation) error
}
type OrganizationInvitationStatus ¶
type OrganizationInvitationStatus string
const ( OrganizationInvitationStatusPending OrganizationInvitationStatus = "pending" OrganizationInvitationStatusAccepted OrganizationInvitationStatus = "accepted" OrganizationInvitationStatusRejected OrganizationInvitationStatus = "rejected" OrganizationInvitationStatusRevoked OrganizationInvitationStatus = "revoked" OrganizationInvitationStatusExpired OrganizationInvitationStatus = "expired" )
func (OrganizationInvitationStatus) PrepareJSONSchema ¶ added in v1.16.0
func (OrganizationInvitationStatus) PrepareJSONSchema(schema *jsonschema.Schema) error
type OrganizationMember ¶
type OrganizationMember struct {
bun.BaseModel `bun:"table:organization_members"`
ID string `json:"id" required:"true" nullable:"false" bun:"column:id,pk"`
OrganizationID string `json:"organization_id" required:"true" nullable:"false" bun:"column:organization_id"`
UserID string `json:"user_id" required:"true" nullable:"false" bun:"column:user_id"`
Role string `json:"role" required:"true" nullable:"false" bun:"column:role"`
CreatedAt time.Time `json:"created_at" required:"true" nullable:"false" bun:"column:created_at,default:current_timestamp"`
UpdatedAt time.Time `json:"updated_at" required:"true" nullable:"false" bun:"column:updated_at,default:current_timestamp"`
}
type OrganizationMemberServiceHooksConfig ¶ added in v1.18.0
type OrganizationMemberServiceHooksConfig struct {
BeforeCreate func(ctx context.Context, actor *models.Actor, member *OrganizationMember) error
AfterCreate func(ctx context.Context, actor *models.Actor, member *OrganizationMember) error
BeforeUpdate func(ctx context.Context, actor *models.Actor, member *OrganizationMember) error
AfterUpdate func(ctx context.Context, actor *models.Actor, member *OrganizationMember) error
BeforeDelete func(ctx context.Context, actor *models.Actor, member *OrganizationMember) error
AfterDelete func(ctx context.Context, actor *models.Actor, member *OrganizationMember) error
}
type OrganizationServiceHooksConfig ¶ added in v1.18.0
type OrganizationServiceHooksConfig struct {
BeforeCreate func(ctx context.Context, actor *models.Actor, organization *Organization) error
AfterCreate func(ctx context.Context, actor *models.Actor, organization *Organization) error
BeforeUpdate func(ctx context.Context, actor *models.Actor, organization *Organization) error
AfterUpdate func(ctx context.Context, actor *models.Actor, organization *Organization) error
BeforeDelete func(ctx context.Context, actor *models.Actor, organization *Organization) error
AfterDelete func(ctx context.Context, actor *models.Actor, organization *Organization) error
}
type OrganizationTeam ¶
type OrganizationTeam struct {
bun.BaseModel `bun:"table:organization_teams"`
ID string `json:"id" required:"true" nullable:"false" bun:"column:id,pk"`
OrganizationID string `json:"organization_id" required:"true" nullable:"false" bun:"column:organization_id"`
Name string `json:"name" required:"true" nullable:"false" bun:"column:name"`
Slug string `json:"slug" required:"true" nullable:"false" bun:"column:slug"`
Description *string `json:"description" nullable:"true" bun:"column:description"`
Metadata map[string]any `json:"metadata" nullable:"true" bun:"column:metadata"`
CreatedAt time.Time `json:"created_at" required:"true" nullable:"false" bun:"column:created_at,default:current_timestamp"`
UpdatedAt time.Time `json:"updated_at" required:"true" nullable:"false" bun:"column:updated_at,default:current_timestamp"`
}
type OrganizationTeamMember ¶
type OrganizationTeamMember struct {
bun.BaseModel `bun:"table:organization_team_members"`
ID string `json:"id" required:"true" nullable:"false" bun:"column:id,pk"`
TeamID string `json:"team_id" required:"true" nullable:"false" bun:"column:team_id"`
MemberID string `json:"member_id" required:"true" nullable:"false" bun:"column:member_id"`
CreatedAt time.Time `json:"created_at" required:"true" nullable:"false" bun:"column:created_at,default:current_timestamp"`
}
type OrganizationTeamMemberServiceHooksConfig ¶ added in v1.18.0
type OrganizationTeamMemberServiceHooksConfig struct {
BeforeCreate func(ctx context.Context, actor *models.Actor, member *OrganizationTeamMember) error
AfterCreate func(ctx context.Context, actor *models.Actor, member *OrganizationTeamMember) error
BeforeDelete func(ctx context.Context, actor *models.Actor, member *OrganizationTeamMember) error
AfterDelete func(ctx context.Context, actor *models.Actor, member *OrganizationTeamMember) error
}
type OrganizationTeamServiceHooksConfig ¶ added in v1.18.0
type OrganizationTeamServiceHooksConfig struct {
BeforeCreate func(ctx context.Context, actor *models.Actor, team *OrganizationTeam) error
AfterCreate func(ctx context.Context, actor *models.Actor, team *OrganizationTeam) error
BeforeUpdate func(ctx context.Context, actor *models.Actor, team *OrganizationTeam) error
AfterUpdate func(ctx context.Context, actor *models.Actor, team *OrganizationTeam) error
BeforeDelete func(ctx context.Context, actor *models.Actor, team *OrganizationTeam) error
AfterDelete func(ctx context.Context, actor *models.Actor, team *OrganizationTeam) error
}
type OrganizationsPluginConfig ¶
type OrganizationsPluginConfig struct {
Enabled bool `json:"enabled" toml:"enabled"`
OrganizationsLimit *int `json:"organizations_limit" toml:"organizations_limit"`
MembersLimit *int `json:"members_limit" toml:"members_limit"`
InvitationsLimit *int `json:"invitations_limit" toml:"invitations_limit"`
InvitationExpiresIn time.Duration `json:"invitation_expires_in" toml:"invitation_expires_in"`
RequireEmailVerifiedOnInvitation bool `json:"require_email_verified_on_invitation" toml:"require_email_verified_on_invitation"`
ServiceHooks *OrganizationsServiceHooksConfig `json:"-" toml:"-"`
SendOrganizationInvitationEmail func(params SendOrganizationInvitationEmailParams, reqCtx *models.RequestContext) error `json:"-" toml:"-"`
}
func (*OrganizationsPluginConfig) ApplyDefaults ¶
func (config *OrganizationsPluginConfig) ApplyDefaults()
type OrganizationsServiceHooksConfig ¶ added in v1.18.0
type OrganizationsServiceHooksConfig struct {
Organizations *OrganizationServiceHooksConfig
Members *OrganizationMemberServiceHooksConfig
Invitations *OrganizationInvitationServiceHooksConfig
Teams *OrganizationTeamServiceHooksConfig
TeamMembers *OrganizationTeamMemberServiceHooksConfig
}
type SendOrganizationInvitationEmailParams ¶ added in v1.5.0
type SendOrganizationInvitationEmailParams struct {
Organization *Organization
Invitation *OrganizationInvitation
Inviter *models.User
AcceptURL string
}
type TeamMemberID ¶ added in v1.16.0
type UpdateOrganizationMemberRequest ¶
type UpdateOrganizationMemberRequest struct {
Role string `json:"role" required:"true" nullable:"false"`
}
func (*UpdateOrganizationMemberRequest) Validate ¶ added in v1.5.0
func (r *UpdateOrganizationMemberRequest) Validate() error
type UpdateOrganizationRequest ¶
type UpdateOrganizationRequest struct {
Name *string `json:"name,omitempty" nullable:"true"`
Slug *string `json:"slug,omitempty" nullable:"true"`
Logo *string `json:"logo,omitempty" nullable:"true"`
Metadata map[string]any `json:"metadata,omitempty" nullable:"true"`
}
func (*UpdateOrganizationRequest) Validate ¶ added in v1.5.0
func (r *UpdateOrganizationRequest) Validate() error
type UpdateOrganizationTeamRequest ¶
type UpdateOrganizationTeamRequest struct {
Name string `json:"name" required:"true" nullable:"false"`
Slug *string `json:"slug,omitempty" nullable:"true"`
Description *string `json:"description,omitempty" nullable:"true"`
Metadata map[string]any `json:"metadata,omitempty" nullable:"true"`
}
func (*UpdateOrganizationTeamRequest) Validate ¶ added in v1.5.0
func (r *UpdateOrganizationTeamRequest) Validate() error
Click to show internal directories.
Click to hide internal directories.