Documentation ¶
Index ¶
- func ExtractMetadataInto(r pagination.Page, v interface{}) error
- func MetadataItemURL(c *gcorecloud.ServiceClient, id string, key string) string
- func MetadataList(client *gcorecloud.ServiceClient, id string) pagination.Pager
- func MetadataURL(c *gcorecloud.ServiceClient, id string) string
- func ResourceActionURL(c *gcorecloud.ServiceClient, id string, action string) string
- type Metadata
- type MetadataActionResult
- func MetadataCreateOrUpdate(client *gcorecloud.ServiceClient, id string, opts map[string]string) (r MetadataActionResult)
- func MetadataDelete(client *gcorecloud.ServiceClient, id string, key string) (r MetadataActionResult)
- func MetadataReplace(client *gcorecloud.ServiceClient, id string, opts map[string]string) (r MetadataActionResult)
- type MetadataPage
- type MetadataResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractMetadataInto ¶
func ExtractMetadataInto(r pagination.Page, v interface{}) error
func MetadataItemURL ¶
func MetadataItemURL(c *gcorecloud.ServiceClient, id string, key string) string
func MetadataList ¶
func MetadataList(client *gcorecloud.ServiceClient, id string) pagination.Pager
func MetadataURL ¶
func MetadataURL(c *gcorecloud.ServiceClient, id string) string
func ResourceActionURL ¶
func ResourceActionURL(c *gcorecloud.ServiceClient, id string, action string) string
Types ¶
type Metadata ¶
type Metadata struct { Key string `json:"key"` Value string `json:"value"` ReadOnly bool `json:"read_only"` }
func ExtractMetadata ¶
func ExtractMetadata(r pagination.Page) ([]Metadata, error)
ExtractMetadata accepts a Page struct, specifically a MetadataPage struct, and extracts the elements into a slice of securitygroups metadata structs. In other words, a generic collection is mapped into a relevant slice.
func MetadataListAll ¶
func MetadataListAll(client *gcorecloud.ServiceClient, id string) ([]Metadata, error)
type MetadataActionResult ¶
type MetadataActionResult struct {
gcorecloud.ErrResult
}
MetadataActionResult represents the result of a creation, delete or update operation(no content)
func MetadataCreateOrUpdate ¶
func MetadataCreateOrUpdate(client *gcorecloud.ServiceClient, id string, opts map[string]string) (r MetadataActionResult)
MetadataCreateOrUpdate creates or update a metadata for a resource.
func MetadataDelete ¶
func MetadataDelete(client *gcorecloud.ServiceClient, id string, key string) (r MetadataActionResult)
MetadataDelete deletes defined metadata key for a resource.
func MetadataReplace ¶
func MetadataReplace(client *gcorecloud.ServiceClient, id string, opts map[string]string) (r MetadataActionResult)
MetadataReplace replace a metadata for a resource.
type MetadataPage ¶
type MetadataPage struct {
pagination.LinkedPageBase
}
func (MetadataPage) IsEmpty ¶
func (r MetadataPage) IsEmpty() (bool, error)
IsEmpty checks whether a MetadataPage struct is empty.
type MetadataResult ¶
type MetadataResult struct {
// contains filtered or unexported fields
}
MetadataResult represents the result of a get operation
func MetadataGet ¶
func MetadataGet(client *gcorecloud.ServiceClient, id string, key string) (r MetadataResult)
MetadataGet gets defined metadata key for a resource.
func (MetadataResult) Extract ¶
func (r MetadataResult) Extract() (*Metadata, error)