Documentation
¶
Index ¶
- func Create(c *golangsdk.ServiceClient, opts CreateOpts) error
- func Delete(c *golangsdk.ServiceClient, groupId string) error
- func DoAction(client *golangsdk.ServiceClient, groupId string, opts ActionOpts) error
- func Update(c *golangsdk.ServiceClient, opts UpdateOpts) error
- type ActionOpts
- type CreateOpts
- type ListOpts
- type ListUserOpts
- type UpdateOpts
- type User
- type UserGroup
- type UserGroupPage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(c *golangsdk.ServiceClient, opts CreateOpts) error
Create is a method to create a user group using given parameters.
func Delete ¶
func Delete(c *golangsdk.ServiceClient, groupId string) error
Delete is a method to remove an existing user group using given parameters.
func DoAction ¶
func DoAction(client *golangsdk.ServiceClient, groupId string, opts ActionOpts) error
DoAction is a method of add users to or remove users from user group using given parameters.
func Update ¶
func Update(c *golangsdk.ServiceClient, opts UpdateOpts) error
Update is a method to change user group information using given parameters.
Types ¶
type ActionOpts ¶
type ActionOpts struct { // The user ID to be added or removed from the user group. UserIDs []string `json:"user_ids" required:"true"` // The operation type. The valid types are as following: // ADD: Add user // DELETE: Delete user Type string `json:"op_type" required:"true"` }
ActionOpts is the structure required by the DoAction method of add users to or remove users from user group.
type CreateOpts ¶
type CreateOpts struct { // The name of user group. Name string `json:"group_name" required:"true"` // The type of user group. The valid types are as following: // AD: AD domain user group // LOCAL: Local liteAs user group Type string `json:"platform_type" required:"true"` // The description of user group. Description string `json:"description,omitempty"` }
CreateOpts is the structure required by the Create method to create a new user group.
type ListOpts ¶
type ListOpts struct { // Search keywords used to match user groups. For example, fuzzy queries based on user group names. Keyword string `q:"keyword"` // Number of records to be queried. // Valid range is 0-100. Limit int `q:"limit"` // The offset number. Offset int `q:"offset"` }
ListOpts is the structure required by the List method to query user group list.
type ListUserOpts ¶
type ListUserOpts struct { // The ID of user. Name string `q:"user_name"` // The description of user. Description string `q:"description"` // The activation type of user. The valid types are as following: // USER_ACTIVATE: User activation // ADMIN_ACTIVATE: Administrator activation Type string `q:"active_type"` // Number of records to be queried. // Valid range is 0-2000. Limit int `q:"limit"` // The offset number. Offset int `q:"offset"` }
ListUserOpts is the structure required by the ListUser method to query all user information under a user group.
type UpdateOpts ¶
type UpdateOpts struct { // The ID of user group. GroupID string `json:"-" required:"true"` // The name of user group. Name string `json:"group_name,omitempty"` // The description of user group. Description *string `json:"description,omitempty"` }
UpdateOpts is the structure required by the Update method to change user group information.
type User ¶
type User struct { // The ID of user. ID string `json:"id"` // The name of user. Name string `json:"user_name"` // The email of user. Email string `json:"user_email"` // The phone of user. Phone string `json:"user_phone"` // The description of user . Description string `json:"description"` // The number of desktops the user has. TotalDesktops int `json:"total_desktops"` }
User is the structure that represents the user detail under a user group.
func ListUser ¶
func ListUser(c *golangsdk.ServiceClient, groupId string, opts ListUserOpts) ([]User, error)
ListUser is a method to query all user information under a user group using given parameters.
type UserGroup ¶
type UserGroup struct { // The ID of user group. ID string `json:"id"` // The name of user group. Name string `json:"name"` // The type of user group. Type string `json:"platform_type"` // The description of user group. Description string `json:"description"` // The creation time of user group. CreatedAt string `json:"create_time"` // The number of users in the user group. UserQuantity int `json:"user_quantity"` // The domain ID of the user group. RealmID string `json:"realm_id"` // The specific name of user group. GroupDN string `json:"group_dn"` // The domain name of the user group. Domain string `json:"domain"` // The sID of user group. SID string `json:"sid"` // The number of desktops owned by all users in the user group. TotalDesktops int `json:"total_desktops"` }
UserGroup is the structure that represents the user group detail.
func ExtractUserGroupPages ¶
func ExtractUserGroupPages(r pagination.Page) ([]UserGroup, error)
ExtractUserGroupPages is a method to extract the list of user group details.
type UserGroupPage ¶
type UserGroupPage struct {
pagination.OffsetPageBase
}
UserGroupPage represents the response pages of the List method.
func (UserGroupPage) IsEmpty ¶
func (b UserGroupPage) IsEmpty() (bool, error)
IsEmpty method checks whether the current user group page is empty.