usergroup

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OperationTypeChoices

func OperationTypeChoices() []string

Types

type Handler

type Handler interface {
	// UserGroupCreate create a group
	// POST /organization/{organization_id}/user-groups
	// https://api.aiven.io/doc/#tag/Groups/operation/UserGroupCreate
	UserGroupCreate(ctx context.Context, organizationId string, in *UserGroupCreateIn) (*UserGroupCreateOut, error)

	// UserGroupDelete delete a group
	// DELETE /organization/{organization_id}/user-groups/{user_group_id}
	// https://api.aiven.io/doc/#tag/Groups/operation/UserGroupDelete
	UserGroupDelete(ctx context.Context, organizationId string, userGroupId string) error

	// UserGroupGet retrieve a group
	// GET /organization/{organization_id}/user-groups/{user_group_id}
	// https://api.aiven.io/doc/#tag/Groups/operation/UserGroupGet
	UserGroupGet(ctx context.Context, organizationId string, userGroupId string) (*UserGroupGetOut, error)

	// UserGroupMemberList list group members
	// GET /organization/{organization_id}/user-groups/{user_group_id}/members
	// https://api.aiven.io/doc/#tag/Groups/operation/UserGroupMemberList
	UserGroupMemberList(ctx context.Context, organizationId string, userGroupId string) ([]MemberOut, error)

	// UserGroupMembersUpdate add or remove group members
	// PATCH /organization/{organization_id}/user-groups/{user_group_id}/members
	// https://api.aiven.io/doc/#tag/Groups/operation/UserGroupMembersUpdate
	UserGroupMembersUpdate(ctx context.Context, organizationId string, userGroupId string, in *UserGroupMembersUpdateIn) error

	// UserGroupUpdate update a group
	// PATCH /organization/{organization_id}/user-groups/{user_group_id}
	// https://api.aiven.io/doc/#tag/Groups/operation/UserGroupUpdate
	UserGroupUpdate(ctx context.Context, organizationId string, userGroupId string, in *UserGroupUpdateIn) (*UserGroupUpdateOut, error)

	// UserGroupsList list groups
	// GET /organization/{organization_id}/user-groups
	// https://api.aiven.io/doc/#tag/Groups/operation/UserGroupsList
	UserGroupsList(ctx context.Context, organizationId string) ([]UserGroupOut, error)
}

type MemberOut

type MemberOut struct {
	LastActivityTime *time.Time  `json:"last_activity_time,omitempty"`
	UserId           string      `json:"user_id"`
	UserInfo         UserInfoOut `json:"user_info"`
}

type OperationType

type OperationType string
const (
	OperationTypeAddMembers    OperationType = "add_members"
	OperationTypeRemoveMembers OperationType = "remove_members"
)

type UserGroupCreateIn

type UserGroupCreateIn struct {
	Description   string `json:"description"`
	UserGroupName string `json:"user_group_name"`
}

type UserGroupCreateOut

type UserGroupCreateOut struct {
	CreateTime    time.Time `json:"create_time"`
	Description   string    `json:"description"`
	UpdateTime    time.Time `json:"update_time"`
	UserGroupId   string    `json:"user_group_id"`
	UserGroupName string    `json:"user_group_name"`
}

type UserGroupGetOut

type UserGroupGetOut struct {
	CreateTime    time.Time `json:"create_time"`
	Description   string    `json:"description"`
	UpdateTime    time.Time `json:"update_time"`
	UserGroupId   string    `json:"user_group_id"`
	UserGroupName string    `json:"user_group_name"`
}

type UserGroupHandler

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

func NewHandler

func NewHandler(doer doer) UserGroupHandler

func (*UserGroupHandler) UserGroupCreate

func (h *UserGroupHandler) UserGroupCreate(ctx context.Context, organizationId string, in *UserGroupCreateIn) (*UserGroupCreateOut, error)

func (*UserGroupHandler) UserGroupDelete

func (h *UserGroupHandler) UserGroupDelete(ctx context.Context, organizationId string, userGroupId string) error

func (*UserGroupHandler) UserGroupGet

func (h *UserGroupHandler) UserGroupGet(ctx context.Context, organizationId string, userGroupId string) (*UserGroupGetOut, error)

func (*UserGroupHandler) UserGroupMemberList

func (h *UserGroupHandler) UserGroupMemberList(ctx context.Context, organizationId string, userGroupId string) ([]MemberOut, error)

func (*UserGroupHandler) UserGroupMembersUpdate

func (h *UserGroupHandler) UserGroupMembersUpdate(ctx context.Context, organizationId string, userGroupId string, in *UserGroupMembersUpdateIn) error

func (*UserGroupHandler) UserGroupUpdate

func (h *UserGroupHandler) UserGroupUpdate(ctx context.Context, organizationId string, userGroupId string, in *UserGroupUpdateIn) (*UserGroupUpdateOut, error)

func (*UserGroupHandler) UserGroupsList

func (h *UserGroupHandler) UserGroupsList(ctx context.Context, organizationId string) ([]UserGroupOut, error)

type UserGroupMembersUpdateIn

type UserGroupMembersUpdateIn struct {
	MemberIds []string      `json:"member_ids"`
	Operation OperationType `json:"operation"`
}

type UserGroupOut

type UserGroupOut struct {
	CreateTime    time.Time `json:"create_time"`
	Description   string    `json:"description"`
	MemberCount   int       `json:"member_count"`
	UpdateTime    time.Time `json:"update_time"`
	UserGroupId   string    `json:"user_group_id"`
	UserGroupName string    `json:"user_group_name"`
}

type UserGroupUpdateIn

type UserGroupUpdateIn struct {
	Description   string `json:"description,omitempty"`
	UserGroupName string `json:"user_group_name,omitempty"`
}

type UserGroupUpdateOut

type UserGroupUpdateOut struct {
	CreateTime    time.Time `json:"create_time"`
	Description   string    `json:"description"`
	UpdateTime    time.Time `json:"update_time"`
	UserGroupId   string    `json:"user_group_id"`
	UserGroupName string    `json:"user_group_name"`
}

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"`
}

Jump to

Keyboard shortcuts

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