Documentation ¶
Index ¶
- func SetInstance(i Ops)
- type ActionApprovalInterface
- type Client
- func (c *Client) CreateActionApproval(actionApproval *autv1alpha1.ActionApproval) (*autv1alpha1.ActionApproval, error)
- func (c *Client) CreateAutopilotRule(rule *autv1alpha1.AutopilotRule) (*autv1alpha1.AutopilotRule, error)
- func (c *Client) CreateAutopilotRuleObject(ruleObject *autv1alpha1.AutopilotRuleObject) (*autv1alpha1.AutopilotRuleObject, error)
- func (c *Client) DeleteActionApproval(namespace, name string) error
- func (c *Client) DeleteAutopilotRule(name string) error
- func (c *Client) DeleteAutopilotRuleObject(namespace, name string) error
- func (c *Client) GetActionApproval(namespace, name string) (*autv1alpha1.ActionApproval, error)
- func (c *Client) GetAutopilotRule(name string) (*autv1alpha1.AutopilotRule, error)
- func (c *Client) GetAutopilotRuleObject(namespace, name string) (*autv1alpha1.AutopilotRuleObject, error)
- func (c *Client) ListActionApprovals(namespace string) (*autv1alpha1.ActionApprovalList, error)
- func (c *Client) ListAutopilotRuleObjects(namespace string) (*autv1alpha1.AutopilotRuleObjectList, error)
- func (c *Client) ListAutopilotRules() (*autv1alpha1.AutopilotRuleList, error)
- func (c *Client) SetConfig(cfg *rest.Config)
- func (c *Client) UpdateActionApproval(namespace string, actionApproval *autv1alpha1.ActionApproval) (*autv1alpha1.ActionApproval, error)
- func (c *Client) UpdateAutopilotRule(rule *autv1alpha1.AutopilotRule) (*autv1alpha1.AutopilotRule, error)
- func (c *Client) UpdateAutopilotRuleObject(namespace string, ruleObject *autv1alpha1.AutopilotRuleObject) (*autv1alpha1.AutopilotRuleObject, error)
- type Ops
- type RuleObjectOps
- type RuleOps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetInstance ¶
func SetInstance(i Ops)
SetInstance replaces the instance with the provided one. Should be used only for testing purposes.
Types ¶
type ActionApprovalInterface ¶
type ActionApprovalInterface interface { // CreateActionApproval creates the ActionApproval object CreateActionApproval(actionApproval *autv1alpha1.ActionApproval) (*autv1alpha1.ActionApproval, error) // GetActionApproval gets the ActionApproval for the provided name GetActionApproval(namespace, name string) (*autv1alpha1.ActionApproval, error) // UpdateActionApproval updates the ActionApproval UpdateActionApproval(namespace string, actionApproval *autv1alpha1.ActionApproval) (*autv1alpha1.ActionApproval, error) // DeleteActionApproval deletes the ActionApproval of the given name DeleteActionApproval(namespace, name string) error // ListActionApprovals lists ActionApproval ListActionApprovals(namespace string) (*autv1alpha1.ActionApprovalList, error) }
ActionApprovalInterface has methods to work with ActionApproval resources.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides a wrapper for the autopilot client.
func NewForConfig ¶
NewForConfig builds a new autopilot client for the given config.
func (*Client) CreateActionApproval ¶
func (c *Client) CreateActionApproval(actionApproval *autv1alpha1.ActionApproval) (*autv1alpha1.ActionApproval, error)
CreateActionApproval creates the ActionApproval object
func (*Client) CreateAutopilotRule ¶
func (c *Client) CreateAutopilotRule(rule *autv1alpha1.AutopilotRule) (*autv1alpha1.AutopilotRule, error)
CreateAutopilotRule creates the AutopilotRule object
func (*Client) CreateAutopilotRuleObject ¶
func (c *Client) CreateAutopilotRuleObject(ruleObject *autv1alpha1.AutopilotRuleObject) (*autv1alpha1.AutopilotRuleObject, error)
CreateAutopilotRuleObject creates the AutopilotRuleObject object
func (*Client) DeleteActionApproval ¶
DeleteActionApproval deletes the ActionApproval of the given name
func (*Client) DeleteAutopilotRule ¶
DeleteAutopilotRule deletes the AutopilotRule of the given name
func (*Client) DeleteAutopilotRuleObject ¶
DeleteAutopilotRuleObject deletes the AutopilotRuleObject of the given name
func (*Client) GetActionApproval ¶
func (c *Client) GetActionApproval(namespace, name string) (*autv1alpha1.ActionApproval, error)
GetActionApproval gets the ActionApproval for the provided name
func (*Client) GetAutopilotRule ¶
func (c *Client) GetAutopilotRule(name string) (*autv1alpha1.AutopilotRule, error)
GetAutopilotRule gets the AutopilotRule for the provided name
func (*Client) GetAutopilotRuleObject ¶
func (c *Client) GetAutopilotRuleObject(namespace, name string) (*autv1alpha1.AutopilotRuleObject, error)
GetAutopilotRuleObject gets the AutopilotRuleObject for the provided name
func (*Client) ListActionApprovals ¶
func (c *Client) ListActionApprovals(namespace string) (*autv1alpha1.ActionApprovalList, error)
ListActionApprovals lists ActionApproval
func (*Client) ListAutopilotRuleObjects ¶
func (c *Client) ListAutopilotRuleObjects(namespace string) (*autv1alpha1.AutopilotRuleObjectList, error)
ListAutopilotRuleObjects lists AutopilotRuleObjects
func (*Client) ListAutopilotRules ¶
func (c *Client) ListAutopilotRules() (*autv1alpha1.AutopilotRuleList, error)
ListAutopilotRules lists AutopilotRules
func (*Client) UpdateActionApproval ¶
func (c *Client) UpdateActionApproval(namespace string, actionApproval *autv1alpha1.ActionApproval) (*autv1alpha1.ActionApproval, error)
UpdateActionApproval updates the ActionApproval
func (*Client) UpdateAutopilotRule ¶
func (c *Client) UpdateAutopilotRule(rule *autv1alpha1.AutopilotRule) (*autv1alpha1.AutopilotRule, error)
UpdateAutopilotRule updates the AutopilotRule
func (*Client) UpdateAutopilotRuleObject ¶
func (c *Client) UpdateAutopilotRuleObject(namespace string, ruleObject *autv1alpha1.AutopilotRuleObject) (*autv1alpha1.AutopilotRuleObject, error)
UpdateAutopilotRuleObject updates the AutopilotRuleObject
type Ops ¶
type Ops interface { RuleOps RuleObjectOps ActionApprovalInterface // SetConfig sets the config and resets the client SetConfig(config *rest.Config) }
Ops provides an interface to Autopilot operations.
func NewInstanceFromConfigFile ¶
NewInstanceFromConfigFile returns new instance of client by using given config file
type RuleObjectOps ¶
type RuleObjectOps interface { // CreateAutopilotRuleObject creates the AutopilotRuleObject object CreateAutopilotRuleObject(*autv1alpha1.AutopilotRuleObject) (*autv1alpha1.AutopilotRuleObject, error) // GetAutopilotRuleObject gets the AutopilotRuleObject for the provided name GetAutopilotRuleObject(namespace, name string) (*autv1alpha1.AutopilotRuleObject, error) // UpdateAutopilotRuleObject updates the AutopilotRuleObject UpdateAutopilotRuleObject(namespace string, object *autv1alpha1.AutopilotRuleObject) (*autv1alpha1.AutopilotRuleObject, error) // DeleteAutopilotRuleObject deletes the AutopilotRuleObject of the given name DeleteAutopilotRuleObject(namespace, name string) error // ListAutopilotRules lists AutopilotRulesObjects ListAutopilotRuleObjects(namespace string) (*autv1alpha1.AutopilotRuleObjectList, error) }
RuleObjectOps is an interface to perform k8s AutopilotRuleObjects operations
type RuleOps ¶
type RuleOps interface { // CreateAutopilotRule creates the AutopilotRule object CreateAutopilotRule(*autv1alpha1.AutopilotRule) (*autv1alpha1.AutopilotRule, error) // GetAutopilotRule gets the AutopilotRule for the provided name GetAutopilotRule(string) (*autv1alpha1.AutopilotRule, error) // UpdateAutopilotRule updates the AutopilotRule UpdateAutopilotRule(*autv1alpha1.AutopilotRule) (*autv1alpha1.AutopilotRule, error) // DeleteAutopilotRule deletes the AutopilotRule of the given name DeleteAutopilotRule(string) error // ListAutopilotRules lists AutopilotRules ListAutopilotRules() (*autv1alpha1.AutopilotRuleList, error) }
RuleOps is an interface to perform k8s AutopilotRule operations