Documentation
¶
Index ¶
- type CreateOpts
- type UpdateAdminOpts
- type UpdateOpts
- type User
- func CreateUser(client *golangsdk.ServiceClient, opts CreateOpts) (*User, error)
- func GetUser(client *golangsdk.ServiceClient, id string) (*User, error)
- func ModifyUser(client *golangsdk.ServiceClient, id string, opts UpdateOpts) (*User, error)
- func ModifyUserAdmin(client *golangsdk.ServiceClient, opts UpdateAdminOpts) (*User, error)
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.
type UpdateAdminOpts ¶ added in v0.9.4
type UpdateAdminOpts struct {
// Id is the IAM user ID
Id string `json:"-"`
// 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"`
// PwdStatus Indicates whether the user must change their password at the first login.
PwdStatus *bool `json:"pwd_status,omitempty"`
// XuserType is the type of the user in the external system.
XuserType string `json:"xuser_type"`
// XuserId is the ID of the user in the external system.
XuserId string `json:"xuser_id"`
}
UpdateAdminOpts provides options used to update user as administrator
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 at the first login.
// By default, password reset is true.
PasswordReset *bool `json:"pwd_status,omitempty"`
}
UpdateOpts provides options used to create a 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"`
PasswordExpiresAt string `json:"password_expires_at"`
IsDomainOwner bool `json:"is_domain_owner"`
CreateAt string `json:"create_time"`
UpdateAt string `json:"update_time"`
LastLogin string `json:"last_login_time"`
Status string `json:"status"`
XuserID string `json:"xuser_id"`
XuserType string `json:"xuser_type"`
}
User represents a User in the OpenStack Identity Service.
func CreateUser ¶
func CreateUser(client *golangsdk.ServiceClient, opts CreateOpts) (*User, error)
func ModifyUser ¶
func ModifyUser(client *golangsdk.ServiceClient, id string, opts UpdateOpts) (*User, error)
func ModifyUserAdmin ¶ added in v0.9.4
func ModifyUserAdmin(client *golangsdk.ServiceClient, opts UpdateAdminOpts) (*User, error)
Click to show internal directories.
Click to hide internal directories.