usermanagementv2

package
v0.0.0-...-a3be206 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: Apache-2.0 Imports: 12 Imported by: 13

Documentation

Index

Constants

View Source
const ErrCodeAPICreation = "APICreationError"

ErrCodeAPICreation ...

Variables

This section is empty.

Functions

This section is empty.

Types

type GenericPaginatedResourcesHandler

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

func NewRCPaginatedResources

func NewRCPaginatedResources(resource interface{}) GenericPaginatedResourcesHandler

func (GenericPaginatedResourcesHandler) Resources

func (pr GenericPaginatedResourcesHandler) Resources(bytes []byte, curURL string) ([]interface{}, string, error)

type InfraPermissions

type InfraPermissions struct {
	Permissions []string `json:"permissions"`
}

InfraPermissions ...

type OrgRole

type OrgRole struct {
	Users           []string `json:"users"`
	Region          string   `json:"region"`
	Auditors        []string `json:"auditors,omitempty"`
	Managers        []string `json:"managers,omitempty"`
	BillingManagers []string `json:"billing_managers,omitempty"`
	ID              string   `json:"id"`
	Spaces          []Space  `json:"spaces"`
}

OrgRole ...

type Space

type Space struct {
	ID         string   `json:"id"`
	Managers   []string `json:"managers,omitempty"`
	Developers []string `json:"developers,omitempty"`
	Auditors   []string `json:"auditors,omitempty" `
}

Space ...

type User

type User struct {
	Email       string `json:"email"`
	AccountRole string `json:"account_role"`
}

User ...

type UserInfo

type UserInfo struct {
	ID             string `json:"id"`
	IamID          string `json:"iam_id"`
	Realm          string `json:"realm"`
	UserID         string `json:"user_id"`
	Firstname      string `json:"firstname"`
	Lastname       string `json:"lastname"`
	State          string `json:"state"`
	Email          string `json:"email"`
	Phonenumber    string `json:"phonenumber"`
	Altphonenumber string `json:"altphonenumber"`
	Photo          string `json:"photo"`
	AccountID      string `json:"account_id"`
}

UserInfo contains user info

type UserInvite

type UserInvite struct {
	Users               []User            `json:"users"`
	IAMPolicy           []UserPolicy      `json:"iam_policy,omitempty"`
	AccessGroup         []string          `json:"access_groups,omitempty"`
	InfrastructureRoles *InfraPermissions `json:"infrastructure_roles,omitempty"`
	OrganizationRoles   []OrgRole         `json:"organization_roles,omitempty"`
}

UserInvite ...

type UserManagementAPI

type UserManagementAPI interface {
	UserInvite() Users
}

UserManagementAPI is the resource client ...

func New

func New(sess *session.Session) (UserManagementAPI, error)

New ...

type UserPolicy

type UserPolicy struct {
	Type      string              `json:"type"`
	Roles     []iampapv1.Role     `json:"roles"`
	Resources []iampapv1.Resource `json:"resources"`
}

UserPolicy ...

type UserSettingOptions

type UserSettingOptions struct {

	//The console UI language
	Language string `json:"language"`

	//The language for email and phone notifications.
	NotificationLanguage string `json:"notification_language"`

	//The IP addresses listed here are the only ones from which this user can log in to IBM Cloud.
	AllowedIPAddresses string `json:"allowed_ip_addresses"`

	//Whether user-managed login is enabled.
	SelfManage bool `json:"self_manage"`
}

UserSettings ...

type Users

type Users interface {
	//GetUsers returns users in the first page alone
	GetUsers(ibmUniqueID string) (UsersList, error)
	//ListUsers returns all the users in the account
	ListUsers(ibmUniqueID string) ([]UserInfo, error)
	GetUserProfile(ibmUniqueID string, userID string) (UserInfo, error)
	InviteUsers(ibmUniqueID string, users UserInvite) (UserInvite, error)
	UpdateUserProfile(ibmUniqueID string, userID string, user UserInfo) error
	RemoveUsers(ibmUniqueID string, userID string) error
	GetUserSettings(accountID string, iamID string) (UserSettingOptions, error)
	//Same patch request is being used to create, update and delete
	ManageUserSettings(accountID string, iamID string, userSettings UserSettingOptions) (UserSettingOptions, error)
}

Users ...

func NewUserInviteHandler

func NewUserInviteHandler(c *client.Client) Users

NewUsers

type UsersList

type UsersList struct {
	TotalUsers int        `json:"total_results"`
	Limit      int        `json:"limit"`
	FistURL    string     `json:"fist_url"`
	Resources  []UserInfo `json:"resources"`
}

UsersList to get list of users

Jump to

Keyboard shortcuts

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