Documentation
¶
Index ¶
- type ApplicationUserAccessTokenCreateIn
- type ApplicationUserAccessTokenCreateOut
- type ApplicationUserCreateIn
- type ApplicationUserCreateOut
- type ApplicationUserGetOut
- type ApplicationUserHandler
- func (h *ApplicationUserHandler) ApplicationUserAccessTokenCreate(ctx context.Context, organizationId string, userId string, ...) (*ApplicationUserAccessTokenCreateOut, error)
- func (h *ApplicationUserHandler) ApplicationUserAccessTokenDelete(ctx context.Context, organizationId string, userId string, tokenPrefix string) error
- func (h *ApplicationUserHandler) ApplicationUserAccessTokensList(ctx context.Context, organizationId string, userId string) ([]TokenOut, error)
- func (h *ApplicationUserHandler) ApplicationUserCreate(ctx context.Context, organizationId string, in *ApplicationUserCreateIn) (*ApplicationUserCreateOut, error)
- func (h *ApplicationUserHandler) ApplicationUserDelete(ctx context.Context, organizationId string, userId string) error
- func (h *ApplicationUserHandler) ApplicationUserGet(ctx context.Context, organizationId string, userId string) (*ApplicationUserGetOut, error)
- func (h *ApplicationUserHandler) ApplicationUserUpdate(ctx context.Context, organizationId string, userId string, ...) (*ApplicationUserUpdateOut, error)
- func (h *ApplicationUserHandler) ApplicationUsersList(ctx context.Context, organizationId string) ([]ApplicationUserOut, error)
- type ApplicationUserOut
- type ApplicationUserUpdateIn
- type ApplicationUserUpdateOut
- type Handler
- type TokenOut
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplicationUserAccessTokenCreateIn ¶
type ApplicationUserAccessTokenCreateIn struct {
Description string `json:"description"`
ExtendWhenUsed *bool `json:"extend_when_used,omitempty"` // Extend token expiration time when token is used. Only applicable if max_age_seconds is specified.
IpAllowlist *[]string `json:"ip_allowlist,omitempty"` // List of allowed IP ranges
MaxAgeSeconds *int `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
}
ApplicationUserAccessTokenCreateIn ApplicationUserAccessTokenCreateRequestBody
type ApplicationUserAccessTokenCreateOut ¶
type ApplicationUserAccessTokenCreateOut struct {
FullToken string `json:"full_token"` // Full Token
TokenPrefix string `json:"token_prefix"` // Token Prefix
}
ApplicationUserAccessTokenCreateOut ApplicationUserAccessTokenCreateResponse
type ApplicationUserCreateIn ¶
type ApplicationUserCreateIn struct {
IsSuperAdmin *bool `json:"is_super_admin,omitempty"` // Alters super admin state of the organization application user
Name string `json:"name"`
}
ApplicationUserCreateIn ApplicationUserCreateRequestBody
type ApplicationUserCreateOut ¶
type ApplicationUserCreateOut struct {
IsSuperAdmin bool `json:"is_super_admin"` // Super admin state of the organization application user
Name string `json:"name"`
UserEmail string `json:"user_email"` // User Email
UserId string `json:"user_id"` // User ID
}
ApplicationUserCreateOut ApplicationUserCreateResponse
type ApplicationUserGetOut ¶
type ApplicationUserGetOut struct {
IsSuperAdmin bool `json:"is_super_admin"` // Super admin state of the organization application user
Name string `json:"name"`
UserEmail string `json:"user_email"` // User Email
UserId string `json:"user_id"` // User ID
}
ApplicationUserGetOut ApplicationUserGetResponse
type ApplicationUserHandler ¶
type ApplicationUserHandler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(doer doer) ApplicationUserHandler
func (*ApplicationUserHandler) ApplicationUserAccessTokenCreate ¶
func (h *ApplicationUserHandler) ApplicationUserAccessTokenCreate(ctx context.Context, organizationId string, userId string, in *ApplicationUserAccessTokenCreateIn) (*ApplicationUserAccessTokenCreateOut, error)
func (*ApplicationUserHandler) ApplicationUserAccessTokenDelete ¶
func (*ApplicationUserHandler) ApplicationUserAccessTokensList ¶
func (*ApplicationUserHandler) ApplicationUserCreate ¶
func (h *ApplicationUserHandler) ApplicationUserCreate(ctx context.Context, organizationId string, in *ApplicationUserCreateIn) (*ApplicationUserCreateOut, error)
func (*ApplicationUserHandler) ApplicationUserDelete ¶
func (*ApplicationUserHandler) ApplicationUserGet ¶
func (h *ApplicationUserHandler) ApplicationUserGet(ctx context.Context, organizationId string, userId string) (*ApplicationUserGetOut, error)
func (*ApplicationUserHandler) ApplicationUserUpdate ¶ added in v0.10.0
func (h *ApplicationUserHandler) ApplicationUserUpdate(ctx context.Context, organizationId string, userId string, in *ApplicationUserUpdateIn) (*ApplicationUserUpdateOut, error)
func (*ApplicationUserHandler) ApplicationUsersList ¶
func (h *ApplicationUserHandler) ApplicationUsersList(ctx context.Context, organizationId string) ([]ApplicationUserOut, error)
type ApplicationUserOut ¶
type ApplicationUserUpdateIn ¶ added in v0.10.0
type ApplicationUserUpdateIn struct {
IsSuperAdmin *bool `json:"is_super_admin,omitempty"` // Alters super admin state of the organization application user
Name string `json:"name"`
}
ApplicationUserUpdateIn ApplicationUserUpdateRequestBody
type ApplicationUserUpdateOut ¶ added in v0.10.0
type ApplicationUserUpdateOut struct {
IsSuperAdmin bool `json:"is_super_admin"` // Super admin state of the organization application user
Name string `json:"name"`
UserEmail string `json:"user_email"` // User Email
UserId string `json:"user_id"` // User ID
}
ApplicationUserUpdateOut ApplicationUserUpdateResponse
type Handler ¶
type Handler interface {
// ApplicationUserAccessTokenCreate create an application token
// POST /v1/organization/{organization_id}/application-users/{user_id}/access-tokens
// https://api.aiven.io/doc/#tag/Application_Users/operation/ApplicationUserAccessTokenCreate
ApplicationUserAccessTokenCreate(ctx context.Context, organizationId string, userId string, in *ApplicationUserAccessTokenCreateIn) (*ApplicationUserAccessTokenCreateOut, error)
// ApplicationUserAccessTokenDelete delete an application token
// DELETE /v1/organization/{organization_id}/application-users/{user_id}/access-tokens/{token_prefix}
// https://api.aiven.io/doc/#tag/Application_Users/operation/ApplicationUserAccessTokenDelete
ApplicationUserAccessTokenDelete(ctx context.Context, organizationId string, userId string, tokenPrefix string) error
// ApplicationUserAccessTokensList list application tokens
// GET /v1/organization/{organization_id}/application-users/{user_id}/access-tokens
// https://api.aiven.io/doc/#tag/Application_Users/operation/ApplicationUserAccessTokensList
ApplicationUserAccessTokensList(ctx context.Context, organizationId string, userId string) ([]TokenOut, error)
// ApplicationUserCreate create an application user
// POST /v1/organization/{organization_id}/application-users
// https://api.aiven.io/doc/#tag/Application_Users/operation/ApplicationUserCreate
ApplicationUserCreate(ctx context.Context, organizationId string, in *ApplicationUserCreateIn) (*ApplicationUserCreateOut, error)
// ApplicationUserDelete delete an application user
// DELETE /v1/organization/{organization_id}/application-users/{user_id}
// https://api.aiven.io/doc/#tag/Application_Users/operation/ApplicationUserDelete
ApplicationUserDelete(ctx context.Context, organizationId string, userId string) error
// ApplicationUserGet get an application user
// GET /v1/organization/{organization_id}/application-users/{user_id}
// https://api.aiven.io/doc/#tag/Application_Users/operation/ApplicationUserGet
ApplicationUserGet(ctx context.Context, organizationId string, userId string) (*ApplicationUserGetOut, error)
// ApplicationUserUpdate update details on an application user of the organization
// PATCH /v1/organization/{organization_id}/application-users/{user_id}
// https://api.aiven.io/doc/#tag/Application_Users/operation/ApplicationUserUpdate
ApplicationUserUpdate(ctx context.Context, organizationId string, userId string, in *ApplicationUserUpdateIn) (*ApplicationUserUpdateOut, error)
// ApplicationUsersList list application users
// GET /v1/organization/{organization_id}/application-users
// https://api.aiven.io/doc/#tag/Application_Users/operation/ApplicationUsersList
ApplicationUsersList(ctx context.Context, organizationId string) ([]ApplicationUserOut, error)
}
type TokenOut ¶
type TokenOut struct {
CreateTime time.Time `json:"create_time"` // Create Time
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"` // true if API request was made with this access token
Description *string `json:"description,omitempty"`
ExpiryTime *time.Time `json:"expiry_time,omitempty"` // Timestamp when the access token will expire unless extended, if ever
ExtendWhenUsed *bool `json:"extend_when_used,omitempty"` // Extend token expiration time when token is used. Only applicable if max_age_seconds is specified.
IpAllowlist []string `json:"ip_allowlist,omitempty"` // List of allowed IP ranges
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 *int `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
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).
}
Click to show internal directories.
Click to hide internal directories.