Documentation ¶
Overview ¶
Code generated by "gen"; DO NOT EDIT. This file is meant to be re-generated in place and/or deleted at any time.
Package user provides the Users API.
Index ¶
- func Ban(ctx context.Context, id string) (*clerk.User, error)
- func Create(ctx context.Context, params *CreateParams) (*clerk.User, error)
- func Delete(ctx context.Context, id string) (*clerk.DeletedResource, error)
- func Get(ctx context.Context, id string) (*clerk.User, error)
- func List(ctx context.Context, params *ListParams) (*clerk.UserList, error)
- func ListOAuthAccessTokens(ctx context.Context, params *ListOAuthAccessTokensParams) (*clerk.OAuthAccessTokenList, error)
- func ListOrganizationMemberships(ctx context.Context, params *ListOrganizationMembershipsParams) (*clerk.OrganizationMembershipList, error)
- func Lock(ctx context.Context, id string) (*clerk.User, error)
- func Unban(ctx context.Context, id string) (*clerk.User, error)
- func Unlock(ctx context.Context, id string) (*clerk.User, error)
- func Update(ctx context.Context, id string, params *UpdateParams) (*clerk.User, error)
- func UpdateMetadata(ctx context.Context, id string, params *UpdateMetadataParams) (*clerk.User, error)
- type Client
- func (c *Client) Ban(ctx context.Context, id string) (*clerk.User, error)
- func (c *Client) Count(ctx context.Context, params *ListParams) (*TotalCount, error)
- func (c *Client) Create(ctx context.Context, params *CreateParams) (*clerk.User, error)
- func (c *Client) Delete(ctx context.Context, id string) (*clerk.DeletedResource, error)
- func (c *Client) DeleteMFA(ctx context.Context, params *DeleteMFAParams) (*MultifactorAuthentication, error)
- func (c *Client) Get(ctx context.Context, id string) (*clerk.User, error)
- func (c *Client) List(ctx context.Context, params *ListParams) (*clerk.UserList, error)
- func (c *Client) ListOAuthAccessTokens(ctx context.Context, params *ListOAuthAccessTokensParams) (*clerk.OAuthAccessTokenList, error)
- func (c *Client) ListOrganizationMemberships(ctx context.Context, params *ListOrganizationMembershipsParams) (*clerk.OrganizationMembershipList, error)
- func (c *Client) Lock(ctx context.Context, id string) (*clerk.User, error)
- func (c *Client) Unban(ctx context.Context, id string) (*clerk.User, error)
- func (c *Client) Unlock(ctx context.Context, id string) (*clerk.User, error)
- func (c *Client) Update(ctx context.Context, id string, params *UpdateParams) (*clerk.User, error)
- func (c *Client) UpdateMetadata(ctx context.Context, id string, params *UpdateMetadataParams) (*clerk.User, error)
- type CreateParams
- type DeleteMFAParams
- type ListOAuthAccessTokensParams
- type ListOrganizationMembershipsParams
- type ListParams
- type MultifactorAuthentication
- type TotalCount
- type UpdateMetadataParams
- type UpdateParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(ctx context.Context, params *CreateParams) (*clerk.User, error)
Create creates a new user.
func List ¶
func List(ctx context.Context, params *ListParams) (*clerk.UserList, error)
List returns a list of users.
func ListOAuthAccessTokens ¶
func ListOAuthAccessTokens(ctx context.Context, params *ListOAuthAccessTokensParams) (*clerk.OAuthAccessTokenList, error)
ListOAuthAccessTokens retrieves a list of the user's access tokens for a specific OAuth provider.
func ListOrganizationMemberships ¶
func ListOrganizationMemberships(ctx context.Context, params *ListOrganizationMembershipsParams) (*clerk.OrganizationMembershipList, error)
ListOrganizationMemberships lists all the user's organization memberships.
func Update ¶
func Update(ctx context.Context, id string, params *UpdateParams) (*clerk.User, error)
Update updates a user.
func UpdateMetadata ¶
func UpdateMetadata(ctx context.Context, id string, params *UpdateMetadataParams) (*clerk.User, error)
UpdateMetadata updates the user's metadata by merging the provided values with the existing ones.
Types ¶
type Client ¶
type Client struct {
Backend clerk.Backend
}
Client is used to invoke the Users API.
func (*Client) Count ¶
func (c *Client) Count(ctx context.Context, params *ListParams) (*TotalCount, error)
Count returns the total count of users satisfying the parameters.
func (*Client) Create ¶
func (c *Client) Create(ctx context.Context, params *CreateParams) (*clerk.User, error)
Create creates a new user.
func (*Client) DeleteMFA ¶
func (c *Client) DeleteMFA(ctx context.Context, params *DeleteMFAParams) (*MultifactorAuthentication, error)
DeleteMFA disables a user's multi-factor authentication methods.
func (*Client) List ¶
func (c *Client) List(ctx context.Context, params *ListParams) (*clerk.UserList, error)
List returns a list of users.
func (*Client) ListOAuthAccessTokens ¶
func (c *Client) ListOAuthAccessTokens(ctx context.Context, params *ListOAuthAccessTokensParams) (*clerk.OAuthAccessTokenList, error)
ListOAuthAccessTokens retrieves a list of the user's access tokens for a specific OAuth provider.
func (*Client) ListOrganizationMemberships ¶
func (c *Client) ListOrganizationMemberships(ctx context.Context, params *ListOrganizationMembershipsParams) (*clerk.OrganizationMembershipList, error)
ListOrganizationMemberships lists all the user's organization memberships.
func (*Client) UpdateMetadata ¶
func (c *Client) UpdateMetadata(ctx context.Context, id string, params *UpdateMetadataParams) (*clerk.User, error)
UpdateMetadata updates the user's metadata by merging the provided values with the existing ones.
type CreateParams ¶
type CreateParams struct { clerk.APIParams EmailAddresses *[]string `json:"email_address,omitempty"` PhoneNumbers *[]string `json:"phone_number,omitempty"` Web3Wallets *[]string `json:"web3_wallet,omitempty"` Username *string `json:"username,omitempty"` Password *string `json:"password,omitempty"` FirstName *string `json:"first_name,omitempty"` LastName *string `json:"last_name,omitempty"` ExternalID *string `json:"external_id,omitempty"` UnsafeMetadata *json.RawMessage `json:"unsafe_metadata,omitempty"` PublicMetadata *json.RawMessage `json:"public_metadata,omitempty"` PrivateMetadata *json.RawMessage `json:"private_metadata,omitempty"` PasswordDigest *string `json:"password_digest,omitempty"` PasswordHasher *string `json:"password_hasher,omitempty"` SkipPasswordRequirement *bool `json:"skip_password_requirement,omitempty"` SkipPasswordChecks *bool `json:"skip_password_checks,omitempty"` TOTPSecret *string `json:"totp_secret,omitempty"` BackupCodes *[]string `json:"backup_codes,omitempty"` // Specified in RFC3339 format CreatedAt *string `json:"created_at,omitempty"` }
type DeleteMFAParams ¶
type DeleteMFAParams struct { clerk.APIParams ID string `json:"-"` }
type ListOrganizationMembershipsParams ¶
type ListOrganizationMembershipsParams struct { clerk.APIParams clerk.ListParams ID string `json:"-"` }
func (*ListOrganizationMembershipsParams) ToQuery ¶
func (params *ListOrganizationMembershipsParams) ToQuery() url.Values
ToQuery returns url.Values from the params.
type ListParams ¶
type ListParams struct { clerk.APIParams clerk.ListParams OrderBy *string `json:"order_by,omitempty"` Query *string `json:"query,omitempty"` EmailAddresses []string `json:"email_address,omitempty"` ExternalIDs []string `json:"external_id,omitempty"` PhoneNumbers []string `json:"phone_number,omitempty"` Web3Wallets []string `json:"web3_wallet,omitempty"` Usernames []string `json:"username,omitempty"` UserIDs []string `json:"user_id,omitempty"` LastActiveAtSince *int64 `json:"last_active_at_since,omitempty"` }
func (*ListParams) ToQuery ¶
func (params *ListParams) ToQuery() url.Values
ToQuery returns url.Values from the params.
type MultifactorAuthentication ¶
type MultifactorAuthentication struct { clerk.APIResource UserID string `json:"user_id"` }
func DeleteMFA ¶
func DeleteMFA(ctx context.Context, params *DeleteMFAParams) (*MultifactorAuthentication, error)
DeleteMFA disables a user's multi-factor authentication methods.
type TotalCount ¶
type TotalCount struct { clerk.APIResource Object string `json:"object"` TotalCount int64 `json:"total_count"` }
Response schema for GET /v1/users/count
func Count ¶
func Count(ctx context.Context, params *ListParams) (*TotalCount, error)
Count returns the total count of users satisfying the parameters.
type UpdateMetadataParams ¶
type UpdateMetadataParams struct { clerk.APIParams PublicMetadata *json.RawMessage `json:"public_metadata,omitempty"` PrivateMetadata *json.RawMessage `json:"private_metadata,omitempty"` UnsafeMetadata *json.RawMessage `json:"unsafe_metadata,omitempty"` }
type UpdateParams ¶
type UpdateParams struct { clerk.APIParams FirstName *string `json:"first_name,omitempty"` LastName *string `json:"last_name,omitempty"` PrimaryEmailAddressID *string `json:"primary_email_address_id,omitempty"` NotifyPrimaryEmailAddressChanged *bool `json:"notify_primary_email_address_changed,omitempty"` PrimaryPhoneNumberID *string `json:"primary_phone_number_id,omitempty"` PrimaryWeb3WalletID *string `json:"primary_web3_wallet_id,omitempty"` Username *string `json:"username,omitempty"` ProfileImageID *string `json:"profile_image_id,omitempty"` ProfileImage *string `json:"profile_image,omitempty"` Password *string `json:"password,omitempty"` PasswordDigest *string `json:"password_digest,omitempty"` PasswordHasher *string `json:"password_hasher,omitempty"` SkipPasswordChecks *bool `json:"skip_password_checks,omitempty"` SignOutOfOtherSessions *bool `json:"sign_out_of_other_sessions,omitempty"` ExternalID *string `json:"external_id,omitempty"` PublicMetadata *json.RawMessage `json:"public_metadata,omitempty"` PrivateMetadata *json.RawMessage `json:"private_metadata,omitempty"` UnsafeMetadata *json.RawMessage `json:"unsafe_metadata,omitempty"` TOTPSecret *string `json:"totp_secret,omitempty"` BackupCodes *[]string `json:"backup_codes,omitempty"` DeleteSelfEnabled *bool `json:"delete_self_enabled,omitempty"` CreateOrganizationEnabled *bool `json:"create_organization_enabled,omitempty"` // Specified in RFC3339 format CreatedAt *string `json:"created_at,omitempty"` }