Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ResourceTypes = []Namespace{ NamespaceVar, NamespaceProvider, NamespaceService, NamespaceBuild, NamespaceDeploy, }
Functions ¶
func RegisterResource ¶
func RegisterResource(resourceType Namespace, name string, resource ResourceGenerator)
Types ¶
type Cmd ¶
type Parser ¶
type Parser struct { State *State `json:"state"` // contains filtered or unexported fields }
type Registry ¶
type Registry struct {
ResourceGenerators map[Namespace]map[string]ResourceGenerator
}
func DefaultRegistry ¶
func DefaultRegistry() *Registry
func NewRegistry ¶
func NewRegistry() *Registry
func (*Registry) Add ¶
func (r *Registry) Add(namespace Namespace, rsrcType string, rsrc ResourceGenerator) error
func (*Registry) ResourceGenerator ¶
func (r *Registry) ResourceGenerator(namespace Namespace, rsrcType string) (ResourceGenerator, error)
type ResourceEntry ¶
type ResourceEntry struct { ID ResourceID `json:"id"` Resource Resource `json:"resource"` }
type ResourceGenerator ¶
type ResourceID ¶
type ResourceID struct { Namespace Namespace `json:"namespace"` Type string `json:"type"` Name string `json:"name"` }
func (ResourceID) MarshalJSON ¶
func (r ResourceID) MarshalJSON() ([]byte, error)
func (ResourceID) String ¶
func (r ResourceID) String() string
type State ¶
type State struct {
Resources []*ResourceEntry `json:"resources"`
}
Click to show internal directories.
Click to hide internal directories.