Documentation
¶
Index ¶
- func ActionTypeChoices() []string
- func AnyTypeChoices() []string
- func AuthenticationMethodStateTypeChoices() []string
- func MethodTypeChoices() []string
- type AccessTokenCreateIn
- type AccessTokenCreateOut
- type AccessTokenUpdateIn
- type AccessTokenUpdateOut
- type AccountInviteOut
- type ActionType
- type AnyType
- type AuthenticationMethodOut
- type AuthenticationMethodStateType
- type CheckPasswordStrengthExistingUserIn
- type CheckPasswordStrengthExistingUserOut
- type CheckPasswordStrengthNewUserIn
- type CheckPasswordStrengthNewUserOut
- type Handler
- type IntercomOut
- type InvitationOut
- type MethodType
- type ProjectMembershipOut
- type ProjectMembershipsOut
- type TokenOut
- type TwoFactorAuthConfigureIn
- type TwoFactorAuthConfigureOtpIn
- type TwoFactorAuthConfigureOtpOut
- type TwoFactorAuthConfigureOut
- type UserAccountInvitesAcceptIn
- type UserAuthIn
- type UserAuthLoginOptionsIn
- type UserAuthLoginOptionsOut
- type UserAuthOut
- type UserGroupOut
- type UserHandler
- func (h *UserHandler) AccessTokenCreate(ctx context.Context, in *AccessTokenCreateIn) (*AccessTokenCreateOut, error)
- func (h *UserHandler) AccessTokenList(ctx context.Context) ([]TokenOut, error)
- func (h *UserHandler) AccessTokenRevoke(ctx context.Context, tokenPrefix string) error
- func (h *UserHandler) AccessTokenUpdate(ctx context.Context, tokenPrefix string, in *AccessTokenUpdateIn) (*AccessTokenUpdateOut, error)
- func (h *UserHandler) CheckPasswordStrengthExistingUser(ctx context.Context, in *CheckPasswordStrengthExistingUserIn) (*CheckPasswordStrengthExistingUserOut, error)
- func (h *UserHandler) CheckPasswordStrengthNewUser(ctx context.Context, in *CheckPasswordStrengthNewUserIn) (*CheckPasswordStrengthNewUserOut, error)
- func (h *UserHandler) OrganizationMemberGroupsList(ctx context.Context, organizationId string, memberUserId string) ([]UserGroupOut, error)
- func (h *UserHandler) TwoFactorAuthConfigure(ctx context.Context, in *TwoFactorAuthConfigureIn) (*TwoFactorAuthConfigureOut, error)
- func (h *UserHandler) TwoFactorAuthConfigureOTP(ctx context.Context, in *TwoFactorAuthConfigureOtpIn) (*TwoFactorAuthConfigureOtpOut, error)
- func (h *UserHandler) UserAccountDelete(ctx context.Context, userId string) error
- func (h *UserHandler) UserAccountInvitesAccept(ctx context.Context, in *UserAccountInvitesAcceptIn) ([]AccountInviteOut, error)
- func (h *UserHandler) UserAccountInvitesList(ctx context.Context) ([]AccountInviteOut, error)
- func (h *UserHandler) UserAuth(ctx context.Context, in *UserAuthIn) (*UserAuthOut, error)
- func (h *UserHandler) UserAuthLoginOptions(ctx context.Context, in *UserAuthLoginOptionsIn) (*UserAuthLoginOptionsOut, error)
- func (h *UserHandler) UserAuthenticationMethodDelete(ctx context.Context, userAuthenticationMethodId string) error
- func (h *UserHandler) UserAuthenticationMethodsList(ctx context.Context) ([]AuthenticationMethodOut, error)
- func (h *UserHandler) UserExpireTokens(ctx context.Context) error
- func (h *UserHandler) UserInfo(ctx context.Context) (*UserInfoOut, error)
- func (h *UserHandler) UserLogout(ctx context.Context) error
- func (h *UserHandler) UserPasswordChange(ctx context.Context, in *UserPasswordChangeIn) (string, error)
- func (h *UserHandler) UserPasswordReset(ctx context.Context, verificationCode string, in *UserPasswordResetIn) error
- func (h *UserHandler) UserPasswordResetRequest(ctx context.Context, in *UserPasswordResetRequestIn) error
- func (h *UserHandler) UserUpdate(ctx context.Context, in *UserUpdateIn) (*UserUpdateOut, error)
- func (h *UserHandler) UserVerifyEmail(ctx context.Context, verificationCode string) (*UserVerifyEmailOut, error)
- func (h *UserHandler) ValidateCreditCode(ctx context.Context, creditCode string) error
- func (h *UserHandler) ValidateReferralCode(ctx context.Context, referralCode string) error
- type UserInfoOut
- type UserPasswordChangeIn
- type UserPasswordResetIn
- type UserPasswordResetRequestIn
- type UserUpdateIn
- type UserUpdateOut
- type UserVerifyEmailOut
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActionTypeChoices ¶ added in v0.3.0
func ActionTypeChoices() []string
func AnyTypeChoices ¶ added in v0.3.0
func AnyTypeChoices() []string
func AuthenticationMethodStateTypeChoices ¶ added in v0.3.0
func AuthenticationMethodStateTypeChoices() []string
func MethodTypeChoices ¶ added in v0.3.0
func MethodTypeChoices() []string
Types ¶
type AccessTokenCreateIn ¶
type AccessTokenCreateIn struct {
Description string `json:"description"` // Name / description of an access token
ExtendWhenUsed *bool `json:"extend_when_used,omitempty"` // Extend token expiration time when token is used. Only applicable if max_age_seconds is specified.
MaxAgeSeconds *float64 `json:"max_age_seconds,omitempty"` // Time the token remains valid since creation (or since last use if extend_when_used is true)
Scopes *[]string `json:"scopes,omitempty"` // Scopes this token is restricted to, if specified
}
AccessTokenCreateIn AccessTokenCreateRequestBody
type AccessTokenCreateOut ¶
type AccessTokenCreateOut struct {
CreateTime time.Time `json:"create_time"` // Timestamp when the access token was created
CreatedManually bool `json:"created_manually"` // True for tokens explicitly created via the access_tokens API, false for tokens created via login.
CurrentlyActive *bool `json:"currently_active,omitempty"` // true if API request was made with this access token
Description *string `json:"description,omitempty"` // Name / description of an access token
ExpiryTime *time.Time `json:"expiry_time,omitempty"` // Timestamp when the access token will expire unless extended, if ever
ExtendWhenUsed bool `json:"extend_when_used"` // Extend token expiration time when token is used. Only applicable if max_age_seconds is specified.
FullToken string `json:"full_token"` // This full access token can be used to make API calls. This can also be used to update or revoke tokens. Note that when using this token with the update and revoke APIs it must be URL encoded because it may contain /, + and = characters (/ => %2F, + => %2B, = => %3D).
LastIp *string `json:"last_ip,omitempty"` // IP address the access token was last used from in case it has ever been used
LastUsedTime *time.Time `json:"last_used_time,omitempty"` // Timestamp when the access token was last used, if ever
LastUserAgent *string `json:"last_user_agent,omitempty"` // User agent string of the client that last used the token in case it has ever been used
LastUserAgentHumanReadable *string `json:"last_user_agent_human_readable,omitempty"` // Human readable user agent string of the client that last used the token in case user agent is known
MaxAgeSeconds float64 `json:"max_age_seconds"` // Time the token remains valid since creation (or since last use if extend_when_used is true)
Scopes []string `json:"scopes,omitempty"` // Scopes this token is restricted to, if specified
TokenPrefix string `json:"token_prefix"` // First characters of the actual token value. Full value is only exposed after creation. This value is used when updating or revoking tokens. Note that the value may contain /, + and = characters and must be URL encoded when used (/ => %2F, + => %2B, = => %3D).
}
AccessTokenCreateOut AccessTokenCreateResponse
type AccessTokenUpdateIn ¶
type AccessTokenUpdateIn struct {
Description string `json:"description"` // Name / description of an access token
}
AccessTokenUpdateIn AccessTokenUpdateRequestBody
type AccessTokenUpdateOut ¶
type AccessTokenUpdateOut struct {
CreateTime time.Time `json:"create_time"` // Timestamp when the access token was created
CreatedManually *bool `json:"created_manually,omitempty"` // True for tokens explicitly created via the access_tokens API, false for tokens created via login.
CurrentlyActive *bool `json:"currently_active,omitempty"` // true if API request was made with this access token
Description *string `json:"description,omitempty"` // Name / description of an access token
ExpiryTime *time.Time `json:"expiry_time,omitempty"` // Timestamp when the access token will expire unless extended, if ever
ExtendWhenUsed bool `json:"extend_when_used"` // Extend token expiration time when token is used. Only applicable if max_age_seconds is specified.
LastIp *string `json:"last_ip,omitempty"` // IP address the access token was last used from in case it has ever been used
LastUsedTime *time.Time `json:"last_used_time,omitempty"` // Timestamp when the access token was last used, if ever
LastUserAgent *string `json:"last_user_agent,omitempty"` // User agent string of the client that last used the token in case it has ever been used
LastUserAgentHumanReadable *string `json:"last_user_agent_human_readable,omitempty"` // Human readable user agent string of the client that last used the token in case user agent is known
MaxAgeSeconds float64 `json:"max_age_seconds"` // Time the token remains valid since creation (or since last use if extend_when_used is true)
Scopes []string `json:"scopes,omitempty"` // Scopes this token is restricted to, if specified
TokenPrefix string `json:"token_prefix"` // First characters of the actual token value. Full value is only exposed after creation. This value is used when updating or revoking tokens. Note that the value may contain /, + and = characters and must be URL encoded when used (/ => %2F, + => %2B, = => %3D).
}
AccessTokenUpdateOut AccessTokenUpdateResponse
type AccountInviteOut ¶
type AccountInviteOut struct {
AccountId string `json:"account_id"` // Account ID
AccountName string `json:"account_name"` // Account name
CreateTime time.Time `json:"create_time"` // Timestamp in ISO 8601 format, always in UTC
InvitedByUserEmail string `json:"invited_by_user_email"` // User email address
TeamId string `json:"team_id"` // Team ID
TeamName string `json:"team_name"` // Team name
UserEmail string `json:"user_email"` // User email address
}
type ActionType ¶ added in v0.3.0
type ActionType string
const ( ActionTypeAzureOauth ActionType = "azure_oauth" ActionTypeGithubOauth ActionType = "github_oauth" ActionTypeGoogleOauth ActionType = "google_oauth" ActionTypeHasuraOauth ActionType = "hasura_oauth" ActionTypePassword ActionType = "password" ActionTypeSaml ActionType = "saml" ActionTypeSignup ActionType = "signup" )
type AuthenticationMethodOut ¶
type AuthenticationMethodOut struct {
AuthenticationMethodAccountId string `json:"authentication_method_account_id"` // Account ID
CreateTime time.Time `json:"create_time"` // Timestamp in ISO 8601 format, always in UTC
CurrentlyActive bool `json:"currently_active"` // true if API was accessed with this authentication method
DeleteTime time.Time `json:"delete_time"` // Timestamp in ISO 8601 format, always in UTC
LastUsedTime time.Time `json:"last_used_time"` // Timestamp in ISO 8601 format, always in UTC
MethodId string `json:"method_id"` // Unique ID for authentication method
Name *string `json:"name,omitempty"` // Authentication method name
PublicRemoteIdentity string `json:"public_remote_identity"` // Identity on remote provider, if available. May be email address, but not necessarily.
RemoteProviderId string `json:"remote_provider_id"` // Provider ID
State AuthenticationMethodStateType `json:"state"` // State for authentication method
UpdateTime time.Time `json:"update_time"` // Timestamp in ISO 8601 format, always in UTC
UserEmail string `json:"user_email"` // User email address
}
type AuthenticationMethodStateType ¶ added in v0.3.0
type AuthenticationMethodStateType string
const ( AuthenticationMethodStateTypeActive AuthenticationMethodStateType = "active" AuthenticationMethodStateTypeDeleted AuthenticationMethodStateType = "deleted" )
type CheckPasswordStrengthExistingUserIn ¶
type CheckPasswordStrengthExistingUserIn struct {
NewPassword string `json:"new_password"` // New password
OldPassword string `json:"old_password"` // User password
}
CheckPasswordStrengthExistingUserIn CheckPasswordStrengthExistingUserRequestBody
type CheckPasswordStrengthExistingUserOut ¶
type CheckPasswordStrengthExistingUserOut struct {
IsAcceptable *bool `json:"is_acceptable,omitempty"` // True if the password is acceptable
Message string `json:"message"` // Password strength message
Score int `json:"score"` // Password strength score
}
CheckPasswordStrengthExistingUserOut Password strength
type CheckPasswordStrengthNewUserIn ¶
type CheckPasswordStrengthNewUserIn struct {
Email *string `json:"email,omitempty"` // User email address
Password string `json:"password"` // New password
RealName *string `json:"real_name,omitempty"` // User real name
}
CheckPasswordStrengthNewUserIn CheckPasswordStrengthNewUserRequestBody
type CheckPasswordStrengthNewUserOut ¶
type CheckPasswordStrengthNewUserOut struct {
IsAcceptable *bool `json:"is_acceptable,omitempty"` // True if the password is acceptable
Message string `json:"message"` // Password strength message
Score int `json:"score"` // Password strength score
}
CheckPasswordStrengthNewUserOut Password strength
type Handler ¶
type Handler interface {
// AccessTokenCreate create new access token
// POST /v1/access_token
// https://api.aiven.io/doc/#tag/Users/operation/AccessTokenCreate
AccessTokenCreate(ctx context.Context, in *AccessTokenCreateIn) (*AccessTokenCreateOut, error)
// AccessTokenList list all valid access tokens
// GET /v1/access_token
// https://api.aiven.io/doc/#tag/Users/operation/AccessTokenList
AccessTokenList(ctx context.Context) ([]TokenOut, error)
// AccessTokenRevoke revoke an access token
// DELETE /v1/access_token/{token_prefix}
// https://api.aiven.io/doc/#tag/Users/operation/AccessTokenRevoke
AccessTokenRevoke(ctx context.Context, tokenPrefix string) error
// AccessTokenUpdate update an existing access token
// PUT /v1/access_token/{token_prefix}
// https://api.aiven.io/doc/#tag/Users/operation/AccessTokenUpdate
AccessTokenUpdate(ctx context.Context, tokenPrefix string, in *AccessTokenUpdateIn) (*AccessTokenUpdateOut, error)
// CheckPasswordStrengthExistingUser check password strength for an existing user
// POST /v1/me/password_strength
// https://api.aiven.io/doc/#tag/Users/operation/CheckPasswordStrengthExistingUser
CheckPasswordStrengthExistingUser(ctx context.Context, in *CheckPasswordStrengthExistingUserIn) (*CheckPasswordStrengthExistingUserOut, error)
// CheckPasswordStrengthNewUser check password strength for a new user
// POST /v1/user/password_strength
// https://api.aiven.io/doc/#tag/Users/operation/CheckPasswordStrengthNewUser
CheckPasswordStrengthNewUser(ctx context.Context, in *CheckPasswordStrengthNewUserIn) (*CheckPasswordStrengthNewUserOut, error)
// OrganizationMemberGroupsList list user groups of the organization's member
// GET /v1/organization/{organization_id}/user/{member_user_id}/user-groups
// https://api.aiven.io/doc/#tag/Users/operation/OrganizationMemberGroupsList
OrganizationMemberGroupsList(ctx context.Context, organizationId string, memberUserId string) ([]UserGroupOut, error)
// TwoFactorAuthConfigure configure two-factor authentication
// PUT /v1/me/2fa
// https://api.aiven.io/doc/#tag/Users/operation/TwoFactorAuthConfigure
TwoFactorAuthConfigure(ctx context.Context, in *TwoFactorAuthConfigureIn) (*TwoFactorAuthConfigureOut, error)
// TwoFactorAuthConfigureOTP complete one-time password configuration
// PUT /v1/me/2fa/otp
// https://api.aiven.io/doc/#tag/Users/operation/TwoFactorAuthConfigureOTP
TwoFactorAuthConfigureOTP(ctx context.Context, in *TwoFactorAuthConfigureOtpIn) (*TwoFactorAuthConfigureOtpOut, error)
// UserAccountDelete delete user account
// DELETE /v1/user/{user_id}
// https://api.aiven.io/doc/#tag/Users/operation/UserAccountDelete
UserAccountDelete(ctx context.Context, userId string) error
// UserAccountInvitesAccept accept all invites for a single account
// POST /v1/me/account/invites/accept
// https://api.aiven.io/doc/#tag/Users/operation/UserAccountInvitesAccept
UserAccountInvitesAccept(ctx context.Context, in *UserAccountInvitesAcceptIn) ([]AccountInviteOut, error)
// UserAccountInvitesList list pending account invites
// GET /v1/me/account/invites
// https://api.aiven.io/doc/#tag/Users/operation/UserAccountInvitesList
UserAccountInvitesList(ctx context.Context) ([]AccountInviteOut, error)
// UserAuth authenticate user
// POST /v1/userauth
// https://api.aiven.io/doc/#tag/Users/operation/UserAuth
UserAuth(ctx context.Context, in *UserAuthIn) (*UserAuthOut, error)
// UserAuthLoginOptions get available login options
// POST /v1/userauth/login_options
// https://api.aiven.io/doc/#tag/Users/operation/UserAuthLoginOptions
UserAuthLoginOptions(ctx context.Context, in *UserAuthLoginOptionsIn) (*UserAuthLoginOptionsOut, error)
// UserAuthenticationMethodDelete delete linked authentication method, and revoke all associated access tokens
// DELETE /v1/me/authentication_methods/{user_authentication_method_id}
// https://api.aiven.io/doc/#tag/Users/operation/UserAuthenticationMethodDelete
UserAuthenticationMethodDelete(ctx context.Context, userAuthenticationMethodId string) error
// UserAuthenticationMethodsList list linked authentication methods
// GET /v1/me/authentication_methods
// https://api.aiven.io/doc/#tag/Users/operation/UserAuthenticationMethodsList
UserAuthenticationMethodsList(ctx context.Context) ([]AuthenticationMethodOut, error)
// UserExpireTokens expire all authorization tokens
// POST /v1/me/expire_tokens
// https://api.aiven.io/doc/#tag/Users/operation/UserExpireTokens
UserExpireTokens(ctx context.Context) error
// UserInfo get information for the current session's user
// GET /v1/me
// https://api.aiven.io/doc/#tag/Users/operation/UserInfo
UserInfo(ctx context.Context) (*UserInfoOut, error)
// UserLogout logout user, removing current authentication token
// POST /v1/me/logout
// https://api.aiven.io/doc/#tag/Users/operation/UserLogout
UserLogout(ctx context.Context) error
// UserPasswordChange change user password
// PUT /v1/me/password
// https://api.aiven.io/doc/#tag/Users/operation/UserPasswordChange
UserPasswordChange(ctx context.Context, in *UserPasswordChangeIn) (string, error)
// UserPasswordReset confirm user password reset
// POST /v1/user/password_reset/{verification_code}
// https://api.aiven.io/doc/#tag/Users/operation/UserPasswordReset
UserPasswordReset(ctx context.Context, verificationCode string, in *UserPasswordResetIn) error
// UserPasswordResetRequest request user password reset
// POST /v1/user/password_reset_request
// https://api.aiven.io/doc/#tag/Users/operation/UserPasswordResetRequest
UserPasswordResetRequest(ctx context.Context, in *UserPasswordResetRequestIn) error
// UserUpdate edit profile
// PATCH /v1/me
// https://api.aiven.io/doc/#tag/Users/operation/UserUpdate
UserUpdate(ctx context.Context, in *UserUpdateIn) (*UserUpdateOut, error)
// UserVerifyEmail confirm user email address
// POST /v1/user/verify_email/{verification_code}
// https://api.aiven.io/doc/#tag/Users/operation/UserVerifyEmail
UserVerifyEmail(ctx context.Context, verificationCode string) (*UserVerifyEmailOut, error)
// ValidateCreditCode validate campaign credit code
// GET /v1/user/credit_code/{credit_code}
// https://api.aiven.io/doc/#tag/Users/operation/ValidateCreditCode
ValidateCreditCode(ctx context.Context, creditCode string) error
// ValidateReferralCode validate referral_code code
// GET /v1/me/referral/validation/{referral_code}
// https://api.aiven.io/doc/#tag/Users/operation/ValidateReferralCode
ValidateReferralCode(ctx context.Context, referralCode string) error
}
type IntercomOut ¶
type IntercomOut struct {
AppId string `json:"app_id"` // Intercom application ID
Hmac string `json:"hmac"` // Intercom authentication HMAC
}
IntercomOut Intercom settings
type InvitationOut ¶
type InvitationOut struct {
InviteCode string `json:"invite_code"` // Code for accepting the invitation
InviteTime time.Time `json:"invite_time"` // Timestamp in ISO 8601 format, always in UTC
InvitingUserEmail string `json:"inviting_user_email"` // User email address
ProjectName string `json:"project_name"` // Project name
}
type MethodType ¶ added in v0.3.0
type MethodType string
const ( MethodTypePost MethodType = "POST" MethodTypeGet MethodType = "GET" )
type ProjectMembershipOut ¶
type ProjectMembershipOut struct {
Any AnyType `json:"ANY,omitempty"` // Project member type
}
ProjectMembershipOut Project membership and type of membership
type ProjectMembershipsOut ¶
type ProjectMembershipsOut struct {
Any []string `json:"ANY,omitempty"` // List of project member type
}
ProjectMembershipsOut List of project membership and type of membership
type TokenOut ¶
type TokenOut struct {
CreateTime time.Time `json:"create_time"` // Timestamp when the access token was created
CreatedManually bool `json:"created_manually"` // True for tokens explicitly created via the access_tokens API, false for tokens created via login.
CurrentlyActive *bool `json:"currently_active,omitempty"` // true if API request was made with this access token
Description *string `json:"description,omitempty"` // Name / description of an access token
ExpiryTime *time.Time `json:"expiry_time,omitempty"` // Timestamp when the access token will expire unless extended, if ever
ExtendWhenUsed bool `json:"extend_when_used"` // Extend token expiration time when token is used. Only applicable if max_age_seconds is specified.
LastIp *string `json:"last_ip,omitempty"` // IP address the access token was last used from in case it has ever been used
LastUsedTime *time.Time `json:"last_used_time,omitempty"` // Timestamp when the access token was last used, if ever
LastUserAgent *string `json:"last_user_agent,omitempty"` // User agent string of the client that last used the token in case it has ever been used
LastUserAgentHumanReadable *string `json:"last_user_agent_human_readable,omitempty"` // Human readable user agent string of the client that last used the token in case user agent is known
MaxAgeSeconds float64 `json:"max_age_seconds"` // Time the token remains valid since creation (or since last use if extend_when_used is true)
Scopes []string `json:"scopes,omitempty"` // Scopes this token is restricted to, if specified
TokenPrefix string `json:"token_prefix"` // First characters of the actual token value. Full value is only exposed after creation. This value is used when updating or revoking tokens. Note that the value may contain /, + and = characters and must be URL encoded when used (/ => %2F, + => %2B, = => %3D).
}
type TwoFactorAuthConfigureIn ¶
type TwoFactorAuthConfigureIn struct {
Method string `json:"method"` // Two-factor authentication method being used, if any
Password string `json:"password"` // Current password
}
TwoFactorAuthConfigureIn TwoFactorAuthConfigureRequestBody
type TwoFactorAuthConfigureOtpIn ¶
type TwoFactorAuthConfigureOtpIn struct {
Otp string `json:"otp"` // One-time password
Password string `json:"password"` // Current password
Uri string `json:"uri"` // URI describing the TOTP
}
TwoFactorAuthConfigureOtpIn TwoFactorAuthConfigureOTPRequestBody
type TwoFactorAuthConfigureOtpOut ¶
type TwoFactorAuthConfigureOtpOut struct {
Method string `json:"method"` // Two-factor authentication method being used, if any
Token string `json:"token"` // New API session authentication token when configuration is complete
}
TwoFactorAuthConfigureOtpOut TwoFactorAuthConfigureOTPResponse
type TwoFactorAuthConfigureOut ¶
type TwoFactorAuthConfigureOut struct {
Method string `json:"method"` // Two-factor authentication method being used, if any
Qrcode *string `json:"qrcode,omitempty"` // QR code describing the TOTP as a base64-encoded PNG
Uri *string `json:"uri,omitempty"` // URI describing the TOTP
}
TwoFactorAuthConfigureOut TwoFactorAuthConfigureResponse
type UserAccountInvitesAcceptIn ¶
type UserAccountInvitesAcceptIn struct {
AccountId string `json:"account_id"` // Account ID
TeamId *string `json:"team_id,omitempty"` // Team ID
}
UserAccountInvitesAcceptIn UserAccountInvitesAcceptRequestBody
type UserAuthIn ¶
type UserAuthIn struct {
Email string `json:"email"` // User email address
Otp *string `json:"otp,omitempty"` // One-time password
Password string `json:"password"` // User password
}
UserAuthIn UserAuthRequestBody
type UserAuthLoginOptionsIn ¶
type UserAuthLoginOptionsIn struct {
Email *string `json:"email,omitempty"` // User email address
}
UserAuthLoginOptionsIn UserAuthLoginOptionsRequestBody
type UserAuthLoginOptionsOut ¶
type UserAuthLoginOptionsOut struct {
None []map[string]any `json:"None,omitempty"` // List of available login methods
Action ActionType `json:"action"` // Action
Method MethodType `json:"method,omitempty"` // HTTP method used for redirecting
Name *string `json:"name,omitempty"` // Human readable name
RedirectUrl *string `json:"redirect_url,omitempty"` // Redirect URL for signing in
}
UserAuthLoginOptionsOut UserAuthLoginOptionsResponse
type UserAuthOut ¶
type UserAuthOut struct {
ReturnUrl *string `json:"return_url,omitempty"` // Return URL
State string `json:"state"` // User account state
Token string `json:"token"` // API session authentication token
UserEmail string `json:"user_email"` // User email address
}
UserAuthOut UserAuthResponse
type UserGroupOut ¶
type UserGroupOut struct {
CreateTime time.Time `json:"create_time"` // User group creation time
Description string `json:"description"`
ManagedByScim bool `json:"managed_by_scim"` // Managed By Scim
UpdateTime time.Time `json:"update_time"` // User group last update time
UserGroupId string `json:"user_group_id"` // User Group ID
UserGroupName string `json:"user_group_name"` // User Group Name
}
type UserHandler ¶
type UserHandler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(doer doer) UserHandler
func (*UserHandler) AccessTokenCreate ¶
func (h *UserHandler) AccessTokenCreate(ctx context.Context, in *AccessTokenCreateIn) (*AccessTokenCreateOut, error)
func (*UserHandler) AccessTokenList ¶
func (h *UserHandler) AccessTokenList(ctx context.Context) ([]TokenOut, error)
func (*UserHandler) AccessTokenRevoke ¶
func (h *UserHandler) AccessTokenRevoke(ctx context.Context, tokenPrefix string) error
func (*UserHandler) AccessTokenUpdate ¶
func (h *UserHandler) AccessTokenUpdate(ctx context.Context, tokenPrefix string, in *AccessTokenUpdateIn) (*AccessTokenUpdateOut, error)
func (*UserHandler) CheckPasswordStrengthExistingUser ¶
func (h *UserHandler) CheckPasswordStrengthExistingUser(ctx context.Context, in *CheckPasswordStrengthExistingUserIn) (*CheckPasswordStrengthExistingUserOut, error)
func (*UserHandler) CheckPasswordStrengthNewUser ¶
func (h *UserHandler) CheckPasswordStrengthNewUser(ctx context.Context, in *CheckPasswordStrengthNewUserIn) (*CheckPasswordStrengthNewUserOut, error)
func (*UserHandler) OrganizationMemberGroupsList ¶
func (h *UserHandler) OrganizationMemberGroupsList(ctx context.Context, organizationId string, memberUserId string) ([]UserGroupOut, error)
func (*UserHandler) TwoFactorAuthConfigure ¶
func (h *UserHandler) TwoFactorAuthConfigure(ctx context.Context, in *TwoFactorAuthConfigureIn) (*TwoFactorAuthConfigureOut, error)
func (*UserHandler) TwoFactorAuthConfigureOTP ¶
func (h *UserHandler) TwoFactorAuthConfigureOTP(ctx context.Context, in *TwoFactorAuthConfigureOtpIn) (*TwoFactorAuthConfigureOtpOut, error)
func (*UserHandler) UserAccountDelete ¶ added in v0.8.0
func (h *UserHandler) UserAccountDelete(ctx context.Context, userId string) error
func (*UserHandler) UserAccountInvitesAccept ¶
func (h *UserHandler) UserAccountInvitesAccept(ctx context.Context, in *UserAccountInvitesAcceptIn) ([]AccountInviteOut, error)
func (*UserHandler) UserAccountInvitesList ¶
func (h *UserHandler) UserAccountInvitesList(ctx context.Context) ([]AccountInviteOut, error)
func (*UserHandler) UserAuth ¶
func (h *UserHandler) UserAuth(ctx context.Context, in *UserAuthIn) (*UserAuthOut, error)
func (*UserHandler) UserAuthLoginOptions ¶
func (h *UserHandler) UserAuthLoginOptions(ctx context.Context, in *UserAuthLoginOptionsIn) (*UserAuthLoginOptionsOut, error)
func (*UserHandler) UserAuthenticationMethodDelete ¶
func (h *UserHandler) UserAuthenticationMethodDelete(ctx context.Context, userAuthenticationMethodId string) error
func (*UserHandler) UserAuthenticationMethodsList ¶
func (h *UserHandler) UserAuthenticationMethodsList(ctx context.Context) ([]AuthenticationMethodOut, error)
func (*UserHandler) UserExpireTokens ¶
func (h *UserHandler) UserExpireTokens(ctx context.Context) error
func (*UserHandler) UserInfo ¶
func (h *UserHandler) UserInfo(ctx context.Context) (*UserInfoOut, error)
func (*UserHandler) UserLogout ¶
func (h *UserHandler) UserLogout(ctx context.Context) error
func (*UserHandler) UserPasswordChange ¶
func (h *UserHandler) UserPasswordChange(ctx context.Context, in *UserPasswordChangeIn) (string, error)
func (*UserHandler) UserPasswordReset ¶
func (h *UserHandler) UserPasswordReset(ctx context.Context, verificationCode string, in *UserPasswordResetIn) error
func (*UserHandler) UserPasswordResetRequest ¶
func (h *UserHandler) UserPasswordResetRequest(ctx context.Context, in *UserPasswordResetRequestIn) error
func (*UserHandler) UserUpdate ¶
func (h *UserHandler) UserUpdate(ctx context.Context, in *UserUpdateIn) (*UserUpdateOut, error)
func (*UserHandler) UserVerifyEmail ¶
func (h *UserHandler) UserVerifyEmail(ctx context.Context, verificationCode string) (*UserVerifyEmailOut, error)
func (*UserHandler) ValidateCreditCode ¶
func (h *UserHandler) ValidateCreditCode(ctx context.Context, creditCode string) error
func (*UserHandler) ValidateReferralCode ¶
func (h *UserHandler) ValidateReferralCode(ctx context.Context, referralCode string) error
type UserInfoOut ¶
type UserInfoOut struct {
Auth []string `json:"auth"` // List of user's required authentication methods
City *string `json:"city,omitempty"`
Country *string `json:"country,omitempty"` // Country code ISO 3166-1 alpha-2
CreateTime *time.Time `json:"create_time,omitempty"` // User registration time
Department *string `json:"department,omitempty"` // Job department
Features map[string]any `json:"features,omitempty"` // Feature flags
Intercom IntercomOut `json:"intercom"` // Intercom settings
Invitations []InvitationOut `json:"invitations"` // List of pending invitations
JobTitle *string `json:"job_title,omitempty"` // Job title
ManagedByScim *bool `json:"managed_by_scim,omitempty"` // User management status
ManagingOrganizationId *string `json:"managing_organization_id,omitempty"` // Organization ID
ProjectMembership ProjectMembershipOut `json:"project_membership"` // Project membership and type of membership
ProjectMemberships *ProjectMembershipsOut `json:"project_memberships,omitempty"` // List of project membership and type of membership
Projects []string `json:"projects"` // List of projects the user is a member of
RealName string `json:"real_name"` // User real name
State string `json:"state"` // User account state
TokenValidityBegin *string `json:"token_validity_begin,omitempty"` // Earliest valid authentication token timestamp
User string `json:"user"` // User email address
UserId string `json:"user_id"` // User ID
}
UserInfoOut User information
type UserPasswordChangeIn ¶
type UserPasswordChangeIn struct {
NewPassword string `json:"new_password"` // New password
Password string `json:"password"` // Current password
}
UserPasswordChangeIn UserPasswordChangeRequestBody
type UserPasswordResetIn ¶
type UserPasswordResetIn struct {
NewPassword string `json:"new_password"` // New password
}
UserPasswordResetIn UserPasswordResetRequestBody
type UserPasswordResetRequestIn ¶
type UserPasswordResetRequestIn struct {
Email string `json:"email"` // User email address
}
UserPasswordResetRequestIn UserPasswordResetRequestRequestBody
type UserUpdateIn ¶
type UserUpdateIn struct {
City *string `json:"city,omitempty"`
Country *string `json:"country,omitempty"` // Country code ISO 3166-1 alpha-2
Department *string `json:"department,omitempty"` // Job department
JobTitle *string `json:"job_title,omitempty"` // Job title
RealName string `json:"real_name"` // User real name
}
UserUpdateIn UserUpdateRequestBody
type UserUpdateOut ¶
type UserUpdateOut struct {
Auth []string `json:"auth"` // List of user's required authentication methods
City *string `json:"city,omitempty"`
Country *string `json:"country,omitempty"` // Country code ISO 3166-1 alpha-2
CreateTime *time.Time `json:"create_time,omitempty"` // User registration time
Department *string `json:"department,omitempty"` // Job department
Features map[string]any `json:"features,omitempty"` // Feature flags
Intercom IntercomOut `json:"intercom"` // Intercom settings
Invitations []InvitationOut `json:"invitations"` // List of pending invitations
JobTitle *string `json:"job_title,omitempty"` // Job title
ManagedByScim *bool `json:"managed_by_scim,omitempty"` // User management status
ManagingOrganizationId *string `json:"managing_organization_id,omitempty"` // Organization ID
ProjectMembership ProjectMembershipOut `json:"project_membership"` // Project membership and type of membership
ProjectMemberships *ProjectMembershipsOut `json:"project_memberships,omitempty"` // List of project membership and type of membership
Projects []string `json:"projects"` // List of projects the user is a member of
RealName string `json:"real_name"` // User real name
State string `json:"state"` // User account state
TokenValidityBegin *string `json:"token_validity_begin,omitempty"` // Earliest valid authentication token timestamp
User string `json:"user"` // User email address
UserId string `json:"user_id"` // User ID
}
UserUpdateOut User information
type UserVerifyEmailOut ¶
type UserVerifyEmailOut struct {
UserEmail string `json:"user_email"` // User email address
}
UserVerifyEmailOut Details of verified invite