Documentation
¶
Index ¶
- type AddMemberRequest
- type CreateInvitationRequest
- type CreateOrgRequest
- type CreateSSORequest
- type Handler
- func (h *Handler) AddMember(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreateInvitation(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreateOrg(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreateSSO(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DeleteOrg(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DeleteSSO(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetOrg(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetSSO(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ListInvitations(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ListMembers(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ListOrgs(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ListSSO(w http.ResponseWriter, r *http.Request)
- func (h *Handler) RemoveMember(w http.ResponseWriter, r *http.Request)
- func (h *Handler) RevokeInvitation(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Routes() chi.Router
- func (h *Handler) UpdateMemberRole(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UpdateOrg(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UpdateSSO(w http.ResponseWriter, r *http.Request)
- type Invitation
- type Member
- type Org
- type SSOConnection
- type Service
- func (s *Service) AcceptInvitation(ctx context.Context, token, userID string) error
- func (s *Service) AddMember(ctx context.Context, orgID string, req AddMemberRequest) (*Member, error)
- func (s *Service) CreateInvitation(ctx context.Context, orgID, inviterID string, req CreateInvitationRequest) (*Invitation, error)
- func (s *Service) CreateOrg(ctx context.Context, req CreateOrgRequest) (*Org, error)
- func (s *Service) CreateSSO(ctx context.Context, orgID string, req CreateSSORequest) (*SSOConnection, error)
- func (s *Service) DeleteOrg(ctx context.Context, id string) error
- func (s *Service) DeleteSSO(ctx context.Context, id string) error
- func (s *Service) GetOrg(ctx context.Context, id string) (*Org, error)
- func (s *Service) GetSSO(ctx context.Context, id string) (*SSOConnection, error)
- func (s *Service) ListInvitations(ctx context.Context, orgID string) ([]Invitation, error)
- func (s *Service) ListMembers(ctx context.Context, orgID string, limit, offset int) ([]Member, int64, error)
- func (s *Service) ListOrgs(ctx context.Context, limit, offset int) ([]Org, int64, error)
- func (s *Service) ListSSO(ctx context.Context, orgID string) ([]SSOConnection, error)
- func (s *Service) RemoveMember(ctx context.Context, orgID, userID string) error
- func (s *Service) RevokeInvitation(ctx context.Context, inviteID string) error
- func (s *Service) UpdateMemberRole(ctx context.Context, orgID, userID, role string) error
- func (s *Service) UpdateOrg(ctx context.Context, id string, req UpdateOrgRequest) (*Org, error)
- func (s *Service) UpdateSSO(ctx context.Context, id string, req UpdateSSORequest) (*SSOConnection, error)
- type UpdateMemberRequest
- type UpdateOrgRequest
- type UpdateSSORequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddMemberRequest ¶
type CreateInvitationRequest ¶
type CreateOrgRequest ¶
type CreateSSORequest ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) CreateInvitation ¶
func (h *Handler) CreateInvitation(w http.ResponseWriter, r *http.Request)
func (*Handler) ListInvitations ¶
func (h *Handler) ListInvitations(w http.ResponseWriter, r *http.Request)
func (*Handler) ListMembers ¶
func (h *Handler) ListMembers(w http.ResponseWriter, r *http.Request)
func (*Handler) RemoveMember ¶
func (h *Handler) RemoveMember(w http.ResponseWriter, r *http.Request)
func (*Handler) RevokeInvitation ¶
func (h *Handler) RevokeInvitation(w http.ResponseWriter, r *http.Request)
func (*Handler) UpdateMemberRole ¶
func (h *Handler) UpdateMemberRole(w http.ResponseWriter, r *http.Request)
type Invitation ¶
type Invitation struct {
ID string `json:"id"`
OrgID string `json:"org_id"`
Email string `json:"email"`
Role string `json:"role"`
Token string `json:"token,omitempty"`
Status string `json:"status"`
InviterID string `json:"inviter_id"`
CreatedAt time.Time `json:"created_at"`
ExpiresAt time.Time `json:"expires_at"`
}
type Member ¶
type Member struct {
ID string `json:"id"`
OrgID string `json:"org_id"`
UserID string `json:"user_id"`
Role string `json:"role"`
Email string `json:"email,omitempty"`
DisplayName string `json:"display_name,omitempty"`
AvatarURL string `json:"avatar_url,omitempty"`
UserStatus string `json:"user_status,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
type SSOConnection ¶
type SSOConnection struct {
ID string `json:"id"`
OrgID string `json:"org_id"`
Provider string `json:"provider"`
Config map[string]interface{} `json:"config"`
Domain string `json:"domain"`
Enabled bool `json:"enabled"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) AcceptInvitation ¶
AcceptInvitation accepts an invitation by token and adds the user to the org.
func (*Service) CreateInvitation ¶
func (s *Service) CreateInvitation(ctx context.Context, orgID, inviterID string, req CreateInvitationRequest) (*Invitation, error)
func (*Service) CreateSSO ¶
func (s *Service) CreateSSO(ctx context.Context, orgID string, req CreateSSORequest) (*SSOConnection, error)
func (*Service) ListInvitations ¶
func (*Service) ListMembers ¶
func (*Service) RemoveMember ¶
func (*Service) RevokeInvitation ¶
func (*Service) UpdateMemberRole ¶
func (*Service) UpdateSSO ¶
func (s *Service) UpdateSSO(ctx context.Context, id string, req UpdateSSORequest) (*SSOConnection, error)
type UpdateMemberRequest ¶
type UpdateMemberRequest struct {
Role string `json:"role" validate:"required"`
}
type UpdateOrgRequest ¶
Click to show internal directories.
Click to hide internal directories.