Documentation ¶
Index ¶
- func ListTags(ctx context.Context, a types.API, obj types.IdentifiedObject) ([]string, error)
- func Tag(ctx context.Context, a types.API, obj types.IdentifiedObject, tags ...string) error
- func Untag(ctx context.Context, a types.API, obj types.IdentifiedObject, tags ...string) error
- type Location
- type Resource
- type ResourceWithTag
- func (rwt ResourceWithTag) EndpointURL(ctx context.Context) (*url.URL, error)
- func (rwt ResourceWithTag) FilterAPIRequestBody(ctx context.Context) (interface{}, error)
- func (rwt ResourceWithTag) FilterAPIResponse(ctx context.Context, res *http.Response) (*http.Response, error)
- func (rwt ResourceWithTag) FilterRequestURL(ctx context.Context, url *url.URL) (*url.URL, error)
- func (o *ResourceWithTag) GetIdentifier(ctx context.Context) (string, error)
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Location ¶ added in v0.4.1
type Location struct { Identifier string `json:"identifier" anxcloud:"identifier"` Code string `json:"code"` Name string `json:"name"` CountryCode string `json:"country"` CityCode string `json:"city_code"` Latitude *string `json:"lat"` Longitude *string `json:"lon"` }
Location describes a Anexia site where resources can be deployed.
func (*Location) EndpointURL ¶ added in v0.4.1
EndpointURL returns the default URL for core location operations. It supports Get by-code if `Code` is set and `Identifier` is not.
type Resource ¶ added in v0.4.2
type Resource struct { Identifier string `json:"identifier" anxcloud:"identifier"` Name string `json:"name"` Type Type `json:"resource_type"` Tags []string `json:"tags"` Attributes json.RawMessage `json:"attributes"` }
Resource contains all information about a resource.
func (*Resource) DecodeAPIResponse ¶ added in v0.4.2
func (Resource) EndpointURL ¶ added in v0.4.2
type ResourceWithTag ¶ added in v0.4.2
type ResourceWithTag struct { // Identifier of the Resource which tags to change Identifier string `anxcloud:"identifier"` // Name of the Tag to add or remove from the resource Tag string }
ResourceWithTag is a virtual Object used to add (Create) or remove (Destroy) a tag to/from a Resource.
func (ResourceWithTag) EndpointURL ¶ added in v0.4.2
func (ResourceWithTag) FilterAPIRequestBody ¶ added in v0.4.3
func (rwt ResourceWithTag) FilterAPIRequestBody(ctx context.Context) (interface{}, error)
func (ResourceWithTag) FilterAPIResponse ¶ added in v0.4.2
func (ResourceWithTag) FilterRequestURL ¶ added in v0.4.3
func (*ResourceWithTag) GetIdentifier ¶ added in v0.4.5
func (o *ResourceWithTag) GetIdentifier(ctx context.Context) (string, error)
GetIdentifier returns the primary identifier of a ResourceWithTag object
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package helper exists to break a circular-dependency between pkg/api and pkg/apis/core/v1, that was introduced when adding the AutoTag option to the generic client.
|
Package helper exists to break a circular-dependency between pkg/api and pkg/apis/core/v1, that was introduced when adding the AutoTag option to the generic client. |
Click to show internal directories.
Click to hide internal directories.