gophercloud: github.com/rackspace/gophercloud/rackspace/identity/v2/users Index | Files

package users

import "github.com/rackspace/gophercloud/rackspace/identity/v2/users"

Index

Package Files

delegate.go results.go urls.go

func Delete Uses

func Delete(client *gophercloud.ServiceClient, id string) os.DeleteResult

Delete is the operation responsible for permanently deleting an API user.

func List Uses

func List(client *gophercloud.ServiceClient) pagination.Pager

List returns a pager that allows traversal over a collection of users.

type CommonOpts Uses

type CommonOpts struct {
    // Required. The username to assign to the user. When provided, the username
    // must:
    // - start with an alphabetical (A-Za-z) character
    // - have a minimum length of 1 character
    //
    // The username may contain upper and lowercase characters, as well as any of
    // the following special character: . - @ _
    Username string

    // Required. Email address for the user account.
    Email string

    // Required. Indicates whether the user can authenticate after the user
    // account is created. If no value is specified, the default value is true.
    Enabled os.EnabledState

    // Optional. The password to assign to the user. If provided, the password
    // must:
    // - start with an alphabetical (A-Za-z) character
    // - have a minimum length of 8 characters
    // - contain at least one uppercase character, one lowercase character, and
    //   one numeric character.
    //
    // The password may contain any of the following special characters: . - @ _
    Password string
}

CommonOpts are the options which are shared between CreateOpts and UpdateOpts

type CreateOpts Uses

type CreateOpts CommonOpts

CreateOpts represents the options needed when creating new users.

func (CreateOpts) ToUserCreateMap Uses

func (opts CreateOpts) ToUserCreateMap() (map[string]interface{}, error)

ToUserCreateMap assembles a request body based on the contents of a CreateOpts.

type CreateResult Uses

type CreateResult struct {
    os.CreateResult
}

CreateResult represents the result of a Create operation

func Create Uses

func Create(client *gophercloud.ServiceClient, opts os.CreateOptsBuilder) CreateResult

Create is the operation responsible for creating new users.

func (CreateResult) Extract Uses

func (r CreateResult) Extract() (*User, error)

Extract will get the Snapshot object out of the CreateResult object.

type GetResult Uses

type GetResult struct {
    os.GetResult
}

GetResult represents the result of a Get operation

func Get Uses

func Get(client *gophercloud.ServiceClient, id string) GetResult

Get requests details on a single user, either by ID.

func (GetResult) Extract Uses

func (r GetResult) Extract() (*User, error)

Extract will get the Snapshot object out of the GetResult object.

type ResetAPIKeyResult Uses

type ResetAPIKeyResult struct {
    gophercloud.Result
}

ResetAPIKeyResult represents the server response to the ResetAPIKey method.

func ResetAPIKey Uses

func ResetAPIKey(client *gophercloud.ServiceClient, id string) ResetAPIKeyResult

ResetAPIKey resets the User's API key.

func (ResetAPIKeyResult) Extract Uses

func (r ResetAPIKeyResult) Extract() (*ResetAPIKeyValue, error)

Extract will get the Error or ResetAPIKeyValue object out of the ResetAPIKeyResult object.

type ResetAPIKeyValue Uses

type ResetAPIKeyValue struct {
    // The Username for this API Key reset.
    Username string `mapstructure:"username"`

    // The new API Key for this user.
    APIKey string `mapstructure:"apiKey"`
}

ResetAPIKeyValue represents an API Key that has been reset.

type UpdateOpts Uses

type UpdateOpts CommonOpts

UpdateOpts specifies the base attributes that may be updated on an existing server.

func (UpdateOpts) ToUserUpdateMap Uses

func (opts UpdateOpts) ToUserUpdateMap() map[string]interface{}

ToUserUpdateMap formats an UpdateOpts structure into a request body.

type UpdateOptsBuilder Uses

type UpdateOptsBuilder interface {
    ToUserUpdateMap() map[string]interface{}
}

UpdateOptsBuilder allows extensions to add additional attributes to the Update request.

type UpdateResult Uses

type UpdateResult struct {
    os.UpdateResult
}

UpdateResult represents the result of an Update operation

func Update Uses

func Update(client *gophercloud.ServiceClient, id string, opts UpdateOptsBuilder) UpdateResult

Update is the operation responsible for updating exist users by their UUID.

func (UpdateResult) Extract Uses

func (r UpdateResult) Extract() (*User, error)

Extract will get the Snapshot object out of the UpdateResult object.

type User Uses

type User struct {
    // The UUID for this user.
    ID  string

    // The human name for this user.
    Name string

    // The username for this user.
    Username string

    // Indicates whether the user is enabled (true) or disabled (false).
    Enabled bool

    // The email address for this user.
    Email string

    // The ID of the tenant to which this user belongs.
    TenantID string `mapstructure:"tenant_id"`

    // Specifies the default region for the user account. This value is inherited
    // from the user administrator when the account is created.
    DefaultRegion string `mapstructure:"RAX-AUTH:defaultRegion"`

    // Identifies the domain that contains the user account. This value is
    // inherited from the user administrator when the account is created.
    DomainID string `mapstructure:"RAX-AUTH:domainId"`

    // The password value that the user needs for authentication. If the Add user
    // request included a password value, this attribute is not included in the
    // response.
    Password string `mapstructure:"OS-KSADM:password"`

    // Indicates whether the user has enabled multi-factor authentication.
    MultiFactorEnabled bool `mapstructure:"RAX-AUTH:multiFactorEnabled"`
}

User represents a user resource that exists on the API.

Package users imports 6 packages (graph) and is imported by 1 packages. Updated 2016-07-23. Refresh now. Tools for package owners.