Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateOpts ¶
type CreateOpts struct { // User name. Name string `json:"user_name" required:"true"` // User email. The value can contain from 1 to 64 characters. Email string `json:"user_email" required:"true"` // The expires time of Workspace user. The format is "yyyy-MM-ddTHH:mm:ss.000 Z". // 0 means it will never expire. AccountExpires string `json:"account_expires,omitempty"` // Whether to allow password modification. EnableChangePassword *bool `json:"enable_change_password,omitempty"` // Whether the next login requires a password reset. NextLoginChangePassword *bool `json:"next_login_change_password,omitempty"` // Group ID list. GroupIds []string `json:"group_ids,omitempty"` // User description. Description string `json:"description,omitempty"` // Alias name. Alias string `json:"alias_name,omitempty"` }
CreateOpts is the structure required by the Create method to create a new user.
type CreateResp ¶
type CreateResp struct {
RequestResp
}
CreateResp is the structure that represents the API response of Create method request.
func Create ¶
func Create(c *golangsdk.ServiceClient, opts CreateOpts) (*CreateResp, error)
Create is a method to create a user using given parameters.
type GetResp ¶
type GetResp struct {
UserDetail UserDetail `json:"user_detail"`
}
GetResp is the structure that represents the API response of Get method request.
type ListOpts ¶
type ListOpts struct { // User name. Name string `q:"user_name"` // User description, support fuzzing match. Description string `q:"description"` // Number of records to be queried. // If omited, return all user's information. Limit int `q:"limit"` // The offset number. Offset int `q:"offset"` }
ListOpts is the structure required by the List method to query user list.
type QueryResp ¶
type QueryResp struct { // Total number of users. TotalCount int `json:"total_count"` // User list. Users []User `json:"users"` }
QueryResp is the structure that represents the API response of List method request.
type RequestResp ¶
type RequestResp struct { // User ID. ID string `json:"id"` }
RequestResp is the structure that represents the API response of user methods request.
type UpdateOpts ¶
type UpdateOpts struct { // User email. The value can contain from 1 to 64 characters. Email string `json:"user_email" required:"true"` // User description. Description *string `json:"description,omitempty"` // The expires time of Workspace user. The format is "yyyy-MM-ddTHH:mm:ss.000Z". // 0 means it will never expire. AccountExpires string `json:"account_expires,omitempty"` // Whether to allow password modification. EnableChangePassword *bool `json:"enable_change_password,omitempty"` // Whether the next login requires a password reset. NextLoginChangePassword *bool `json:"next_login_change_password,omitempty"` // Whether the password will never expires. PasswordNeverExpires *bool `json:"password_never_expired,omitempty"` // Whether the account is disabled. Disabled *bool `json:"disabled,omitempty"` }
UpdateOpts is the structure required by the Update method to change user information.
type UpdateResp ¶
type UpdateResp struct {
RequestResp
}
UpdateResp is the structure that represents the API response of Update method request.
func Update ¶
func Update(c *golangsdk.ServiceClient, userId string, opts UpdateOpts) (*UpdateResp, error)
Update is a method to change user informaion using givin parameters.
type User ¶
type User struct { // User ID. ID string `json:"id"` // User name. Name string `json:"user_name"` // User email. Email string `json:"user_email"` // The number of desktops the user has. TotalDesktops int `json:"total_desktops"` // Account expiration time, 0 means it will never expire. AccountExpires string `json:"account_expires"` // Whether the account has expired. AccountExpired bool `json:"account_expired"` // Whether the password will never expires. PasswordNeverExpires bool `json:"password_never_expired"` // Whether to allow password modification. EnableChangePassword bool `json:"enable_change_password"` // Whether the next login requires a password reset. NextLoginChangePassword bool `json:"next_login_change_password"` // User description. Description string `json:"description"` // Whether the account is locked. Locked bool `json:"locked"` // Whether the account is disabled. Disabled bool `json:"disabled"` }
User is an object to specified the some user information.
type UserDetail ¶
type UserDetail struct { // User ID. ID string `json:"id"` // User name. Name string `json:"user_name"` // User email. Email string `json:"user_email"` // User description. Description string `json:"description"` // User SID. SID string `json:"object_sid"` // Login account name (pre Windows). SamAccountName string `json:"sam_account_name"` // Login user name. UserPrincipalName string `json:"user_principal_name"` // Full name. FullName string `json:"full_name"` // Unique location of user on the domain tree. DistinguishedName string `json:"distinguished_name"` // Account type. AccountType int `json:"account_type"` // The character corresponding to the creation time and UTC time milliseconds. CreatedAt string `json:"when_created"` // UTC time corresponding to the last day of the account validity, in milliseconds. AccountExpires int `json:"account_expires"` // Whether the user is expired. UserExpired bool `json:"user_expired"` // Whether the account is locked. Locked bool `json:"locked"` // Whether to allow password modification. EnableChangePassword bool `json:"enable_change_password"` // Whether the password will never expires. PasswordNeverExpires bool `json:"password_never_expired"` // Whether the next login requires a password reset. NextLoginChangePassword bool `json:"next_login_change_password"` // Whether the account is disabled. Disabled bool `json:"disabled"` // Group name list. GroupNames []string `json:"group_names"` // The number of desktops the user has. TotalDesktops int `json:"total_desktops"` }
UserDetail is an object to specified the user details.
func Get ¶
func Get(c *golangsdk.ServiceClient, userId string) (*UserDetail, error)
Get is a method to obtain the user detail by its ID.