Documentation ¶
Index ¶
- func ConvertNone(data []byte) (string, error)
- func ConvertRelease(data []byte) (*release.Release, string, error)
- func ConvertUninstallReleaseResponse(data []byte) (*release.UninstallReleaseResponse, string, error)
- type Agent
- type AgentAction
- type Args
- type DefaultAgent
- type Result
- type ResultType
- type ResultTypeError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertNone ¶ added in v0.6.0
ConvertNone converts the marshaled data into no type in order to return logs
func ConvertRelease ¶ added in v0.6.0
ConvertRelease converts the marshaled data to a typed release
func ConvertUninstallReleaseResponse ¶ added in v0.6.0
func ConvertUninstallReleaseResponse(data []byte) (*release.UninstallReleaseResponse, string, error)
ConvertUninstallReleaseResponse converts the marshaled data to a typed uninstall response
Types ¶
type Agent ¶
type Agent interface { Install(args *Args) (*Result, error) Rollback(args *Args) (*Result, error) Test(args *Args) (*Result, error) Uninstall(args *Args) (*Result, error) Upgrade(args *Args) (*Result, error) }
Agent is the interface we use to talk to helm packages
type AgentAction ¶ added in v0.6.0
type AgentAction string
AgentAction is an enum/alias to make calling methods typed
const ( // Install represents the Install method Install AgentAction = "Install" // Rollback represents the Rollback method Rollback AgentAction = "Rollback" // Test represents the Test method Test AgentAction = "Test" // Uninstall represents the Uninstall method Uninstall AgentAction = "Uninstall" // Upgrade represents the Upgrade method Upgrade AgentAction = "Upgrade" )
type Args ¶ added in v0.4.0
type Args struct { Name string Namespace string Chart []byte Values map[string]interface{} Version int Wait bool Timeout string Install bool ReuseValues bool }
Args are arguments common to all commands
func ConvertArgs ¶ added in v0.6.0
ConvertArgs converts byte data back to args
type DefaultAgent ¶
type DefaultAgent struct {
// contains filtered or unexported fields
}
DefaultAgent is the default implementation of the Agent interface
func NewDefaultAgent ¶ added in v0.6.0
func NewDefaultAgent(kubeFunc func() (*rest.Config, error)) *DefaultAgent
NewDefaultAgent inits the default agent with the specified kube interface
func (DefaultAgent) Install ¶ added in v0.4.0
func (a DefaultAgent) Install(args *Args) (*Result, error)
Install is the equivalent of `helm install`
func (DefaultAgent) Rollback ¶ added in v0.4.0
func (a DefaultAgent) Rollback(args *Args) (*Result, error)
Rollback is the equivalent of `helm rollback`
func (DefaultAgent) Test ¶ added in v0.4.0
func (a DefaultAgent) Test(args *Args) (*Result, error)
Test is the equivalent of `helm test`
type Result ¶ added in v0.6.0
type Result struct { Data interface{} Logs string Type ResultType }
Result is the type this agent returns
type ResultType ¶ added in v0.6.0
type ResultType string
ResultType represents types to convert for this response
const ( // NoneResult represents helm commands that don't return anything, such as rollback NoneResult ResultType = "NoneResult" // ReleaseResult represents a Release result ReleaseResult ResultType = "ReleaseResult" // UninstallReleaseResponseResult represents an UninstallReleaseResponse result UninstallReleaseResponseResult ResultType = "UninstallReleaseResponse" )
type ResultTypeError ¶ added in v0.6.0
type ResultTypeError struct{}
ResultTypeError is an eror when the wrong type conversion is made with a result
func (ResultTypeError) Error ¶ added in v0.6.0
func (err ResultTypeError) Error() string