organizationuser

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionTypeChoices

func ActionTypeChoices() []string

func StateTypeChoices

func StateTypeChoices() []string

Types

type ActionType

type ActionType string
const (
	ActionTypeAccept ActionType = "accept"
)

type AuthenticationMethodOut

type AuthenticationMethodOut struct {
	IsEnabled2Fa     *bool      `json:"is_enabled_2fa,omitempty"`
	LastUsedTime     *time.Time `json:"last_used_time,omitempty"`
	LocalProviderId  string     `json:"local_provider_id,omitempty"`
	MethodId         string     `json:"method_id,omitempty"`
	Name             string     `json:"name,omitempty"`
	OrganizationId   string     `json:"organization_id,omitempty"`
	RemoteProviderId string     `json:"remote_provider_id"`
	Type             string     `json:"type,omitempty"`
	UserEmail        string     `json:"user_email,omitempty"`
	UserId           string     `json:"user_id,omitempty"`
}

type Handler

type Handler interface {
	// OrganizationUserAuthenticationMethodsList list authentication methods for a user in the organization
	// GET /organization/{organization_id}/user/{member_user_id}/authentication_methods
	// https://api.aiven.io/doc/#tag/Users/operation/OrganizationUserAuthenticationMethodsList
	OrganizationUserAuthenticationMethodsList(ctx context.Context, organizationId string, memberUserId string) ([]AuthenticationMethodOut, error)

	// OrganizationUserDelete remove a user from the organization
	// DELETE /organization/{organization_id}/user/{member_user_id}
	// https://api.aiven.io/doc/#tag/Users/operation/OrganizationUserDelete
	OrganizationUserDelete(ctx context.Context, organizationId string, memberUserId string) error

	// OrganizationUserGet get details on a user of the organization
	// GET /organization/{organization_id}/user/{member_user_id}
	// https://api.aiven.io/doc/#tag/Users/operation/OrganizationUserGet
	OrganizationUserGet(ctx context.Context, organizationId string, memberUserId string) (*OrganizationUserGetOut, error)

	// OrganizationUserInvitationAccept accept a user invitation to the organization
	// POST /organization/{organization_id}/invitation/{user_email}
	// https://api.aiven.io/doc/#tag/Organizations/operation/OrganizationUserInvitationAccept
	OrganizationUserInvitationAccept(ctx context.Context, organizationId string, userEmail string, in *OrganizationUserInvitationAcceptIn) error

	// OrganizationUserInvitationDelete remove an invitation to the organization
	// DELETE /organization/{organization_id}/invitation/{user_email}
	// https://api.aiven.io/doc/#tag/Organizations/operation/OrganizationUserInvitationDelete
	OrganizationUserInvitationDelete(ctx context.Context, organizationId string, userEmail string) error

	// OrganizationUserInvitationsList list user invitations to the organization
	// GET /organization/{organization_id}/invitation
	// https://api.aiven.io/doc/#tag/Organizations/operation/OrganizationUserInvitationsList
	OrganizationUserInvitationsList(ctx context.Context, organizationId string) ([]InvitationOut, error)

	// OrganizationUserInvite invite a user to the organization
	// POST /organization/{organization_id}/invitation
	// https://api.aiven.io/doc/#tag/Organizations/operation/OrganizationUserInvite
	OrganizationUserInvite(ctx context.Context, organizationId string, in *OrganizationUserInviteIn) error

	// OrganizationUserList list users of the organization
	// GET /organization/{organization_id}/user
	// https://api.aiven.io/doc/#tag/Users/operation/OrganizationUserList
	OrganizationUserList(ctx context.Context, organizationId string) ([]UserOut, error)

	// OrganizationUserPasswordReset reset the password of a managed user in the organization
	// POST /organization/{organization_id}/user/{member_user_id}/reset_password
	// https://api.aiven.io/doc/#tag/Users/operation/OrganizationUserPasswordReset
	OrganizationUserPasswordReset(ctx context.Context, organizationId string, memberUserId string) error

	// OrganizationUserRevokeToken revoke the token of a managed user in the organization
	// DELETE /organization/{organization_id}/user/{member_user_id}/access-token/{token_prefix}
	// https://api.aiven.io/doc/#tag/Users/operation/OrganizationUserRevokeToken
	OrganizationUserRevokeToken(ctx context.Context, organizationId string, memberUserId string, tokenPrefix string) error

	// OrganizationUserSet add or modify a user of the organization
	// PUT /organization/{organization_id}/user/{member_user_id}
	// https://api.aiven.io/doc/#tag/Users/operation/OrganizationUserSet
	OrganizationUserSet(ctx context.Context, organizationId string, memberUserId string) (*OrganizationUserSetOut, error)

	// OrganizationUserTokensList list tokens from an organization's member
	// GET /organization/{organization_id}/user/{member_user_id}/access-tokens
	// https://api.aiven.io/doc/#tag/Users/operation/OrganizationUserTokensList
	OrganizationUserTokensList(ctx context.Context, organizationId string, memberUserId string) ([]TokenOut, error)

	// OrganizationUserUpdate update details on a user of the organization
	// PATCH /organization/{organization_id}/user/{member_user_id}
	// https://api.aiven.io/doc/#tag/Users/operation/OrganizationUserUpdate
	OrganizationUserUpdate(ctx context.Context, organizationId string, memberUserId string, in *OrganizationUserUpdateIn) (*OrganizationUserUpdateOut, error)
}

