usermanagementv2

package
v0.0.0-...-e6eb724 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ErrCodeAPICreation = "APICreationError"

ErrCodeAPICreation ...

Variables

This section is empty.

Functions

This section is empty.

Types

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 Users

type Users interface {
	GetUsers(ibmUniqueID string) (UsersList, 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
}

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