Documentation
¶
Index ¶
- Variables
- func Connect(target Target) (*ssh.Client, error)
- type Artifact
- type ArtifactInterface
- type ArtifactPlugin
- type ArtifactRPC
- func (client *ArtifactRPC) Detect(config OperationArguments) (bool, error)
- func (client *ArtifactRPC) GetArtifactSchema() (hcldec.ObjectSpec, error)
- func (client *ArtifactRPC) GetPluginSchema() (hcldec.ObjectSpec, error)
- func (client *ArtifactRPC) Install(config OperationArguments) error
- func (client *ArtifactRPC) SetPluginConfig(config cty.Value) error
- func (client *ArtifactRPC) Uninstall(config OperationArguments) error
- func (client *ArtifactRPC) Upgrade(config OperationArguments) error
- type ArtifactRPCServer
- func (server *ArtifactRPCServer) Detect(args OperationArguments, resp *bool) error
- func (server *ArtifactRPCServer) GetArtifactSchema(args interface{}, resp *hcldec.ObjectSpec) error
- func (server *ArtifactRPCServer) GetPluginSchema(args interface{}, resp *hcldec.ObjectSpec) error
- func (server *ArtifactRPCServer) Install(args OperationArguments, resp *bool) error
- func (server *ArtifactRPCServer) SetPluginConfig(args cty.Value, resp *bool) error
- func (server *ArtifactRPCServer) Uninstall(args OperationArguments, resp *bool) error
- func (server *ArtifactRPCServer) Upgrade(args OperationArguments, resp *bool) error
- type Config
- type OperationArguments
- type Plugin
- type Target
- type Version
Constants ¶
This section is empty.
Variables ¶
var CommitHash = ""
CommitHash represents the Git commit hash as of building This is set by the Go linker
var ProtocolVersion = fmt.Sprintf("%d.%d", TungstenVersion.Segments()[0], TungstenVersion.Segments()[1])
ProtocolVersion is the plugin protocol version (Generated from the major and minor version)
var RawTungstenVersion = ""
RawTungstenVersion represents the raw version This is set by the Go linker
var TungstenVersion = version.Must(version.NewSemver(RawTungstenVersion))
TungstenVersion represents the parsed version
Functions ¶
Types ¶
type Artifact ¶
type Artifact struct { Plugin string `hcl:"plugin,label"` Operation string `hcl:"operation,label"` ArtifactConfig hcl.Body `hcl:",remain"` }
Artifact represents a Tungsten artifact
type ArtifactInterface ¶
type ArtifactInterface interface { GetPluginSchema() (hcldec.ObjectSpec, error) GetArtifactSchema() (hcldec.ObjectSpec, error) SetPluginConfig(cty.Value) (bool, error) Detect(OperationArguments) (bool, error) Install(OperationArguments) (bool, error) Upgrade(OperationArguments) (bool, error) Uninstall(OperationArguments) (bool, error) }
ArtifactInterface is the artifact-plugin interface
type ArtifactPlugin ¶
type ArtifactPlugin struct {
Implementation ArtifactInterface
}
ArtifactPlugin is an implementation plugin.Plugin
func (*ArtifactPlugin) Client ¶
func (plug *ArtifactPlugin) Client(_ *plugin.MuxBroker, client *rpc.Client) (interface{}, error)
Client returns a new instance of the RPC artifact client plugin
func (*ArtifactPlugin) Server ¶
func (plug *ArtifactPlugin) Server(_ *plugin.MuxBroker) (interface{}, error)
Server returns a new instance of the RPC artifact server plugin
type ArtifactRPC ¶
ArtifactRPC represents the RPC artifact plugin
func (*ArtifactRPC) Detect ¶
func (client *ArtifactRPC) Detect(config OperationArguments) (bool, error)
Detect detects if an artifact is present
func (*ArtifactRPC) GetArtifactSchema ¶
func (client *ArtifactRPC) GetArtifactSchema() (hcldec.ObjectSpec, error)
GetArtifactSchema gets the artifacts's config schema
func (*ArtifactRPC) GetPluginSchema ¶
func (client *ArtifactRPC) GetPluginSchema() (hcldec.ObjectSpec, error)
GetPluginSchema gets the plugin's config schema
func (*ArtifactRPC) Install ¶
func (client *ArtifactRPC) Install(config OperationArguments) error
Install the artifact
func (*ArtifactRPC) SetPluginConfig ¶
func (client *ArtifactRPC) SetPluginConfig(config cty.Value) error
SetPluginConfig sets the plugin's global config
func (*ArtifactRPC) Uninstall ¶
func (client *ArtifactRPC) Uninstall(config OperationArguments) error
Uninstall the artifact
func (*ArtifactRPC) Upgrade ¶
func (client *ArtifactRPC) Upgrade(config OperationArguments) error
Upgrade the artifact
type ArtifactRPCServer ¶
type ArtifactRPCServer struct { //The actual implementation Implementation ArtifactInterface }
ArtifactRPCServer represents the RPC artifact server plugin
func (*ArtifactRPCServer) Detect ¶
func (server *ArtifactRPCServer) Detect(args OperationArguments, resp *bool) error
Detect the artifact
func (*ArtifactRPCServer) GetArtifactSchema ¶
func (server *ArtifactRPCServer) GetArtifactSchema(args interface{}, resp *hcldec.ObjectSpec) error
GetArtifactSchema gets the artifacts's config schema
func (*ArtifactRPCServer) GetPluginSchema ¶
func (server *ArtifactRPCServer) GetPluginSchema(args interface{}, resp *hcldec.ObjectSpec) error
GetPluginSchema gets the plugin's config schema
func (*ArtifactRPCServer) Install ¶
func (server *ArtifactRPCServer) Install(args OperationArguments, resp *bool) error
Install the artifact
func (*ArtifactRPCServer) SetPluginConfig ¶
func (server *ArtifactRPCServer) SetPluginConfig(args cty.Value, resp *bool) error
SetPluginConfig gets the artifacts's config schema
func (*ArtifactRPCServer) Uninstall ¶
func (server *ArtifactRPCServer) Uninstall(args OperationArguments, resp *bool) error
Uninstall the artifact
func (*ArtifactRPCServer) Upgrade ¶
func (server *ArtifactRPCServer) Upgrade(args OperationArguments, resp *bool) error
Upgrade the artifact
type Config ¶
type Config struct { Version Version `hcl:"version,block"` Plugins []Plugin `hcl:"plugin,block"` Targets []Target `hcl:"target,block"` Artifacts []Artifact `hcl:"artifact,block"` }
Config represents a complete Tungsten config
func LoadConfig ¶
LoadConfig parses and loads dependencies from the HCL file at the specified location
type OperationArguments ¶
OperationArguments represents the arguments for an artifact-plugin operation
type Plugin ¶
type Plugin struct { Name string `hcl:"name,label"` Source string `hcl:"source"` PluginConfig hcl.Body `hcl:",remain"` }
Plugin represents a Tungsten plugin block