v1

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: Apache-2.0 Imports: 12 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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

func (l *Location) EndpointURL(ctx context.Context) (*url.URL, error)

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 (r *Resource) DecodeAPIResponse(ctx context.Context, data io.Reader) error

func (Resource) EndpointURL added in v0.4.2

func (r Resource) EndpointURL(ctx context.Context) (*url.URL, error)

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 (rwt ResourceWithTag) EndpointURL(ctx context.Context) (*url.URL, error)

func (ResourceWithTag) FilterAPIRequest added in v0.4.2

func (rwt ResourceWithTag) FilterAPIRequest(ctx context.Context, req *http.Request) (*http.Request, error)

func (ResourceWithTag) FilterAPIResponse added in v0.4.2

func (rwt ResourceWithTag) FilterAPIResponse(ctx context.Context, res *http.Response) (*http.Response, error)

type Type

type Type struct {
	Identifier string `json:"identifier"`
	Name       string `json:"name"`
}

Type is part of info.

Jump to

Keyboard shortcuts

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