users

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 3 Imported by: 1

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.

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 GetUser

func GetUser(client *golangsdk.ServiceClient, id string) (*User, error)

func ModifyUser

func ModifyUser(client *golangsdk.ServiceClient, id string, opts UpdateOpts) (*User, error)

Jump to

Keyboard shortcuts

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