projects

package
v0.0.0-...-33ee089 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package projects provides interaction with Limes at the project hierarchical level.

Index

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.

func (GetOpts) ToProjectGetParams

func (opts GetOpts) ToProjectGetParams() (map[string]string, string, error)

ToProjectGetParams formats a GetOpts into a map of headers and a query string.

type GetOptsBuilder

type GetOptsBuilder interface {
	ToProjectGetParams() (map[string]string, string, error)
}

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.

func (ListOpts) ToProjectListParams

func (opts ListOpts) ToProjectListParams() (map[string]string, string, error)

ToProjectListParams formats a ListOpts into a map of headers and a query string.

type ListOptsBuilder

type ListOptsBuilder interface {
	ToProjectListParams() (map[string]string, string, error)
}

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.

func (SyncOpts) ToProjectSyncParams

func (opts SyncOpts) ToProjectSyncParams() (map[string]string, error)

ToProjectSyncParams formats a SyncOpts into a map of headers.

type SyncOptsBuilder

type SyncOptsBuilder interface {
	ToProjectSyncParams() (map[string]string, error)
}

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.

type UpdateOptsBuilder

type UpdateOptsBuilder interface {
	ToProjectUpdateMap() (map[string]string, map[string]interface{}, error)
}

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL