assignments

package
v0.0.0-...-63319d1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MPL-2.0, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatchDelete

func BatchDelete(c *golangsdk.ServiceClient, opts DeleteOpts) error

BatchDelete is a method to revoke administrator roles for all accounts.

func Create

func Create(c *golangsdk.ServiceClient, opts CreateOpts) error

Create is a method to assign the administrator role for an account.

Types

type Administrator

type Administrator struct {
	// User account.
	Account string `json:"account"`
	// User ID.
	ID string `json:"id"`
	// User name.
	Name string `json:"name"`
	// Administrator type.
	//   0: normal administrator.
	//   1: default administrator.
	AdminType int `json:"adminType"`
	// Country or region.
	Country string `json:"country"`
	// Department details.
	Department Department `json:"dept"`
	// Email address.
	Email string `json:"emial"`
	// Phone number.
	Phone string `json:"phone"`
}

Administrator is the structure that represents the detail of the administrator account.

func Get

func Get(c *golangsdk.ServiceClient, opts GetOpts) (*Administrator, error)

Get is a method to query the details of the role assignment.

type CreateOpts

type CreateOpts struct {
	// Account type.
	//   0: HUAWEI CLOUD conference account. Used for account/password authentication.
	//   1: Third-party User ID, used for App ID authentication.
	// default 0
	AccountType int `json:"-"`
	// account account.
	// If it is an account/password authentication method, it refers to the HUAWEI CLOUD conference account.
	// If it is the App ID authentication method, it refers to the third-party User ID.
	Account string `json:"account" required:"true"`
	// Authorization token.
	Token string `json:"-" required:"true"`
}

CreateOpts is the structure required by the Create method to assign the administrator role for an account.

type DeleteOpts

type DeleteOpts struct {
	// Account type.
	//   0: HUAWEI CLOUD conference account. Used for account/password authentication.
	//   1: Third-party User ID, used for App ID authentication.
	// default 0
	AccountType int `q:"accountType"`
	// Authorization token.
	Token string `json:"-"`
	// List of user account.
	Accounts []string `json:"-"`
}

DeleteOpts is the structure used to build the query path and authorization.

type Department

type Department struct {
	// Corporation ID.
	CorpId string `json:"corpId"`
	// Department code.
	Code string `json:"deptCode"`
	// Department name.
	Name string `json:"deptName"`
	// Department path.
	NamePath string `json:"deptNamePath"`
	// Parent department code.
	ParentCode string `json:"parentDeptCode"`
}

Department is the structure that represents the detail of the department.

type ErrResponse

type ErrResponse struct {
	// Error code.
	Code string `json:"error_code"`
	// Error message.
	Message string `json:"error_msg"`
}

ErrResponse is the structure that represents the request error.

type GetOpts

type GetOpts struct {
	// Account type.
	//   0: HUAWEI CLOUD conference account. Used for account/password authentication.
	//   1: Third-party User ID, used for App ID authentication.
	// default 0
	AccountType int `q:"accountType"`
	// account account.
	// If it is an account/password authentication method, it refers to the HUAWEI CLOUD conference account.
	// If it is the App ID authentication method, it refers to the third-party User ID.
	Account string `json:"-" required:"true"`
	// Authorization token.
	Token string `json:"-" required:"true"`
}

GetOpts is the structure used to build the query path and authorization.

type QueryOpts

type QueryOpts struct {
	// Account type.
	//   0: HUAWEI CLOUD conference account. Used for account/password authentication.
	//   1: Third-party User ID, used for App ID authentication.
	// default 0
	AccountType int `q:"accountType"`
}

QueryOpts is the structure used to build the query path.

Jump to

Keyboard shortcuts

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