Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrNoSuchKey ¶
type ErrNoSuchKey struct {
Name string
}
ErrNoSuchKey means no such key exists in metadata.
func (*ErrNoSuchKey) Error ¶
func (e *ErrNoSuchKey) Error() string
Error returns the value of the metadata key
type OptionBlock ¶
OptionBlock is a single option on which operation is possible
func (OptionBlock) GetMetadata ¶
func (o OptionBlock) GetMetadata(key string) (string, bool)
GetMetadata returns the value for a key if it exists.
func (*OptionBlock) UnmarshalYAML ¶ added in v1.0.9
func (ob *OptionBlock) UnmarshalYAML(unmarshal func(interface{}) error) error
type Provider ¶
type Provider interface { // Name returns the name of the provider Name() string // ID returns the name of the provider id ID() string // Resources returns the provider for an resource deployment source. Resources(ctx context.Context) (*Resources, error) // Services returns the services provided by the Provider. // If no services set, it will return all the supported services. Services() []string }
Provider is an interface implemented by any cloud service provider.
It provides the bare minimum of methods to allow complete overview of user data.
type Resource ¶
type Resource struct { // Public specifies whether the asset is public facing or private Public bool `json:"public"` // Provider is the name of provider for instance Provider string `json:"provider"` // Service is the name of the service under the provider Service string `json:"service,omitempty"` // ID is the id name of the resource provider ID string `json:"id,omitempty"` // PublicIPv4 is the public ipv4 address of the instance. PublicIPv4 string `json:"public_ipv4,omitempty"` // PrivateIpv4 is the private ipv4 address of the instance PrivateIpv4 string `json:"private_ipv4,omitempty"` // DNSName is the DNS name of the resource DNSName string `json:"dns_name,omitempty"` }
Resource is a cloud resource belonging to the organization
type Resources ¶
type Resources struct {
Items []*Resource
}
Resources is a container of multiple resource returned from providers
func NewResources ¶ added in v1.0.0
func NewResources() *Resources
NewResources creates a new resources structure
type ServiceMap ¶ added in v1.0.9
type ServiceMap map[string]struct{}
func (ServiceMap) Has ¶ added in v1.0.9
func (s ServiceMap) Has(service string) bool
func (ServiceMap) Keys ¶ added in v1.0.9
func (s ServiceMap) Keys() []string
Click to show internal directories.
Click to hide internal directories.