Documentation ¶
Overview ¶
Package users contains user management functionality on SSS
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *eclcloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
List enumerates the Users to which the current token has access.
Types ¶
type CreateOpts ¶
type CreateOpts struct { // Login id of new user. LoginID string `json:"login_id" required:"true"` // Mail address of new user. MailAddress string `json:"mail_address" required:"true"` // Initial password of new user. // If this parameter is not designated, // random initial password is generated and applied to new user. Password string `json:"password,omitempty"` // If this flag is set 'true', notification e-mail will be sent to new user's email. NotifyPassword string `json:"notify_password" required:"true"` }
CreateOpts represents parameters 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 result of a Create request. Call its Extract method to interpret it as a User.
func Create ¶
func Create(client *eclcloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create creates a new user.
type DeleteResult ¶
DeleteResult is the result of a Delete request. Call its ExtractErr method to determine if the request succeeded or failed.
func Delete ¶
func Delete(client *eclcloud.ServiceClient, userID string) (r DeleteResult)
Delete deletes a user.
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult is the result of a Get request. Call its Extract method to interpret it as a User.
type ListOpts ¶
type ListOpts struct { }
ListOpts enables filtering of a list request. Currently SSS User API does not support any of query parameters.
func (ListOpts) ToUserListQuery ¶
ToUserListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
ListOptsBuilder allows extensions to add additional parameters to the List request
type UpdateOpts ¶
type UpdateOpts struct { // New login id of the user. LoginID *string `json:"login_id" required:"true"` // New email address of the user MailAddress *string `json:"mail_address" required:"true"` // New password of the user NewPassword *string `json:"new_password" required:"true"` }
UpdateOpts represents parameters to update a user.
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 result of an Update request. Call its Extract method to interpret it as a User.
func Update ¶
func Update(client *eclcloud.ServiceClient, id string, opts UpdateOptsBuilder) (r UpdateResult)
Update modifies the attributes of a user. SSS User PUT API does not have response body, so set JSONResponse option as nil.
type User ¶
type User struct { LoginID string `json:"login_id"` MailAddress string `json:"mail_address"` UserID string `json:"user_id"` ContractOwner bool `json:"contract_owner"` KeystoneName string `json:"keystone_name"` KeystonePassword string `json:"keystone_password"` KeystoneEndpoint string `json:"keystone_endpoint"` SSSEndpoint string `json:"sss_endpoint"` ContractID string `json:"contract_id"` LoginIntegration string `json:"login_integration"` ExternalReferenceID string `json:"external_reference_id"` BrandID string `json:"brand_id"` Password string `json:"password"` StartTime time.Time `json:"-"` }
User represents an ECL SSS User.
func ExtractUsers ¶
func ExtractUsers(r pagination.Page) ([]User, error)
ExtractUsers returns a slice of Users contained in a single page of results.
func (*User) UnmarshalJSON ¶
UnmarshalJSON creates JSON format of user
type UserPage ¶
type UserPage struct {
pagination.LinkedPageBase
}
UserPage is a single page of User results.
func (UserPage) NextPageURL ¶
NextPageURL extracts the "next" link from the links section of the result.