user

package
v1.1.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsUserUpToDate added in v1.0.10

func IsUserUpToDate(params v1alpha1.UserParameters, observed ionosdk.User, observedGroups []string) bool

IsUserUpToDate returns true if the User is up-to-date or false otherwise.

Types

type Client

type Client interface {
	GetUser(ctx context.Context, id string) (ionosdk.User, *ionosdk.APIResponse, error)
	CreateUser(ctx context.Context, p v1alpha1.UserParameters) (ionosdk.User, *ionosdk.APIResponse, error)
	UpdateUser(ctx context.Context, id string, p v1alpha1.UserParameters) (ionosdk.User, *ionosdk.APIResponse, error)
	DeleteUser(ctx context.Context, id string) (*ionosdk.APIResponse, error)
	AddUserToGroup(ctx context.Context, groupID string, userID string) (ionosdk.User, *ionosdk.APIResponse, error)
	DeleteUserFromGroup(ctx context.Context, groupID string, userID string) error
	UpdateUserGroups(ctx context.Context, userID string, observedGroupIDs, configuredGroupIDs []string) error
	GetUserGroups(ctx context.Context, userID string) ([]string, error)
	GetAPIClient() *ionosdk.APIClient
}

Client wraps the ionoscloud api for the user. Currently used for mocking the interaction with the client.

func NewAPIClient

func NewAPIClient(svc *clients.IonosServices, fn requestWaiter) Client

NewAPIClient returns a new client.

Jump to

Keyboard shortcuts

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