mirror of
https://github.com/rancher/types.git
synced 2025-09-25 12:21:24 +00:00
Update generated code
This commit is contained in:
@@ -71,6 +71,10 @@ type AppOperations interface {
|
||||
Update(existing *App, updates interface{}) (*App, error)
|
||||
ByID(id string) (*App, error)
|
||||
Delete(container *App) error
|
||||
|
||||
ActionRollback(resource *App, input *RollbackRevision) error
|
||||
|
||||
ActionUpgrade(resource *App, input *AppUpgradeConfig) error
|
||||
}
|
||||
|
||||
func newAppClient(apiClient *Client) *AppClient {
|
||||
@@ -117,3 +121,13 @@ func (c *AppClient) ByID(id string) (*App, error) {
|
||||
func (c *AppClient) Delete(container *App) error {
|
||||
return c.apiClient.Ops.DoResourceDelete(AppType, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *AppClient) ActionRollback(resource *App, input *RollbackRevision) error {
|
||||
err := c.apiClient.Ops.DoAction(AppType, "rollback", &resource.Resource, input, nil)
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *AppClient) ActionUpgrade(resource *App, input *AppUpgradeConfig) error {
|
||||
err := c.apiClient.Ops.DoAction(AppType, "upgrade", &resource.Resource, input, nil)
|
||||
return err
|
||||
}
|
||||
|
@@ -9,6 +9,7 @@ const (
|
||||
ContainerFieldEntrypoint = "entrypoint"
|
||||
ContainerFieldEnvironment = "environment"
|
||||
ContainerFieldEnvironmentFrom = "environmentFrom"
|
||||
ContainerFieldExitCode = "exitCode"
|
||||
ContainerFieldImage = "image"
|
||||
ContainerFieldImagePullPolicy = "imagePullPolicy"
|
||||
ContainerFieldInitContainer = "initContainer"
|
||||
@@ -21,12 +22,15 @@ const (
|
||||
ContainerFieldReadOnly = "readOnly"
|
||||
ContainerFieldReadinessProbe = "readinessProbe"
|
||||
ContainerFieldResources = "resources"
|
||||
ContainerFieldRestartCount = "restartCount"
|
||||
ContainerFieldRunAsNonRoot = "runAsNonRoot"
|
||||
ContainerFieldState = "state"
|
||||
ContainerFieldStdin = "stdin"
|
||||
ContainerFieldStdinOnce = "stdinOnce"
|
||||
ContainerFieldTTY = "tty"
|
||||
ContainerFieldTerminationMessagePath = "terminationMessagePath"
|
||||
ContainerFieldTerminationMessagePolicy = "terminationMessagePolicy"
|
||||
ContainerFieldTransitioningMessage = "transitioningMessage"
|
||||
ContainerFieldUid = "uid"
|
||||
ContainerFieldVolumeMounts = "volumeMounts"
|
||||
ContainerFieldWorkingDir = "workingDir"
|
||||
@@ -40,6 +44,7 @@ type Container struct {
|
||||
Entrypoint []string `json:"entrypoint,omitempty" yaml:"entrypoint,omitempty"`
|
||||
Environment map[string]string `json:"environment,omitempty" yaml:"environment,omitempty"`
|
||||
EnvironmentFrom []EnvironmentFrom `json:"environmentFrom,omitempty" yaml:"environmentFrom,omitempty"`
|
||||
ExitCode *int64 `json:"exitCode,omitempty" yaml:"exitCode,omitempty"`
|
||||
Image string `json:"image,omitempty" yaml:"image,omitempty"`
|
||||
ImagePullPolicy string `json:"imagePullPolicy,omitempty" yaml:"imagePullPolicy,omitempty"`
|
||||
InitContainer bool `json:"initContainer,omitempty" yaml:"initContainer,omitempty"`
|
||||
@@ -52,12 +57,15 @@ type Container struct {
|
||||
ReadOnly *bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"`
|
||||
ReadinessProbe *Probe `json:"readinessProbe,omitempty" yaml:"readinessProbe,omitempty"`
|
||||
Resources *ResourceRequirements `json:"resources,omitempty" yaml:"resources,omitempty"`
|
||||
RestartCount int64 `json:"restartCount,omitempty" yaml:"restartCount,omitempty"`
|
||||
RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" yaml:"runAsNonRoot,omitempty"`
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
Stdin bool `json:"stdin,omitempty" yaml:"stdin,omitempty"`
|
||||
StdinOnce bool `json:"stdinOnce,omitempty" yaml:"stdinOnce,omitempty"`
|
||||
TTY bool `json:"tty,omitempty" yaml:"tty,omitempty"`
|
||||
TerminationMessagePath string `json:"terminationMessagePath,omitempty" yaml:"terminationMessagePath,omitempty"`
|
||||
TerminationMessagePolicy string `json:"terminationMessagePolicy,omitempty" yaml:"terminationMessagePolicy,omitempty"`
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"`
|
||||
Uid *int64 `json:"uid,omitempty" yaml:"uid,omitempty"`
|
||||
VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" yaml:"volumeMounts,omitempty"`
|
||||
WorkingDir string `json:"workingDir,omitempty" yaml:"workingDir,omitempty"`
|
||||
|
@@ -117,6 +117,12 @@ type DeploymentOperations interface {
|
||||
Update(existing *Deployment, updates interface{}) (*Deployment, error)
|
||||
ByID(id string) (*Deployment, error)
|
||||
Delete(container *Deployment) error
|
||||
|
||||
ActionPause(resource *Deployment) error
|
||||
|
||||
ActionResume(resource *Deployment) error
|
||||
|
||||
ActionRollback(resource *Deployment, input *DeploymentRollbackInput) error
|
||||
}
|
||||
|
||||
func newDeploymentClient(apiClient *Client) *DeploymentClient {
|
||||
@@ -163,3 +169,18 @@ func (c *DeploymentClient) ByID(id string) (*Deployment, error) {
|
||||
func (c *DeploymentClient) Delete(container *Deployment) error {
|
||||
return c.apiClient.Ops.DoResourceDelete(DeploymentType, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *DeploymentClient) ActionPause(resource *Deployment) error {
|
||||
err := c.apiClient.Ops.DoAction(DeploymentType, "pause", &resource.Resource, nil, nil)
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *DeploymentClient) ActionResume(resource *Deployment) error {
|
||||
err := c.apiClient.Ops.DoAction(DeploymentType, "resume", &resource.Resource, nil, nil)
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *DeploymentClient) ActionRollback(resource *Deployment, input *DeploymentRollbackInput) error {
|
||||
err := c.apiClient.Ops.DoAction(DeploymentType, "rollback", &resource.Resource, input, nil)
|
||||
return err
|
||||
}
|
||||
|
@@ -141,6 +141,12 @@ type WorkloadOperations interface {
|
||||
Update(existing *Workload, updates interface{}) (*Workload, error)
|
||||
ByID(id string) (*Workload, error)
|
||||
Delete(container *Workload) error
|
||||
|
||||
ActionPause(resource *Workload) error
|
||||
|
||||
ActionResume(resource *Workload) error
|
||||
|
||||
ActionRollback(resource *Workload, input *RollbackRevision) error
|
||||
}
|
||||
|
||||
func newWorkloadClient(apiClient *Client) *WorkloadClient {
|
||||
@@ -187,3 +193,18 @@ func (c *WorkloadClient) ByID(id string) (*Workload, error) {
|
||||
func (c *WorkloadClient) Delete(container *Workload) error {
|
||||
return c.apiClient.Ops.DoResourceDelete(WorkloadType, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *WorkloadClient) ActionPause(resource *Workload) error {
|
||||
err := c.apiClient.Ops.DoAction(WorkloadType, "pause", &resource.Resource, nil, nil)
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *WorkloadClient) ActionResume(resource *Workload) error {
|
||||
err := c.apiClient.Ops.DoAction(WorkloadType, "resume", &resource.Resource, nil, nil)
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *WorkloadClient) ActionRollback(resource *Workload, input *RollbackRevision) error {
|
||||
err := c.apiClient.Ops.DoAction(WorkloadType, "rollback", &resource.Resource, input, nil)
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user