Documentation ¶
Overview ¶
Package projects provides interaction with Limes at the project hierarchical level.
Index ¶
- func Sync(c *gophercloud.ServiceClient, domainID string, projectID string, ...) error
- func Update(c *gophercloud.ServiceClient, domainID string, projectID string, ...) ([]byte, error)
- type CommonResult
- type GetOpts
- type GetOptsBuilder
- type ListOpts
- type ListOptsBuilder
- type SyncOpts
- type SyncOptsBuilder
- type UpdateOpts
- type UpdateOptsBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Sync ¶
func Sync(c *gophercloud.ServiceClient, domainID string, projectID string, opts SyncOptsBuilder) error
Sync schedules a sync task that pulls a project's data from the backing services into Limes' local database.
func Update ¶
func Update(c *gophercloud.ServiceClient, domainID string, projectID string, opts UpdateOptsBuilder) ([]byte, error)
Update modifies the attributes of a project and returns the response body which contains non-fatal error messages.
Types ¶
type CommonResult ¶
type CommonResult struct {
gophercloud.Result
}
CommonResult is the result of a Get/List operation. Call its appropriate Extract method to interpret it as a Project or a slice of Projects.
func Get ¶
func Get(c *gophercloud.ServiceClient, domainID string, projectID string, opts GetOptsBuilder) (r CommonResult)
Get retrieves details on a single project, by ID.
func List ¶
func List(c *gophercloud.ServiceClient, domainID string, opts ListOptsBuilder) (r CommonResult)
List enumerates the projects in a specific domain.
func (CommonResult) Extract ¶
func (r CommonResult) Extract() (*limes.ProjectReport, error)
Extract interprets a CommonResult as a Project.
func (CommonResult) ExtractProjects ¶
func (r CommonResult) ExtractProjects() ([]limes.ProjectReport, error)
ExtractProjects interprets a CommonResult as a slice of Projects.
type GetOpts ¶
type GetOpts struct { Cluster string `h:"X-Limes-Cluster-Id"` Detail bool `q:"detail"` Area string `q:"area"` Service string `q:"service"` Resource string `q:"resource"` }
GetOpts contains parameters for filtering a Get request.
type GetOptsBuilder ¶
GetOptsBuilder allows extensions to add additional parameters to the Get request.
type ListOpts ¶
type ListOpts struct { Cluster string `h:"X-Limes-Cluster-Id"` Detail bool `q:"detail"` Area string `q:"area"` Service string `q:"service"` Resource string `q:"resource"` }
ListOpts contains parameters for filtering a List request.
type ListOptsBuilder ¶
ListOptsBuilder allows extensions to add additional parameters to the List request.
type SyncOpts ¶
type SyncOpts struct {
Cluster string `h:"X-Limes-Cluster-Id"`
}
SyncOpts contains parameters for filtering a Sync request.
type SyncOptsBuilder ¶
SyncOptsBuilder allows extensions to add additional parameters to the Sync request.
type UpdateOpts ¶
type UpdateOpts struct { Cluster string `h:"X-Limes-Cluster-Id"` Services limes.QuotaRequest `json:"services"` }
UpdateOpts contains parameters to update a project.
func (UpdateOpts) ToProjectUpdateMap ¶
func (opts UpdateOpts) ToProjectUpdateMap() (map[string]string, map[string]interface{}, error)
ToProjectUpdateMap formats a UpdateOpts into a map of headers and a request body.