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) 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 AccessTokenCreateOut ¶
type AccessTokenCreateOut struct { CreateTime time.Time `json:"create_time"` CreatedManually bool `json:"created_manually"` CurrentlyActive *bool `json:"currently_active,omitempty"` Description string `json:"description,omitempty"` ExpiryTime *time.Time `json:"expiry_time,omitempty"` ExtendWhenUsed bool `json:"extend_when_used"` FullToken string `json:"full_token"` LastIp string `json:"last_ip,omitempty"` LastUsedTime *time.Time `json:"last_used_time,omitempty"` LastUserAgent string `json:"last_user_agent,omitempty"` LastUserAgentHumanReadable string `json:"last_user_agent_human_readable,omitempty"` MaxAgeSeconds float64 `json:"max_age_seconds"` Scopes []string `json:"scopes,omitempty"` TokenPrefix string `json:"token_prefix"` }
type AccessTokenUpdateIn ¶
type AccessTokenUpdateIn struct {
Description string `json:"description"`
}
type AccessTokenUpdateOut ¶
type AccessTokenUpdateOut struct { CreateTime time.Time `json:"create_time"` CreatedManually *bool `json:"created_manually,omitempty"` CurrentlyActive *bool `json:"currently_active,omitempty"` Description string `json:"description,omitempty"` ExpiryTime *time.Time `json:"expiry_time,omitempty"` ExtendWhenUsed bool `json:"extend_when_used"` LastIp string `json:"last_ip,omitempty"` LastUsedTime *time.Time `json:"last_used_time,omitempty"` LastUserAgent string `json:"last_user_agent,omitempty"` LastUserAgentHumanReadable string `json:"last_user_agent_human_readable,omitempty"` MaxAgeSeconds float64 `json:"max_age_seconds"` Scopes []string `json:"scopes,omitempty"` TokenPrefix string `json:"token_prefix"` }
type AccountInviteOut ¶
type AccountInviteOut struct { AccountId string `json:"account_id"` AccountName string `json:"account_name"` CreateTime time.Time `json:"create_time"` InvitedByUserEmail string `json:"invited_by_user_email"` TeamId string `json:"team_id"` TeamName string `json:"team_name"` UserEmail string `json:"user_email"` }
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"` CreateTime time.Time `json:"create_time"` CurrentlyActive bool `json:"currently_active"` DeleteTime time.Time `json:"delete_time"` LastUsedTime time.Time `json:"last_used_time"` MethodId string `json:"method_id"` Name string `json:"name,omitempty"` PublicRemoteIdentity string `json:"public_remote_identity"` RemoteProviderId string `json:"remote_provider_id"` State AuthenticationMethodStateType `json:"state"` UpdateTime time.Time `json:"update_time"` UserEmail string `json:"user_email"` }
type AuthenticationMethodStateType ¶ added in v0.3.0
type AuthenticationMethodStateType string
const ( AuthenticationMethodStateTypeActive AuthenticationMethodStateType = "active" AuthenticationMethodStateTypeDeleted AuthenticationMethodStateType = "deleted" )
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) // 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 InvitationOut ¶
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"`
}
type ProjectMembershipsOut ¶
type ProjectMembershipsOut struct {
Any []string `json:"ANY,omitempty"`
}
type TokenOut ¶
type TokenOut struct { CreateTime time.Time `json:"create_time"` CreatedManually bool `json:"created_manually"` CurrentlyActive *bool `json:"currently_active,omitempty"` Description string `json:"description,omitempty"` ExpiryTime *time.Time `json:"expiry_time,omitempty"` ExtendWhenUsed bool `json:"extend_when_used"` LastIp string `json:"last_ip,omitempty"` LastUsedTime *time.Time `json:"last_used_time,omitempty"` LastUserAgent string `json:"last_user_agent,omitempty"` LastUserAgentHumanReadable string `json:"last_user_agent_human_readable,omitempty"` MaxAgeSeconds float64 `json:"max_age_seconds"` Scopes []string `json:"scopes,omitempty"` TokenPrefix string `json:"token_prefix"` }
type UserAuthIn ¶
type UserAuthLoginOptionsIn ¶
type UserAuthLoginOptionsIn struct {
Email string `json:"email,omitempty"`
}
type UserAuthLoginOptionsOut ¶
type UserAuthLoginOptionsOut struct { None []map[string]any `json:"None,omitempty"` Action ActionType `json:"action"` Method MethodType `json:"method,omitempty"` Name string `json:"name,omitempty"` RedirectUrl string `json:"redirect_url,omitempty"` }
type UserAuthOut ¶
type UserGroupOut ¶
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) 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"` City string `json:"city,omitempty"` Country string `json:"country,omitempty"` CreateTime *time.Time `json:"create_time,omitempty"` Department string `json:"department,omitempty"` Features map[string]any `json:"features,omitempty"` Intercom IntercomOut `json:"intercom"` Invitations []InvitationOut `json:"invitations"` JobTitle string `json:"job_title,omitempty"` ManagedByScim *bool `json:"managed_by_scim,omitempty"` ManagingOrganizationId string `json:"managing_organization_id,omitempty"` ProjectMembership ProjectMembershipOut `json:"project_membership"` ProjectMemberships *ProjectMembershipsOut `json:"project_memberships,omitempty"` Projects []string `json:"projects"` RealName string `json:"real_name"` State string `json:"state"` TokenValidityBegin string `json:"token_validity_begin,omitempty"` User string `json:"user"` UserId string `json:"user_id"` }
type UserPasswordChangeIn ¶
type UserPasswordResetIn ¶
type UserPasswordResetIn struct {
NewPassword string `json:"new_password"`
}
type UserPasswordResetRequestIn ¶
type UserPasswordResetRequestIn struct {
Email string `json:"email"`
}
type UserUpdateIn ¶
type UserUpdateOut ¶
type UserUpdateOut struct { Auth []string `json:"auth"` City string `json:"city,omitempty"` Country string `json:"country,omitempty"` CreateTime *time.Time `json:"create_time,omitempty"` Department string `json:"department,omitempty"` Features map[string]any `json:"features,omitempty"` Intercom IntercomOut `json:"intercom"` Invitations []InvitationOut `json:"invitations"` JobTitle string `json:"job_title,omitempty"` ManagedByScim *bool `json:"managed_by_scim,omitempty"` ManagingOrganizationId string `json:"managing_organization_id,omitempty"` ProjectMembership ProjectMembershipOut `json:"project_membership"` ProjectMemberships *ProjectMembershipsOut `json:"project_memberships,omitempty"` Projects []string `json:"projects"` RealName string `json:"real_name"` State string `json:"state"` TokenValidityBegin string `json:"token_validity_begin,omitempty"` User string `json:"user"` UserId string `json:"user_id"` }
type UserVerifyEmailOut ¶
type UserVerifyEmailOut struct {
UserEmail string `json:"user_email"`
}
Click to show internal directories.
Click to hide internal directories.