type InvitationOut

type InvitationOut struct {
	CreateTime time.Time `json:"create_time"`
	ExpiryTime time.Time `json:"expiry_time"`
	InvitedBy  string    `json:"invited_by"`
	UserEmail  string    `json:"user_email"`
}

type OrganizationUserGetOut

type OrganizationUserGetOut struct {
	IsSuperAdmin     bool        `json:"is_super_admin"`
	JoinTime         time.Time   `json:"join_time"`
	LastActivityTime time.Time   `json:"last_activity_time"`
	UserId           string      `json:"user_id"`
	UserInfo         UserInfoOut `json:"user_info"`
}

type OrganizationUserHandler

type OrganizationUserHandler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(doer doer) OrganizationUserHandler

func (*OrganizationUserHandler) OrganizationUserAuthenticationMethodsList

func (h *OrganizationUserHandler) OrganizationUserAuthenticationMethodsList(ctx context.Context, organizationId string, memberUserId string) ([]AuthenticationMethodOut, error)

func (*OrganizationUserHandler) OrganizationUserDelete

func (h *OrganizationUserHandler) OrganizationUserDelete(ctx context.Context, organizationId string, memberUserId string) error

func (*OrganizationUserHandler) OrganizationUserGet

func (h *OrganizationUserHandler) OrganizationUserGet(ctx context.Context, organizationId string, memberUserId string) (*OrganizationUserGetOut, error)

func (*OrganizationUserHandler) OrganizationUserInvitationAccept

func (h *OrganizationUserHandler) OrganizationUserInvitationAccept(ctx context.Context, organizationId string, userEmail string, in *OrganizationUserInvitationAcceptIn) error

func (*OrganizationUserHandler) OrganizationUserInvitationDelete

func (h *OrganizationUserHandler) OrganizationUserInvitationDelete(ctx context.Context, organizationId string, userEmail string) error

func (*OrganizationUserHandler) OrganizationUserInvitationsList

func (h *OrganizationUserHandler) OrganizationUserInvitationsList(ctx context.Context, organizationId string) ([]InvitationOut, error)

func (*OrganizationUserHandler) OrganizationUserInvite

func (h *OrganizationUserHandler) OrganizationUserInvite(ctx context.Context, organizationId string, in *OrganizationUserInviteIn) error

func (*OrganizationUserHandler) OrganizationUserList

func (h *OrganizationUserHandler) OrganizationUserList(ctx context.Context, organizationId string) ([]UserOut, error)

func (*OrganizationUserHandler) OrganizationUserPasswordReset

