Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
List enumerats the Projects to which the current token has access.
Types ¶
type CreateOpts ¶
type CreateOpts struct { // DomainID is the ID this project will belong under. DomainID string `json:"domain_id,omitempty"` // Enabled sets the project status to enabled or disabled. Enabled *bool `json:"enabled,omitempty"` // IsDomain indicates if this project is a domain. IsDomain *bool `json:"is_domain,omitempty"` // Name is the name of the project. Name string `json:"name" required:"true"` // ParentID specifies the parent project of this new project. ParentID string `json:"parent_id,omitempty"` // Description is the description of the project. Description string `json:"description,omitempty"` }
CreateOpts allows you to modify the details included in the Create request.
func (CreateOpts) ToProjectCreateMap ¶
func (opts CreateOpts) ToProjectCreateMap() (map[string]interface{}, error)
ToProjectCreateMap 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 temporarily contains the reponse from the Create call.
func Create ¶
func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create creates a new Project.
type DeleteResult ¶
type DeleteResult struct {
gophercloud.ErrResult
}
DeleteResult temporarily contains the response from the Delete call.
func Delete ¶
func Delete(client *gophercloud.ServiceClient, projectID string) (r DeleteResult)
Delete deletes a project.
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult temporarily contains the response from the Get call.
func Get ¶
func Get(client *gophercloud.ServiceClient, id string) (r GetResult)
Get retrieves details on a single project, by ID.
type ListOpts ¶
type ListOpts struct { // DomainID filters the response by a domain ID. DomainID string `q:"domain_id"` // Enabled filters the response by enabled projects. Enabled *bool `q:"enabled"` // IsDomain filters the response by projects that are domains. // Setting this to true is effectively listing domains. IsDomain *bool `q:"is_domain"` // Name filters the response by project name. Name string `q:"name"` // ParentID filters the response by projects of a given parent project. ParentID string `q:"parent_id"` }
ListOpts allows you to query the List method.
func (ListOpts) ToProjectListQuery ¶
ToProjectListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
ListOptsBuilder allows extensions to add additional parameters to the List request
type Project ¶
type Project struct { // IsDomain indicates whether the project is a domain. IsDomain bool `json:"is_domain"` // Description is the description of the project. Description string `json:"description"` // DomainID is the domain ID the project belongs to. DomainID string `json:"domain_id"` // Enabled is whether or not the project is enabled. Enabled bool `json:"enabled"` // ID is the unique ID of the project. ID string `json:"id"` // Name is the name of the project. Name string `json:"name"` // ParentID is the parent_id of the project. ParentID string `json:"parent_id"` }
Project is a base unit of ownership.
func ExtractProjects ¶
func ExtractProjects(r pagination.Page) ([]Project, error)
ExtractProjects returns a slice of Projects contained in a single page of results.
type ProjectPage ¶
type ProjectPage struct {
pagination.LinkedPageBase
}
ProjectPage is a single page of Project results.
func (ProjectPage) IsEmpty ¶
func (r ProjectPage) IsEmpty() (bool, error)
IsEmpty determines whether or not a page of Projects contains any results.
func (ProjectPage) NextPageURL ¶
func (r ProjectPage) NextPageURL() (string, error)
NextPageURL extracts the "next" link from the links section of the result.
type UpdateOpts ¶
type UpdateOpts struct { // DomainID is the ID this project will belong under. DomainID string `json:"domain_id,omitempty"` // Enabled sets the project status to enabled or disabled. Enabled *bool `json:"enabled,omitempty"` // IsDomain indicates if this project is a domain. IsDomain *bool `json:"is_domain,omitempty"` // Name is the name of the project. Name string `json:"name,omitempty"` // ParentID specifies the parent project of this new project. ParentID string `json:"parent_id,omitempty"` // Description is the description of the project. Description string `json:"description,omitempty"` }
UpdateOpts allows you to modify the details included in the Update request.
func (UpdateOpts) ToProjectUpdateMap ¶
func (opts UpdateOpts) ToProjectUpdateMap() (map[string]interface{}, error)
ToUpdateCreateMap 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 temporarily contains the response from the Update call.
func Update ¶
func Update(client *gophercloud.ServiceClient, id string, opts UpdateOptsBuilder) (r UpdateResult)
Update modifies the attributes of a project.