organizationuser

package
v0.59.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionTypeChoices

func ActionTypeChoices() []string

func OrganizationUserStateTypeChoices added in v0.3.0

func OrganizationUserStateTypeChoices() []string

Types

type ActionType

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

type AuthenticationMethodOut

type AuthenticationMethodOut struct {
	IsEnabled2Fa     *bool      `json:"is_enabled_2fa,omitempty"`    // Verifies if 2FA is enabled for the user
	LastUsedTime     *time.Time `json:"last_used_time,omitempty"`    // Last activity time with the authentication method
	LocalProviderId  *string    `json:"local_provider_id,omitempty"` // Local authentication method provider resource ID
	MethodId         *string    `json:"method_id,omitempty"`         // User authentication method ID
	Name             *string    `json:"name,omitempty"`              // Name of the organization authentication method
	OrganizationId   *string    `json:"organization_id,omitempty"`   // Organization ID
	RemoteProviderId string     `json:"remote_provider_id"`          // Remote authentication method provider ID
	Type             *string    `json:"type,omitempty"`              // Type of the organization authentication method
	UserEmail        *string    `json:"user_email,omitempty"`        // User's email address for the authentication method
	UserId           *string    `json:"user_id,omitempty"`           // User ID
}

type Handler

type Handler interface {
	// OrganizationUserAuthenticationMethodsList list authentication methods for a user in the organization
	// GET /v1/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 /v1/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 /v1/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 /v1/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 /v1/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 /v1/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 /v1/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 /v1/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 /v1/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 /v1/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

	// OrganizationUserTokensList list tokens from an organization's member
	// GET /v1/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 /v1/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"` // Time of creating the invitation
	ExpiryTime time.Time `json:"expiry_time"` // By when the invitation is valid
	InvitedBy  string    `json:"invited_by"`  // Name of the invitation creator
	UserEmail  string    `json:"user_email"`  // User Email
}

type OrganizationUserGetOut

type OrganizationUserGetOut struct {
	IsSuperAdmin     bool        `json:"is_super_admin"`     // Super admin state of the organization user
	JoinTime         time.Time   `json:"join_time"`          // Join time
	LastActivityTime time.Time   `json:"last_activity_time"` // Last activity time
	UserId           string      `json:"user_id"`            // User ID
	UserInfo         UserInfoOut `json:"user_info"`          // OrganizationUserInfo
}

OrganizationUserGetOut OrganizationUserGetResponse

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) 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"` // Action to be performed on the invitation
}

OrganizationUserInvitationAcceptIn OrganizationUserInvitationAcceptRequestBody

type OrganizationUserInviteIn

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

OrganizationUserInviteIn OrganizationUserInviteRequestBody

type OrganizationUserStateType added in v0.3.0

type OrganizationUserStateType string
const (
	OrganizationUserStateTypeActive      OrganizationUserStateType = "active"
	OrganizationUserStateTypeDeactivated OrganizationUserStateType = "deactivated"
	OrganizationUserStateTypeDeleted     OrganizationUserStateType = "deleted"
)

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"` // Alters super admin state of the organization user
	JobTitle     *string                   `json:"job_title,omitempty"`      // Job Title
	RealName     *string                   `json:"real_name,omitempty"`      // Real Name
	State        OrganizationUserStateType `json:"state,omitempty"`          // State of the user in the organization
}

OrganizationUserUpdateIn OrganizationUserUpdateRequestBody

type OrganizationUserUpdateOut

type OrganizationUserUpdateOut struct {
	IsSuperAdmin     bool        `json:"is_super_admin"`     // Super admin state of the organization user
	JoinTime         time.Time   `json:"join_time"`          // Join time
	LastActivityTime time.Time   `json:"last_activity_time"` // Last activity time
	UserId           string      `json:"user_id"`            // User ID
	UserInfo         UserInfoOut `json:"user_info"`          // OrganizationUserInfo
}

OrganizationUserUpdateOut OrganizationUserUpdateResponse

type TokenOut

type TokenOut struct {
	Description   string    `json:"description"`
	LastIp        string    `json:"last_ip"`         // Last-used IP
	LastUsedTime  time.Time `json:"last_used_time"`  // Last-used time
	LastUserAgent string    `json:"last_user_agent"` // Last-used user agent
	TokenPrefix   string    `json:"token_prefix"`    // Token prefix
}

type UserInfoOut

type UserInfoOut struct {
	City                   *string   `json:"city,omitempty"`
	Country                *string   `json:"country,omitempty"`
	CreateTime             time.Time `json:"create_time"` // Creation time
	Department             *string   `json:"department,omitempty"`
	IsApplicationUser      bool      `json:"is_application_user"`                // Is Application User
	JobTitle               *string   `json:"job_title,omitempty"`                // Job Title
	ManagedByScim          bool      `json:"managed_by_scim"`                    // Managed By Scim
	ManagingOrganizationId *string   `json:"managing_organization_id,omitempty"` // Managing Organization ID
	RealName               string    `json:"real_name"`                          // Real Name
	State                  string    `json:"state"`
	UserEmail              string    `json:"user_email"` // User Email
}

UserInfoOut OrganizationUserInfo

type UserOut

type UserOut struct {
	IsSuperAdmin     bool        `json:"is_super_admin"`     // Super admin state of the organization user
	JoinTime         time.Time   `json:"join_time"`          // Join time
	LastActivityTime time.Time   `json:"last_activity_time"` // Last activity time
	UserId           string      `json:"user_id"`            // User ID
	UserInfo         UserInfoOut `json:"user_info"`          // OrganizationUserInfo
}

Jump to

Keyboard shortcuts

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