mirror of
https://github.com/rancher/types.git
synced 2025-07-16 14:35:49 +00:00
Update generate code
This commit is contained in:
parent
c97b6d39bc
commit
da232d3e4f
@ -7,6 +7,7 @@ import (
|
||||
rbac_v1 "k8s.io/api/rbac/v1"
|
||||
conversion "k8s.io/apimachinery/pkg/conversion"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
version "k8s.io/apimachinery/pkg/version"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -2226,7 +2227,24 @@ func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus) {
|
||||
(*out)[key] = val.DeepCopy()
|
||||
}
|
||||
}
|
||||
in.AppliedSpec.DeepCopyInto(&out.AppliedSpec)
|
||||
if in.AppliedSpec != nil {
|
||||
in, out := &in.AppliedSpec, &out.AppliedSpec
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(ClusterSpec)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
if in.AppliedEtcdSpec != nil {
|
||||
in, out := &in.AppliedEtcdSpec, &out.AppliedEtcdSpec
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(ClusterSpec)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
if in.FailedSpec != nil {
|
||||
in, out := &in.FailedSpec, &out.FailedSpec
|
||||
if *in == nil {
|
||||
@ -2250,6 +2268,15 @@ func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus) {
|
||||
(*out)[key] = val.DeepCopy()
|
||||
}
|
||||
}
|
||||
if in.Version != nil {
|
||||
in, out := &in.Version, &out.Version
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(version.Info)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,7 @@ const (
|
||||
ObjectMetaFieldNamespace = "namespace"
|
||||
ObjectMetaFieldOwnerReferences = "ownerReferences"
|
||||
ObjectMetaFieldRemoved = "removed"
|
||||
ObjectMetaFieldSelfLink = "selfLink"
|
||||
ObjectMetaFieldUuid = "uuid"
|
||||
)
|
||||
|
||||
@ -22,5 +23,6 @@ type ObjectMeta struct {
|
||||
Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
SelfLink string `json:"selfLink,omitempty" yaml:"selfLink,omitempty"`
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
@ -63,6 +63,8 @@ type CatalogOperations interface {
|
||||
Update(existing *Catalog, updates interface{}) (*Catalog, error)
|
||||
ByID(id string) (*Catalog, error)
|
||||
Delete(container *Catalog) error
|
||||
|
||||
ActionRefresh(resource *Catalog) error
|
||||
}
|
||||
|
||||
func newCatalogClient(apiClient *Client) *CatalogClient {
|
||||
@ -109,3 +111,9 @@ func (c *CatalogClient) ByID(id string) (*Catalog, error) {
|
||||
func (c *CatalogClient) Delete(container *Catalog) error {
|
||||
return c.apiClient.Ops.DoResourceDelete(CatalogType, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *CatalogClient) ActionRefresh(resource *Catalog) error {
|
||||
err := c.apiClient.Ops.DoAction(CatalogType, "refresh", &resource.Resource, nil, nil)
|
||||
return err
|
||||
|
||||
}
|
||||
|
@ -10,7 +10,9 @@ const (
|
||||
ClusterFieldAgentImage = "agentImage"
|
||||
ClusterFieldAllocatable = "allocatable"
|
||||
ClusterFieldAnnotations = "annotations"
|
||||
ClusterFieldAppliedEtcdSpec = "appliedEtcdSpec"
|
||||
ClusterFieldAppliedPodSecurityPolicyTemplateName = "appliedPodSecurityPolicyTemplateId"
|
||||
ClusterFieldAppliedSpec = "appliedSpec"
|
||||
ClusterFieldAzureKubernetesServiceConfig = "azureKubernetesServiceConfig"
|
||||
ClusterFieldCACert = "caCert"
|
||||
ClusterFieldCapacity = "capacity"
|
||||
@ -38,6 +40,7 @@ const (
|
||||
ClusterFieldTransitioning = "transitioning"
|
||||
ClusterFieldTransitioningMessage = "transitioningMessage"
|
||||
ClusterFieldUuid = "uuid"
|
||||
ClusterFieldVersion = "version"
|
||||
)
|
||||
|
||||
type Cluster struct {
|
||||
@ -46,7 +49,9 @@ type Cluster struct {
|
||||
AgentImage string `json:"agentImage,omitempty" yaml:"agentImage,omitempty"`
|
||||
Allocatable map[string]string `json:"allocatable,omitempty" yaml:"allocatable,omitempty"`
|
||||
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
|
||||
AppliedEtcdSpec *ClusterSpec `json:"appliedEtcdSpec,omitempty" yaml:"appliedEtcdSpec,omitempty"`
|
||||
AppliedPodSecurityPolicyTemplateName string `json:"appliedPodSecurityPolicyTemplateId,omitempty" yaml:"appliedPodSecurityPolicyTemplateId,omitempty"`
|
||||
AppliedSpec *ClusterSpec `json:"appliedSpec,omitempty" yaml:"appliedSpec,omitempty"`
|
||||
AzureKubernetesServiceConfig *AzureKubernetesServiceConfig `json:"azureKubernetesServiceConfig,omitempty" yaml:"azureKubernetesServiceConfig,omitempty"`
|
||||
CACert string `json:"caCert,omitempty" yaml:"caCert,omitempty"`
|
||||
Capacity map[string]string `json:"capacity,omitempty" yaml:"capacity,omitempty"`
|
||||
@ -74,6 +79,7 @@ type Cluster struct {
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"`
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
Version *Info `json:"version,omitempty" yaml:"version,omitempty"`
|
||||
}
|
||||
type ClusterCollection struct {
|
||||
types.Collection
|
||||
|
@ -5,7 +5,9 @@ const (
|
||||
ClusterStatusFieldAPIEndpoint = "apiEndpoint"
|
||||
ClusterStatusFieldAgentImage = "agentImage"
|
||||
ClusterStatusFieldAllocatable = "allocatable"
|
||||
ClusterStatusFieldAppliedEtcdSpec = "appliedEtcdSpec"
|
||||
ClusterStatusFieldAppliedPodSecurityPolicyTemplateName = "appliedPodSecurityPolicyTemplateId"
|
||||
ClusterStatusFieldAppliedSpec = "appliedSpec"
|
||||
ClusterStatusFieldCACert = "caCert"
|
||||
ClusterStatusFieldCapacity = "capacity"
|
||||
ClusterStatusFieldComponentStatuses = "componentStatuses"
|
||||
@ -14,13 +16,16 @@ const (
|
||||
ClusterStatusFieldFailedSpec = "failedSpec"
|
||||
ClusterStatusFieldLimits = "limits"
|
||||
ClusterStatusFieldRequested = "requested"
|
||||
ClusterStatusFieldVersion = "version"
|
||||
)
|
||||
|
||||
type ClusterStatus struct {
|
||||
APIEndpoint string `json:"apiEndpoint,omitempty" yaml:"apiEndpoint,omitempty"`
|
||||
AgentImage string `json:"agentImage,omitempty" yaml:"agentImage,omitempty"`
|
||||
Allocatable map[string]string `json:"allocatable,omitempty" yaml:"allocatable,omitempty"`
|
||||
AppliedEtcdSpec *ClusterSpec `json:"appliedEtcdSpec,omitempty" yaml:"appliedEtcdSpec,omitempty"`
|
||||
AppliedPodSecurityPolicyTemplateName string `json:"appliedPodSecurityPolicyTemplateId,omitempty" yaml:"appliedPodSecurityPolicyTemplateId,omitempty"`
|
||||
AppliedSpec *ClusterSpec `json:"appliedSpec,omitempty" yaml:"appliedSpec,omitempty"`
|
||||
CACert string `json:"caCert,omitempty" yaml:"caCert,omitempty"`
|
||||
Capacity map[string]string `json:"capacity,omitempty" yaml:"capacity,omitempty"`
|
||||
ComponentStatuses []ClusterComponentStatus `json:"componentStatuses,omitempty" yaml:"componentStatuses,omitempty"`
|
||||
@ -29,4 +34,5 @@ type ClusterStatus struct {
|
||||
FailedSpec *ClusterSpec `json:"failedSpec,omitempty" yaml:"failedSpec,omitempty"`
|
||||
Limits map[string]string `json:"limits,omitempty" yaml:"limits,omitempty"`
|
||||
Requested map[string]string `json:"requested,omitempty" yaml:"requested,omitempty"`
|
||||
Version *Info `json:"version,omitempty" yaml:"version,omitempty"`
|
||||
}
|
||||
|
26
client/management/v3/zz_generated_info.go
Normal file
26
client/management/v3/zz_generated_info.go
Normal file
@ -0,0 +1,26 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
InfoType = "info"
|
||||
InfoFieldBuildDate = "buildDate"
|
||||
InfoFieldCompiler = "compiler"
|
||||
InfoFieldGitCommit = "gitCommit"
|
||||
InfoFieldGitTreeState = "gitTreeState"
|
||||
InfoFieldGitVersion = "gitVersion"
|
||||
InfoFieldGoVersion = "goVersion"
|
||||
InfoFieldMajor = "major"
|
||||
InfoFieldMinor = "minor"
|
||||
InfoFieldPlatform = "platform"
|
||||
)
|
||||
|
||||
type Info struct {
|
||||
BuildDate string `json:"buildDate,omitempty" yaml:"buildDate,omitempty"`
|
||||
Compiler string `json:"compiler,omitempty" yaml:"compiler,omitempty"`
|
||||
GitCommit string `json:"gitCommit,omitempty" yaml:"gitCommit,omitempty"`
|
||||
GitTreeState string `json:"gitTreeState,omitempty" yaml:"gitTreeState,omitempty"`
|
||||
GitVersion string `json:"gitVersion,omitempty" yaml:"gitVersion,omitempty"`
|
||||
GoVersion string `json:"goVersion,omitempty" yaml:"goVersion,omitempty"`
|
||||
Major string `json:"major,omitempty" yaml:"major,omitempty"`
|
||||
Minor string `json:"minor,omitempty" yaml:"minor,omitempty"`
|
||||
Platform string `json:"platform,omitempty" yaml:"platform,omitempty"`
|
||||
}
|
@ -65,6 +65,8 @@ type NotifierOperations interface {
|
||||
Update(existing *Notifier, updates interface{}) (*Notifier, error)
|
||||
ByID(id string) (*Notifier, error)
|
||||
Delete(container *Notifier) error
|
||||
|
||||
ActionSend(resource *Notifier, input *Notification) error
|
||||
}
|
||||
|
||||
func newNotifierClient(apiClient *Client) *NotifierClient {
|
||||
@ -111,3 +113,9 @@ func (c *NotifierClient) ByID(id string) (*Notifier, error) {
|
||||
func (c *NotifierClient) Delete(container *Notifier) error {
|
||||
return c.apiClient.Ops.DoResourceDelete(NotifierType, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *NotifierClient) ActionSend(resource *Notifier, input *Notification) error {
|
||||
err := c.apiClient.Ops.DoAction(NotifierType, "send", &resource.Resource, input, nil)
|
||||
return err
|
||||
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ const (
|
||||
ObjectMetaFieldNamespace = "namespace"
|
||||
ObjectMetaFieldOwnerReferences = "ownerReferences"
|
||||
ObjectMetaFieldRemoved = "removed"
|
||||
ObjectMetaFieldSelfLink = "selfLink"
|
||||
ObjectMetaFieldUuid = "uuid"
|
||||
)
|
||||
|
||||
@ -22,5 +23,6 @@ type ObjectMeta struct {
|
||||
Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
SelfLink string `json:"selfLink,omitempty" yaml:"selfLink,omitempty"`
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
@ -67,6 +67,8 @@ type TokenOperations interface {
|
||||
Update(existing *Token, updates interface{}) (*Token, error)
|
||||
ByID(id string) (*Token, error)
|
||||
Delete(container *Token) error
|
||||
|
||||
ActionLogout(resource *Token) error
|
||||
}
|
||||
|
||||
func newTokenClient(apiClient *Client) *TokenClient {
|
||||
@ -113,3 +115,9 @@ func (c *TokenClient) ByID(id string) (*Token, error) {
|
||||
func (c *TokenClient) Delete(container *Token) error {
|
||||
return c.apiClient.Ops.DoResourceDelete(TokenType, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *TokenClient) ActionLogout(resource *Token) error {
|
||||
err := c.apiClient.Ops.DoAction(TokenType, "logout", &resource.Resource, nil, nil)
|
||||
return err
|
||||
|
||||
}
|
||||
|
@ -57,6 +57,8 @@ type UserOperations interface {
|
||||
Delete(container *User) error
|
||||
|
||||
ActionSetpassword(*User, *SetPasswordInput) (*User, error)
|
||||
|
||||
ActionChangepassword(resource *User, input *ChangePasswordInput) error
|
||||
}
|
||||
|
||||
func newUserClient(apiClient *Client) *UserClient {
|
||||
@ -112,3 +114,9 @@ func (c *UserClient) ActionSetpassword(resource *User, input *SetPasswordInput)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *UserClient) ActionChangepassword(resource *User, input *ChangePasswordInput) error {
|
||||
err := c.apiClient.Ops.DoAction(UserType, "changepassword", &resource.Resource, input, nil)
|
||||
return err
|
||||
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ const (
|
||||
ObjectMetaFieldNamespace = "namespace"
|
||||
ObjectMetaFieldOwnerReferences = "ownerReferences"
|
||||
ObjectMetaFieldRemoved = "removed"
|
||||
ObjectMetaFieldSelfLink = "selfLink"
|
||||
ObjectMetaFieldUuid = "uuid"
|
||||
)
|
||||
|
||||
@ -22,5 +23,6 @@ type ObjectMeta struct {
|
||||
Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
SelfLink string `json:"selfLink,omitempty" yaml:"selfLink,omitempty"`
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ const (
|
||||
ObjectMetaFieldNamespace = "namespace"
|
||||
ObjectMetaFieldOwnerReferences = "ownerReferences"
|
||||
ObjectMetaFieldRemoved = "removed"
|
||||
ObjectMetaFieldSelfLink = "selfLink"
|
||||
ObjectMetaFieldUuid = "uuid"
|
||||
)
|
||||
|
||||
@ -22,5 +23,6 @@ type ObjectMeta struct {
|
||||
Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
SelfLink string `json:"selfLink,omitempty" yaml:"selfLink,omitempty"`
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user