func (h *OrganizationUserHandler) OrganizationUserPasswordReset(ctx context.Context, organizationId string, memberUserId string) error

func (*OrganizationUserHandler) OrganizationUserRevokeToken

func (h *OrganizationUserHandler) OrganizationUserRevokeToken(ctx context.Context, organizationId string, memberUserId string, tokenPrefix string) error

func (*OrganizationUserHandler) OrganizationUserSet

func (h *OrganizationUserHandler) OrganizationUserSet(ctx context.Context, organizationId string, memberUserId string) (*OrganizationUserSetOut, error)

func (*OrganizationUserHandler) OrganizationUserTokensList

func (h *OrganizationUserHandler) OrganizationUserTokensList(ctx context.Context, organizationId string, memberUserId string) ([]TokenOut, error)

func (*OrganizationUserHandler) OrganizationUserUpdate

func (h *OrganizationUserHandler) OrganizationUserUpdate(ctx context.Context, organizationId string, memberUserId string, in *OrganizationUserUpdateIn) (*OrganizationUserUpdateOut, error)

type OrganizationUserInvitationAcceptIn

type OrganizationUserInvitationAcceptIn struct {
	Action ActionType `json:"action,omitempty"`
}

type OrganizationUserInviteIn

type OrganizationUserInviteIn struct {
	UserEmail string `json:"user_email"`
}

type OrganizationUserSetOut

type OrganizationUserSetOut struct {
	IsSuperAdmin     bool        `json:"is_super_admin"`
	JoinTime         time.Time   `json:"join_time"`
	LastActivityTime time.Time   `json:"last_activity_time"`
	UserId           string      `json:"user_id"`
	UserInfo         UserInfoOut `json:"user_info"`
}

type OrganizationUserUpdateIn

type OrganizationUserUpdateIn struct {
	City         string    `json:"city,omitempty"`
	Country      string    `json:"country,omitempty"`
	Department   string    `json:"department,omitempty"`
	IsSuperAdmin *bool     `json:"is_super_admin,omitempty"`
	JobTitle     string    `json:"job_title,omitempty"`
	RealName     string    `json:"real_name,omitempty"`
	State        StateType `json:"state,omitempty"`
}

type OrganizationUserUpdateOut

type OrganizationUserUpdateOut struct {
	IsSuperAdmin     bool        `json:"is_super_admin"`
	JoinTime         time.Time   `json:"join_time"`
	LastActivityTime time.Time   `json:"last_activity_time"`
	UserId           string      `json:"user_id"`
	UserInfo         UserInfoOut `json:"user_info"`
}

type StateType

type StateType string
const (
	StateTypeActive      StateType = "active"
	StateTypeDeactivated StateType = "deactivated"
	StateTypeDeleted     StateType = "deleted"
)

type TokenOut

type TokenOut struct {
	Description   string    `json:"description"`
	LastIp        string    `json:"last_ip"`
	LastUsedTime  time.Time `json:"last_used_time"`
	LastUserAgent string    `json:"last_user_agent"`
	TokenPrefix   string    `json:"token_prefix"`
}

type UserInfoOut

type UserInfoOut struct {
	City                   string    `json:"city,omitempty"`
	Country                string    `json:"country,omitempty"`
	CreateTime             time.Time `json:"create_time"`
	Department             string    `json:"department,omitempty"`
	IsApplicationUser      bool      `json:"is_application_user"`
	JobTitle               string    `json:"job_title,omitempty"`
	ManagedByScim          bool      `json:"managed_by_scim"`
	ManagingOrganizationId string    `json:"managing_organization_id,omitempty"`
	RealName               string    `json:"real_name"`
	State                  string    `json:"state"`
	UserEmail              string    `json:"user_email"`
}

type UserOut

type UserOut struct {
	IsSuperAdmin     bool        `json:"is_super_admin"`
	JoinTime         time.Time   `json:"join_time"`
	LastActivityTime time.Time   `json:"last_activity_time"`
	UserId           string      `json:"user_id"`
	UserInfo         UserInfoOut `json:"user_info"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL