Documentation ¶
Index ¶
- func ExtractMetadataInto(r pagination.Page, v interface{}) error
- func ResourceActionURL(c *edgecloud.ServiceClient, id string, action string) string
- func ResourceMetadataItemURL(c *edgecloud.ServiceClient, id string, key string) string
- func ResourceMetadataList(client *edgecloud.ServiceClient, id string) pagination.Pager
- func ResourceMetadataURL(c *edgecloud.ServiceClient, id string) string
- type ActionResultMetadata
- func ResourceMetadataCreateOrUpdate(client *edgecloud.ServiceClient, id string, opts map[string]string) (r ActionResultMetadata)
- func ResourceMetadataDelete(client *edgecloud.ServiceClient, id string, key string) (r ActionResultMetadata)
- func ResourceMetadataReplace(client *edgecloud.ServiceClient, id string, opts map[string]string) (r ActionResultMetadata)
- type Metadata
- type ResourceMetadataPage
- type ResourceMetadataResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractMetadataInto ¶
func ExtractMetadataInto(r pagination.Page, v interface{}) error
func ResourceActionURL ¶
func ResourceActionURL(c *edgecloud.ServiceClient, id string, action string) string
func ResourceMetadataItemURL ¶ added in v0.1.4
func ResourceMetadataItemURL(c *edgecloud.ServiceClient, id string, key string) string
func ResourceMetadataList ¶ added in v0.1.4
func ResourceMetadataList(client *edgecloud.ServiceClient, id string) pagination.Pager
func ResourceMetadataURL ¶ added in v0.1.4
func ResourceMetadataURL(c *edgecloud.ServiceClient, id string) string
Types ¶
type ActionResultMetadata ¶ added in v0.1.4
ActionResultMetadata represents the result of a creation, delete or update operation(no content).
func ResourceMetadataCreateOrUpdate ¶ added in v0.1.4
func ResourceMetadataCreateOrUpdate(client *edgecloud.ServiceClient, id string, opts map[string]string) (r ActionResultMetadata)
ResourceMetadataCreateOrUpdate creates or update a metadata for a resource.
func ResourceMetadataDelete ¶ added in v0.1.4
func ResourceMetadataDelete(client *edgecloud.ServiceClient, id string, key string) (r ActionResultMetadata)
ResourceMetadataDelete deletes defined metadata key for a resource.
func ResourceMetadataReplace ¶ added in v0.1.4
func ResourceMetadataReplace(client *edgecloud.ServiceClient, id string, opts map[string]string) (r ActionResultMetadata)
ResourceMetadataReplace replace a metadata for a resource.
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 ResourceMetadataPage 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 ResourceMetadataListAll ¶ added in v0.1.4
func ResourceMetadataListAll(client *edgecloud.ServiceClient, id string) ([]Metadata, error)
type ResourceMetadataPage ¶ added in v0.1.4
type ResourceMetadataPage struct {
pagination.LinkedPageBase
}
func (ResourceMetadataPage) IsEmpty ¶ added in v0.1.4
func (r ResourceMetadataPage) IsEmpty() (bool, error)
IsEmpty checks whether a ResourceMetadataPage struct is empty.
type ResourceMetadataResult ¶ added in v0.1.4
type ResourceMetadataResult struct {
// contains filtered or unexported fields
}
ResourceMetadataResult represents the result of a get operation.
func ResourceMetadataGet ¶ added in v0.1.4
func ResourceMetadataGet(client *edgecloud.ServiceClient, id string, key string) (r ResourceMetadataResult)
ResourceMetadataGet gets defined metadata key for a resource.
func (ResourceMetadataResult) Extract ¶ added in v0.1.4
func (r ResourceMetadataResult) Extract() (*Metadata, error)