Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var HandshakeConfig = plugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: "BASIC_PLUGIN",
MagicCookieValue: "hello",
}
Functions ¶
func GetAllBlueprintSpecs ¶
GetAllBlueprintSpecs returns a map of all registered blueprint specs.
Types ¶
type Blueprint ¶
type Blueprint struct { Type Type `yaml:"type" json:"type"` Spec Spec `yaml:"spec" json:"spec"` Generator Generator }
func GetAllBlueprints ¶
func GetAllBlueprints() []Blueprint
GetAllBlueprints returns a map of all registered blueprints.
type GenerateArgs ¶ added in v0.1.1
GenerateArgs Define argument and response structures for the methods
type GenerateResponse ¶ added in v0.1.1
type GenerateResponse struct {
Error error
}
type Generator ¶
type Generator interface { Generate(spec Spec, values map[string]string, workdir string) error LoadSpec() (Spec, error) }
Generator defines the interface for a blueprint.
func GetGenerator ¶
GetGenerator retrieves a generator from the registry.
type GeneratorPlugin ¶ added in v0.1.3
type GeneratorPlugin struct {
Impl Generator
}
func (*GeneratorPlugin) Client ¶ added in v0.1.3
func (p *GeneratorPlugin) Client(_ *plugin.MuxBroker, c *rpc.Client) (interface{}, error)
func (*GeneratorPlugin) Server ¶ added in v0.1.3
func (p *GeneratorPlugin) Server(*plugin.MuxBroker) (interface{}, error)
type GeneratorRPC ¶ added in v0.1.3
type GeneratorRPC struct {
// contains filtered or unexported fields
}
func (*GeneratorRPC) LoadSpec ¶ added in v0.1.3
func (c *GeneratorRPC) LoadSpec() (Spec, error)
LoadSpec makes an RPC client call to LoadSpec
type GeneratorRPCServer ¶ added in v0.1.3
type GeneratorRPCServer struct {
Impl Generator
}
GeneratorRPCServer is the server side of the RPC
func (*GeneratorRPCServer) Generate ¶ added in v0.1.3
func (s *GeneratorRPCServer) Generate(args *GenerateArgs, resp *GenerateResponse) error
Generate handles the server-side RPC call for Generate
func (*GeneratorRPCServer) LoadSpec ¶ added in v0.1.3
func (s *GeneratorRPCServer) LoadSpec(_ *LoadSpecArgs, resp *LoadSpecResponse) error
LoadSpec handles the server-side RPC call for LoadSpec
type LoadSpecArgs ¶ added in v0.1.1
type LoadSpecArgs struct { }
type LoadSpecResponse ¶ added in v0.1.1
type Option ¶
type Spec ¶
type Spec struct { ID string `yaml:"id"` Name string `yaml:"name"` Description string `yaml:"description"` Options []Option `yaml:"options"` Version string `yaml:"version"` }
Spec BlueprintSpec represents the structure of a YAML blueprint spec.
func GetBlueprintSpec ¶
GetBlueprintSpec retrieves the spec for a given blueprint type.
func LoadBlueprintSpec ¶
LoadBlueprintSpec reads and parses the YAML spec file for a blueprint.
func LoadBlueprintSpecFromBytes ¶
LoadBlueprintSpecFromBytes parses the YAML spec file for a blueprint from a byte array.