Documentation
¶
Index ¶
- type App
- type AppClient
- type ClerkHook
- func (c *ClerkHook) GetOrCreateOrgByAccountID(ctx context.Context, accountID string, userID pulid.ID, orgID *pulid.ID) (*Organization, error)
- func (c *ClerkHook) GetOrCreateUserByAccountID(ctx context.Context, accountID string, userID *pulid.ID, ...) (*User, error)
- func (c *ClerkHook) GetPersonalOrgByAccountID(ctx context.Context, accountID string, user *User, orgID *pulid.ID) (*Organization, error)
- func (c *ClerkHook) GetUserByAccountID(ctx context.Context, accountID string) (*User, error)
- func (c *ClerkHook) HandleHooks(ctx context.Context, w http.ResponseWriter, r *http.Request, ...) error
- type ClerkHookOption
- type CreateMembershipData
- type CreateOrgData
- type CreateUserData
- type OrgInputData
- type Organization
- type User
- type UserInputData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppClient ¶
type AppClient interface {
CreateMembership(ctx context.Context, data *CreateMembershipData) error
CreateOrganization(ctx context.Context, data *CreateOrgData) (*Organization, error)
CreateUser(ctx context.Context, data *CreateUserData) (*User, error)
DeleteMembership(ctx context.Context, orgID pulid.ID, userID pulid.ID) error
GetUser(ctx context.Context, userID pulid.ID) (*User, error)
GetUserByAccountID(ctx context.Context, accountID string) (*User, error)
GetOrgByAccountID(ctx context.Context, accountID string) (*Organization, error)
GetUserByAccountIDOrNil(ctx context.Context, accountID string) (*User, error)
GetOrgByAccountIDOrNil(ctx context.Context, accountID string) (*Organization, error)
MembershipExists(ctx context.Context, orgID pulid.ID, userID pulid.ID) (bool, error)
SetOrgDetails(ctx context.Context, orgID pulid.ID, data *OrgInputData) error
SetUserProfileDetails(ctx context.Context, userID pulid.ID, data *UserInputData) error
UpdateMembership(
ctx context.Context,
data *CreateMembershipData,
) error
}
type ClerkHook ¶
type ClerkHook struct {
// contains filtered or unexported fields
}
func (*ClerkHook) GetOrCreateOrgByAccountID ¶ added in v1.1.3
func (*ClerkHook) GetOrCreateUserByAccountID ¶ added in v1.1.3
func (*ClerkHook) GetPersonalOrgByAccountID ¶ added in v1.1.3
func (*ClerkHook) GetUserByAccountID ¶
func (*ClerkHook) HandleHooks ¶
func (c *ClerkHook) HandleHooks( ctx context.Context, w http.ResponseWriter, r *http.Request, opts ...ClerkHookOption, ) error
type ClerkHookOption ¶
type ClerkHookOption func(*clerkHookOptions)
func WithPersonalOrgs ¶
func WithPersonalOrgs(shouldCreatePersonalOrg bool) ClerkHookOption
type CreateMembershipData ¶
type CreateMembershipData struct {
OrgID pulid.ID
UserID pulid.ID
Role membershiprole.MembershipRole
}
type CreateOrgData ¶
type CreateUserData ¶
type OrgInputData ¶
type Organization ¶
Click to show internal directories.
Click to hide internal directories.