Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateOpts ¶
type CreateOpts struct { // Name is the name of the new user. Name string `json:"name" required:"true"` // DomainID is the ID of the domain the user belongs to. DomainID string `json:"domain_id" required:"true"` // Password is the password of the new user. Password string `json:"password,omitempty"` // Email address with a maximum of 255 characters Email string `json:"email,omitempty"` // AreaCode is a country code, must be used together with Phone. AreaCode string `json:"areacode,omitempty"` // Phone is a mobile number with a maximum of 32 digits, must be used together with AreaCode. Phone string `json:"phone,omitempty"` // Description is a description of the user. Description string `json:"description,omitempty"` // AccessMode is the access type for IAM user AccessMode string `json:"access_mode,omitempty"` // Enabled sets the user status to enabled or disabled. Enabled *bool `json:"enabled,omitempty"` // PasswordReset Indicates whether password reset is required at the first login. // By default, password reset is true. PasswordReset *bool `json:"pwd_status,omitempty"` }
CreateOpts provides options used to create a user.
func (CreateOpts) ToUserCreateMap ¶
func (opts CreateOpts) ToUserCreateMap() (map[string]interface{}, error)
ToUserCreateMap formats a CreateOpts into a create request.
type CreateOptsBuilder ¶
CreateOptsBuilder allows extensions to add additional parameters to the Create request.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult is the response from a Create operation. Call its Extract method to interpret it as a User.
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create creates a new User.
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult is the response from a Get operation. Call its Extract method to interpret it as a User.
type UpdateOpts ¶
type UpdateOpts struct { // Name is the name of the new user. Name string `json:"name,omitempty"` // Password is the password of the new user. Password string `json:"password,omitempty"` // Email address with a maximum of 255 characters Email string `json:"email,omitempty"` // AreaCode is a country code, must be used together with Phone. AreaCode string `json:"areacode,omitempty"` // Phone is a mobile number with a maximum of 32 digits. must be used together with AreaCode. Phone string `json:"phone,omitempty"` // Description is a description of the user. Description string `json:"description,omitempty"` // AccessMode is the access type for IAM user AccessMode string `json:"access_mode,omitempty"` // Enabled sets the user status to enabled or disabled. Enabled *bool `json:"enabled,omitempty"` // PasswordReset Indicates whether password reset is required PasswordReset *bool `json:"pwd_status,omitempty"` }
UpdateOpts provides options for updating a user account.
func (UpdateOpts) ToUserUpdateMap ¶
func (opts UpdateOpts) ToUserUpdateMap() (map[string]interface{}, error)
ToUserUpdateMap formats a UpdateOpts into an update request.
type UpdateOptsBuilder ¶
UpdateOptsBuilder allows extensions to add additional parameters to the Update request.
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
UpdateResult is the response from an Update operation. Call its Extract method to interpret it as a User.
func Update ¶
func Update(client *golangsdk.ServiceClient, userID string, opts UpdateOptsBuilder) (r UpdateResult)
Update updates an existing User.
type User ¶
type User struct { ID string `json:"id"` DomainID string `json:"domain_id"` Name string `json:"name"` Email string `json:"email"` AreaCode string `json:"areacode"` Phone string `json:"phone"` Description string `json:"description"` AccessMode string `json:"access_mode"` Enabled bool `json:"enabled"` PasswordStatus bool `json:"pwd_status"` PasswordStrength string `json:"pwd_strength"` CreateAt string `json:"create_time"` UpdateAt string `json:"update_time"` LastLogin string `json:"last_login_time"` XuserID string `json:"xuser_id"` XuserType string `json:"xuser_type"` // Links contains referencing links to the user. Links map[string]interface{} `json:"links"` }
User represents a User in the OpenStack Identity Service.