Documentation
¶
Index ¶
- func UpdateCreatedUser(ctx context.Context, userID pulid.ID, AccountID string, isEmployee bool, ...) error
- 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
- type UserPublicMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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
SetUserSubscriptionPlan(
ctx context.Context,
userID pulid.ID,
plan string,
) error
}
type ClerkHook ¶
type ClerkHook struct {
// contains filtered or unexported fields
}
func NewClerkWebhook ¶
func NewClerkWebhook( appClient AppClient, wh *svix.Webhook, opts ...ClerkHookOption, ) *ClerkHook
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 ¶
type ClerkHookOption ¶
type ClerkHookOption func(*ClerkHook)
func WithEmployeeEmailDomain ¶ added in v1.1.6
func WithEmployeeEmailDomain(domain string) ClerkHookOption
func WithEmployeeEmails ¶ added in v1.1.6
func WithEmployeeEmails(emails []string) ClerkHookOption
func WithPersonalOrgs ¶
func WithPersonalOrgs() ClerkHookOption
type CreateMembershipData ¶
type CreateMembershipData struct {
OrgID pulid.ID
UserID pulid.ID
Role membershiprole.MembershipRole
}
type CreateOrgData ¶
type CreateUserData ¶
type OrgInputData ¶
type Organization ¶
type UserInputData ¶
type UserPublicMetadata ¶ added in v1.1.27
Click to show internal directories.
Click to hide internal directories.