Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateApiTokenOpts ¶ added in v0.5.15
type CreateApiTokenOpts struct { Email string `json:"email" required:"true"` Password string `json:"password" required:"true"` TokenName string `json:"token_name" required:"true"` TokenDescription string `json:"token_description" required:"true"` }
CreateApiTokenOpts represents options used to create an api token.
func (CreateApiTokenOpts) ToApiTokenCreateMap ¶ added in v0.5.15
func (opts CreateApiTokenOpts) ToApiTokenCreateMap() (map[string]interface{}, error)
ToApiTokenCreateMap builds a request body from CreateApiTokenOpts.
type CreateApiTokenOptsBuilder ¶ added in v0.5.15
CreateApiTokenOptsBuilder allows extensions to add additional parameters to the CreateApiToken request.
type CreateApiTokenResult ¶ added in v0.5.15
type CreateApiTokenResult struct {
// contains filtered or unexported fields
}
CreateApiTokenResult represents the result of a create operation. Call its Extract method to interpret it as an api token.
func CreateApiToken ¶ added in v0.5.15
func CreateApiToken(c *gcorecloud.ServiceClient, opts CreateApiTokenOptsBuilder) (r CreateApiTokenResult)
CreateApiToken accepts a CreateApiTokenOpts struct and creates a new api token using the values provided.
func (CreateApiTokenResult) Extract ¶ added in v0.5.15
Extract is a function that accepts a result and extracts an api token resource.
func (CreateApiTokenResult) ExtractInto ¶ added in v0.5.15
func (r CreateApiTokenResult) ExtractInto(v interface{}) error
type CreateUserOpts ¶ added in v0.5.15
type CreateUserOpts struct { Email string `json:"email" required:"true"` Password string `json:"password" required:"true"` }
CreateUserOpts represents options used to create an user.
func (CreateUserOpts) ToUserCreateMap ¶ added in v0.5.15
func (opts CreateUserOpts) ToUserCreateMap() (map[string]interface{}, error)
ToUserCreateMap builds a request body from CreateUserOpts.
type CreateUserOptsBuilder ¶ added in v0.5.15
CreateUserOptsBuilder allows extensions to add additional parameters to the Create request.
type CreateUserResult ¶ added in v0.5.15
type CreateUserResult struct {
// contains filtered or unexported fields
}
CreateUserResult represents the result of a create operation. Call its Extract method to interpret it as a user.
func CreateUser ¶ added in v0.5.15
func CreateUser(c *gcorecloud.ServiceClient, opts CreateUserOptsBuilder) (r CreateUserResult)
CreateUser accepts a CreateUserOpts struct and creates a new user using the values provided.
func (CreateUserResult) Extract ¶ added in v0.5.15
Extract is a function that accepts a result and extracts a user resource.
func (CreateUserResult) ExtractInto ¶ added in v0.5.15
func (r CreateUserResult) ExtractInto(v interface{}) error
type UserAssignment ¶ added in v0.5.16
type UserAssignmentOpts ¶ added in v0.5.16
type UserAssignmentOpts struct { ClientID *int `json:"client_id"` ProjectID *int `json:"project_id"` UserID int `json:"user_id" required:"true"` Role string `json:"role" required:"true"` }
UserAssignmentOpts represents options used to assign role to user.
func (UserAssignmentOpts) ToUserAssignmentMap ¶ added in v0.5.16
func (opts UserAssignmentOpts) ToUserAssignmentMap() (map[string]interface{}, error)
ToUserAssignmentMap builds a request body from UserAssignmentOpts.
type UserAssignmentOptsBuilder ¶ added in v0.5.16
UserAssignmentOptsBuilder allows extensions to add additional parameters to the user assignment request.
type UserAssignmentResult ¶ added in v0.5.16
type UserAssignmentResult struct {
// contains filtered or unexported fields
}
UserAssignmentResult represents the result of a user assignment operation. Call its Extract method to interpret it as a user assignments.
func AssignUser ¶ added in v0.5.16
func AssignUser(c *gcorecloud.ServiceClient, opts UserAssignmentOptsBuilder) (r UserAssignmentResult)
AssignUser accepts a UserAssignmentOpts struct and assigns role to user using the values provided.
func (UserAssignmentResult) Extract ¶ added in v0.5.16
func (r UserAssignmentResult) Extract() (*UserAssignment, error)
Extract is a function that accepts a result and extracts a user assignments resource.
func (UserAssignmentResult) ExtractInto ¶ added in v0.5.16
func (r UserAssignmentResult) ExtractInto(v interface{}) error