mirror of
https://github.com/rancher/types.git
synced 2025-09-18 07:52:41 +00:00
Update generated code
This commit is contained in:
@@ -23,22 +23,6 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
||||
in.(*Action).DeepCopyInto(out.(*Action))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&Action{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*App).DeepCopyInto(out.(*App))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&App{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*AppList).DeepCopyInto(out.(*AppList))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&AppList{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*AppSpec).DeepCopyInto(out.(*AppSpec))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&AppSpec{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*AppStatus).DeepCopyInto(out.(*AppStatus))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&AppStatus{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*AuthConfig).DeepCopyInto(out.(*AuthConfig))
|
||||
return nil
|
||||
@@ -463,10 +447,6 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
||||
in.(*RancherKubernetesEngineConfig).DeepCopyInto(out.(*RancherKubernetesEngineConfig))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&RancherKubernetesEngineConfig{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*ReleaseInfo).DeepCopyInto(out.(*ReleaseInfo))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&ReleaseInfo{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*RoleTemplate).DeepCopyInto(out.(*RoleTemplate))
|
||||
return nil
|
||||
@@ -578,133 +558,6 @@ func (in *Action) DeepCopy() *Action {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *App) DeepCopyInto(out *App) {
|
||||
*out = *in
|
||||
out.Namespaced = in.Namespaced
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new App.
|
||||
func (in *App) DeepCopy() *App {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(App)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *App) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AppList) DeepCopyInto(out *AppList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]App, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppList.
|
||||
func (in *AppList) DeepCopy() *AppList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(AppList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *AppList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AppSpec) DeepCopyInto(out *AppSpec) {
|
||||
*out = *in
|
||||
if in.Templates != nil {
|
||||
in, out := &in.Templates, &out.Templates
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.Answers != nil {
|
||||
in, out := &in.Answers, &out.Answers
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.Tag != nil {
|
||||
in, out := &in.Tag, &out.Tag
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.Groups != nil {
|
||||
in, out := &in.Groups, &out.Groups
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppSpec.
|
||||
func (in *AppSpec) DeepCopy() *AppSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(AppSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AppStatus) DeepCopyInto(out *AppStatus) {
|
||||
*out = *in
|
||||
if in.Releases != nil {
|
||||
in, out := &in.Releases, &out.Releases
|
||||
*out = make([]ReleaseInfo, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppStatus.
|
||||
func (in *AppStatus) DeepCopy() *AppStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(AppStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AuthConfig) DeepCopyInto(out *AuthConfig) {
|
||||
*out = *in
|
||||
@@ -3628,22 +3481,6 @@ func (in *RancherKubernetesEngineConfig) DeepCopy() *RancherKubernetesEngineConf
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ReleaseInfo) DeepCopyInto(out *ReleaseInfo) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReleaseInfo.
|
||||
func (in *ReleaseInfo) DeepCopy() *ReleaseInfo {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ReleaseInfo)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *RoleTemplate) DeepCopyInto(out *RoleTemplate) {
|
||||
*out = *in
|
||||
|
@@ -37,7 +37,6 @@ type Interface interface {
|
||||
AuthConfigsGetter
|
||||
TokensGetter
|
||||
DynamicSchemasGetter
|
||||
AppsGetter
|
||||
PreferencesGetter
|
||||
ClusterLoggingsGetter
|
||||
ProjectLoggingsGetter
|
||||
@@ -73,7 +72,6 @@ type Client struct {
|
||||
authConfigControllers map[string]AuthConfigController
|
||||
tokenControllers map[string]TokenController
|
||||
dynamicSchemaControllers map[string]DynamicSchemaController
|
||||
appControllers map[string]AppController
|
||||
preferenceControllers map[string]PreferenceController
|
||||
clusterLoggingControllers map[string]ClusterLoggingController
|
||||
projectLoggingControllers map[string]ProjectLoggingController
|
||||
@@ -118,7 +116,6 @@ func NewForConfig(config rest.Config) (Interface, error) {
|
||||
authConfigControllers: map[string]AuthConfigController{},
|
||||
tokenControllers: map[string]TokenController{},
|
||||
dynamicSchemaControllers: map[string]DynamicSchemaController{},
|
||||
appControllers: map[string]AppController{},
|
||||
preferenceControllers: map[string]PreferenceController{},
|
||||
clusterLoggingControllers: map[string]ClusterLoggingController{},
|
||||
projectLoggingControllers: map[string]ProjectLoggingController{},
|
||||
@@ -438,19 +435,6 @@ func (c *Client) DynamicSchemas(namespace string) DynamicSchemaInterface {
|
||||
}
|
||||
}
|
||||
|
||||
type AppsGetter interface {
|
||||
Apps(namespace string) AppInterface
|
||||
}
|
||||
|
||||
func (c *Client) Apps(namespace string) AppInterface {
|
||||
objectClient := clientbase.NewObjectClient(namespace, c.restClient, &AppResource, AppGroupVersionKind, appFactory{})
|
||||
return &appClient{
|
||||
ns: namespace,
|
||||
client: c,
|
||||
objectClient: objectClient,
|
||||
}
|
||||
}
|
||||
|
||||
type PreferencesGetter interface {
|
||||
Preferences(namespace string) PreferenceInterface
|
||||
}
|
||||
|
@@ -79,8 +79,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
&TokenList{},
|
||||
&DynamicSchema{},
|
||||
&DynamicSchemaList{},
|
||||
&App{},
|
||||
&AppList{},
|
||||
&Preference{},
|
||||
&PreferenceList{},
|
||||
&ClusterLogging{},
|
||||
|
@@ -17,6 +17,22 @@ func init() {
|
||||
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
|
||||
func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
||||
return scheme.AddGeneratedDeepCopyFuncs(
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*App).DeepCopyInto(out.(*App))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&App{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*AppList).DeepCopyInto(out.(*AppList))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&AppList{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*AppSpec).DeepCopyInto(out.(*AppSpec))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&AppSpec{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*AppStatus).DeepCopyInto(out.(*AppStatus))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&AppStatus{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*BasicAuth).DeepCopyInto(out.(*BasicAuth))
|
||||
return nil
|
||||
@@ -117,6 +133,10 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
||||
in.(*RegistryCredential).DeepCopyInto(out.(*RegistryCredential))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&RegistryCredential{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*ReleaseInfo).DeepCopyInto(out.(*ReleaseInfo))
|
||||
return nil
|
||||
}, InType: reflect.TypeOf(&ReleaseInfo{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
in.(*SSHAuth).DeepCopyInto(out.(*SSHAuth))
|
||||
return nil
|
||||
@@ -152,6 +172,133 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
||||
)
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *App) DeepCopyInto(out *App) {
|
||||
*out = *in
|
||||
out.Namespaced = in.Namespaced
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new App.
|
||||
func (in *App) DeepCopy() *App {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(App)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *App) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AppList) DeepCopyInto(out *AppList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]App, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppList.
|
||||
func (in *AppList) DeepCopy() *AppList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(AppList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *AppList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AppSpec) DeepCopyInto(out *AppSpec) {
|
||||
*out = *in
|
||||
if in.Templates != nil {
|
||||
in, out := &in.Templates, &out.Templates
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.Answers != nil {
|
||||
in, out := &in.Answers, &out.Answers
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.Tag != nil {
|
||||
in, out := &in.Tag, &out.Tag
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.Groups != nil {
|
||||
in, out := &in.Groups, &out.Groups
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppSpec.
|
||||
func (in *AppSpec) DeepCopy() *AppSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(AppSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AppStatus) DeepCopyInto(out *AppStatus) {
|
||||
*out = *in
|
||||
if in.Releases != nil {
|
||||
in, out := &in.Releases, &out.Releases
|
||||
*out = make([]ReleaseInfo, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppStatus.
|
||||
func (in *AppStatus) DeepCopy() *AppStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(AppStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *BasicAuth) DeepCopyInto(out *BasicAuth) {
|
||||
*out = *in
|
||||
@@ -861,6 +1008,22 @@ func (in *RegistryCredential) DeepCopy() *RegistryCredential {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ReleaseInfo) DeepCopyInto(out *ReleaseInfo) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReleaseInfo.
|
||||
func (in *ReleaseInfo) DeepCopy() *ReleaseInfo {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ReleaseInfo)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *SSHAuth) DeepCopyInto(out *SSHAuth) {
|
||||
*out = *in
|
||||
|
@@ -25,6 +25,7 @@ type Interface interface {
|
||||
NamespacedBasicAuthsGetter
|
||||
NamespacedSSHAuthsGetter
|
||||
WorkloadsGetter
|
||||
AppsGetter
|
||||
}
|
||||
|
||||
type Client struct {
|
||||
@@ -43,6 +44,7 @@ type Client struct {
|
||||
namespacedBasicAuthControllers map[string]NamespacedBasicAuthController
|
||||
namespacedSshAuthControllers map[string]NamespacedSSHAuthController
|
||||
workloadControllers map[string]WorkloadController
|
||||
appControllers map[string]AppController
|
||||
}
|
||||
|
||||
func NewForConfig(config rest.Config) (Interface, error) {
|
||||
@@ -70,6 +72,7 @@ func NewForConfig(config rest.Config) (Interface, error) {
|
||||
namespacedBasicAuthControllers: map[string]NamespacedBasicAuthController{},
|
||||
namespacedSshAuthControllers: map[string]NamespacedSSHAuthController{},
|
||||
workloadControllers: map[string]WorkloadController{},
|
||||
appControllers: map[string]AppController{},
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -227,3 +230,16 @@ func (c *Client) Workloads(namespace string) WorkloadInterface {
|
||||
objectClient: objectClient,
|
||||
}
|
||||
}
|
||||
|
||||
type AppsGetter interface {
|
||||
Apps(namespace string) AppInterface
|
||||
}
|
||||
|
||||
func (c *Client) Apps(namespace string) AppInterface {
|
||||
objectClient := clientbase.NewObjectClient(namespace, c.restClient, &AppResource, AppGroupVersionKind, appFactory{})
|
||||
return &appClient{
|
||||
ns: namespace,
|
||||
client: c,
|
||||
objectClient: objectClient,
|
||||
}
|
||||
}
|
||||
|
@@ -55,6 +55,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
&NamespacedSSHAuthList{},
|
||||
&Workload{},
|
||||
&WorkloadList{},
|
||||
&App{},
|
||||
&AppList{},
|
||||
)
|
||||
return nil
|
||||
}
|
||||
|
@@ -31,7 +31,6 @@ type Client struct {
|
||||
AuthConfig AuthConfigOperations
|
||||
Token TokenOperations
|
||||
DynamicSchema DynamicSchemaOperations
|
||||
App AppOperations
|
||||
Preference PreferenceOperations
|
||||
ClusterLogging ClusterLoggingOperations
|
||||
ProjectLogging ProjectLoggingOperations
|
||||
@@ -73,7 +72,6 @@ func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
|
||||
client.AuthConfig = newAuthConfigClient(client)
|
||||
client.Token = newTokenClient(client)
|
||||
client.DynamicSchema = newDynamicSchemaClient(client)
|
||||
client.App = newAppClient(client)
|
||||
client.Preference = newPreferenceClient(client)
|
||||
client.ClusterLogging = newClusterLoggingClient(client)
|
||||
client.ProjectLogging = newProjectLoggingClient(client)
|
||||
|
@@ -7,7 +7,6 @@ import (
|
||||
type Client struct {
|
||||
clientbase.APIBaseClient
|
||||
|
||||
Namespace NamespaceOperations
|
||||
PersistentVolumeClaim PersistentVolumeClaimOperations
|
||||
Ingress IngressOperations
|
||||
Secret SecretOperations
|
||||
@@ -31,6 +30,7 @@ type Client struct {
|
||||
ReplicationController ReplicationControllerOperations
|
||||
DaemonSet DaemonSetOperations
|
||||
Workload WorkloadOperations
|
||||
App AppOperations
|
||||
ConfigMap ConfigMapOperations
|
||||
}
|
||||
|
||||
@@ -44,7 +44,6 @@ func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
|
||||
APIBaseClient: baseClient,
|
||||
}
|
||||
|
||||
client.Namespace = newNamespaceClient(client)
|
||||
client.PersistentVolumeClaim = newPersistentVolumeClaimClient(client)
|
||||
client.Ingress = newIngressClient(client)
|
||||
client.Secret = newSecretClient(client)
|
||||
@@ -68,6 +67,7 @@ func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
|
||||
client.ReplicationController = newReplicationControllerClient(client)
|
||||
client.DaemonSet = newDaemonSetClient(client)
|
||||
client.Workload = newWorkloadClient(client)
|
||||
client.App = newAppClient(client)
|
||||
client.ConfigMap = newConfigMapClient(client)
|
||||
|
||||
return client, nil
|
||||
|
@@ -1,113 +0,0 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/types"
|
||||
)
|
||||
|
||||
const (
|
||||
NamespaceType = "namespace"
|
||||
NamespaceFieldAnnotations = "annotations"
|
||||
NamespaceFieldAnswers = "answers"
|
||||
NamespaceFieldCreated = "created"
|
||||
NamespaceFieldCreatorID = "creatorId"
|
||||
NamespaceFieldDescription = "description"
|
||||
NamespaceFieldExternalID = "externalId"
|
||||
NamespaceFieldLabels = "labels"
|
||||
NamespaceFieldName = "name"
|
||||
NamespaceFieldOwnerReferences = "ownerReferences"
|
||||
NamespaceFieldProjectID = "projectId"
|
||||
NamespaceFieldPrune = "prune"
|
||||
NamespaceFieldRemoved = "removed"
|
||||
NamespaceFieldState = "state"
|
||||
NamespaceFieldStatus = "status"
|
||||
NamespaceFieldTags = "tags"
|
||||
NamespaceFieldTemplates = "templates"
|
||||
NamespaceFieldTransitioning = "transitioning"
|
||||
NamespaceFieldTransitioningMessage = "transitioningMessage"
|
||||
NamespaceFieldUuid = "uuid"
|
||||
)
|
||||
|
||||
type Namespace struct {
|
||||
types.Resource
|
||||
Annotations map[string]string `json:"annotations,omitempty"`
|
||||
Answers map[string]interface{} `json:"answers,omitempty"`
|
||||
Created string `json:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
ExternalID string `json:"externalId,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"`
|
||||
ProjectID string `json:"projectId,omitempty"`
|
||||
Prune *bool `json:"prune,omitempty"`
|
||||
Removed string `json:"removed,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
Status *NamespaceStatus `json:"status,omitempty"`
|
||||
Tags []string `json:"tags,omitempty"`
|
||||
Templates map[string]string `json:"templates,omitempty"`
|
||||
Transitioning string `json:"transitioning,omitempty"`
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty"`
|
||||
Uuid string `json:"uuid,omitempty"`
|
||||
}
|
||||
type NamespaceCollection struct {
|
||||
types.Collection
|
||||
Data []Namespace `json:"data,omitempty"`
|
||||
client *NamespaceClient
|
||||
}
|
||||
|
||||
type NamespaceClient struct {
|
||||
apiClient *Client
|
||||
}
|
||||
|
||||
type NamespaceOperations interface {
|
||||
List(opts *types.ListOpts) (*NamespaceCollection, error)
|
||||
Create(opts *Namespace) (*Namespace, error)
|
||||
Update(existing *Namespace, updates interface{}) (*Namespace, error)
|
||||
ByID(id string) (*Namespace, error)
|
||||
Delete(container *Namespace) error
|
||||
}
|
||||
|
||||
func newNamespaceClient(apiClient *Client) *NamespaceClient {
|
||||
return &NamespaceClient{
|
||||
apiClient: apiClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *NamespaceClient) Create(container *Namespace) (*Namespace, error) {
|
||||
resp := &Namespace{}
|
||||
err := c.apiClient.Ops.DoCreate(NamespaceType, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *NamespaceClient) Update(existing *Namespace, updates interface{}) (*Namespace, error) {
|
||||
resp := &Namespace{}
|
||||
err := c.apiClient.Ops.DoUpdate(NamespaceType, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *NamespaceClient) List(opts *types.ListOpts) (*NamespaceCollection, error) {
|
||||
resp := &NamespaceCollection{}
|
||||
err := c.apiClient.Ops.DoList(NamespaceType, opts, resp)
|
||||
resp.client = c
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (cc *NamespaceCollection) Next() (*NamespaceCollection, error) {
|
||||
if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
|
||||
resp := &NamespaceCollection{}
|
||||
err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp)
|
||||
resp.client = cc.client
|
||||
return resp, err
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (c *NamespaceClient) ByID(id string) (*Namespace, error) {
|
||||
resp := &Namespace{}
|
||||
err := c.apiClient.Ops.DoByID(NamespaceType, id, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *NamespaceClient) Delete(container *Namespace) error {
|
||||
return c.apiClient.Ops.DoResourceDelete(NamespaceType, &container.Resource)
|
||||
}
|
@@ -1,8 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
NamespaceSpecType = "namespaceSpec"
|
||||
)
|
||||
|
||||
type NamespaceSpec struct {
|
||||
}
|
@@ -1,8 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
NamespaceStatusType = "namespaceStatus"
|
||||
)
|
||||
|
||||
type NamespaceStatus struct {
|
||||
}
|
Reference in New Issue
Block a user