organizations

package
v0.5.20 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Auth

type Auth struct {
	// User ID, which needs to be obtained from the IAM service.
	UserID string `json:"user_id"`
	// Username, which needs to be obtained from the IAM service.
	Username string `json:"user_name"`
	// User permission that is configured. The value can be 1, 3, or 7. 7: manage 3: write 1: read
	Auth int `json:"auth"`
}

type CreateOpts

type CreateOpts struct {
	Namespace string `json:"namespace"`
}

func (CreateOpts) ToNamespaceCreateMap

func (opts CreateOpts) ToNamespaceCreateMap() (map[string]interface{}, error)

type CreateOptsBuilder

type CreateOptsBuilder interface {
	ToNamespaceCreateMap() (map[string]interface{}, error)
}

type CreatePermissionsOpts

type CreatePermissionsOpts Auth

func (CreatePermissionsOpts) ToPermissionCreateMap

func (opts CreatePermissionsOpts) ToPermissionCreateMap() (map[string]interface{}, error)

type CreatePermissionsOptsBuilder

type CreatePermissionsOptsBuilder interface {
	ToPermissionCreateMap() (map[string]interface{}, error)
}

type CreatePermissionsResult

type CreatePermissionsResult struct {
	golangsdk.ErrResult
}

func CreatePermissions

func CreatePermissions(client *golangsdk.ServiceClient, organization string, opts CreatePermissionsOptsBuilder) (r CreatePermissionsResult)

type CreateResult

type CreateResult struct {
	golangsdk.ErrResult
}

func Create

func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)

type DeletePermissionsResult

type DeletePermissionsResult struct {
	golangsdk.ErrResult
}

func DeletePermissions

func DeletePermissions(client *golangsdk.ServiceClient, organization string, userID string) (r DeletePermissionsResult)

type DeleteResult

type DeleteResult struct {
	golangsdk.ErrResult
}

func Delete

func Delete(client *golangsdk.ServiceClient, id string) (r DeleteResult)

type GetPermissionsResult

type GetPermissionsResult struct {
	golangsdk.Result
}

func GetPermissions

func GetPermissions(client *golangsdk.ServiceClient, organization string) (r GetPermissionsResult)

func (GetPermissionsResult) Extract

type GetResult

type GetResult struct {
	golangsdk.Result
}

func Get

func Get(client *golangsdk.ServiceClient, id string) (r GetResult)

func (GetResult) Extract

func (r GetResult) Extract() (*Organization, error)

type ListOpts

type ListOpts struct {
	Namespace string `q:"namespace"`
}

func (ListOpts) ToNamespaceListQuery

func (opts ListOpts) ToNamespaceListQuery() (string, error)

type ListOptsBuilder

type ListOptsBuilder interface {
	ToNamespaceListQuery() (string, error)
}

type ListResult

type ListResult struct {
	golangsdk.Result
}

type Organization

type Organization struct {
	ID          int    `json:"id"`
	Name        string `json:"name"`
	CreatorName string `json:"creator_name"`
	// Auth - user permission. The value can be `7`: manage, `3`: write, `1`: read
	Auth int `json:"auth"`
}

func ExtractOrganizations

func ExtractOrganizations(p pagination.Page) ([]Organization, error)

type OrganizationPage

type OrganizationPage struct {
	pagination.SinglePageBase
}

type OrganizationPermissions

type OrganizationPermissions struct {
	ID          int    `json:"id"`
	Name        string `json:"name"`
	CreatorName string `json:"creator_name"`
	SelfAuth    Auth   `json:"self_auth"`
	OthersAuth  []Auth `json:"others_auths"`
}

type UpdatePermissionsOpts

type UpdatePermissionsOpts Auth

func (UpdatePermissionsOpts) ToPermissionUpdateMap

func (opts UpdatePermissionsOpts) ToPermissionUpdateMap() (map[string]interface{}, error)

type UpdatePermissionsOptsBuilder

type UpdatePermissionsOptsBuilder interface {
	ToPermissionUpdateMap() (map[string]interface{}, error)
}

type UpdatePermissionsResult

type UpdatePermissionsResult struct {
	golangsdk.ErrResult
}

func UpdatePermissions

func UpdatePermissions(client *golangsdk.ServiceClient, organization string, opts UpdatePermissionsOptsBuilder) (r UpdatePermissionsResult)

Jump to

Keyboard shortcuts

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