1
0
mirror of https://github.com/rancher/types.git synced 2025-09-25 04:12:02 +00:00

Go generated

This commit is contained in:
Frank Mai
2019-08-06 11:01:19 +08:00
committed by Alena Prokharchyk
parent 719551e498
commit 376c6f64c7
11 changed files with 2 additions and 2516 deletions

View File

@@ -69,7 +69,6 @@ type Client struct {
RKEK8sSystemImage RKEK8sSystemImageOperations
RKEK8sServiceOption RKEK8sServiceOptionOperations
RKEAddon RKEAddonOperations
RKEK8sWindowsSystemImage RKEK8sWindowsSystemImageOperations
}
func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
@@ -144,7 +143,6 @@ func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
client.RKEK8sSystemImage = newRKEK8sSystemImageClient(client)
client.RKEK8sServiceOption = newRKEK8sServiceOptionClient(client)
client.RKEAddon = newRKEAddonClient(client)
client.RKEK8sWindowsSystemImage = newRKEK8sWindowsSystemImageClient(client)
return client, nil
}

View File

@@ -1,101 +0,0 @@
package client
import (
"github.com/rancher/norman/types"
)
const (
RKEK8sWindowsSystemImageType = "rkeK8sWindowsSystemImage"
RKEK8sWindowsSystemImageFieldAnnotations = "annotations"
RKEK8sWindowsSystemImageFieldCreated = "created"
RKEK8sWindowsSystemImageFieldCreatorID = "creatorId"
RKEK8sWindowsSystemImageFieldLabels = "labels"
RKEK8sWindowsSystemImageFieldName = "name"
RKEK8sWindowsSystemImageFieldOwnerReferences = "ownerReferences"
RKEK8sWindowsSystemImageFieldRemoved = "removed"
RKEK8sWindowsSystemImageFieldSystemImages = "windowsSystemImages"
RKEK8sWindowsSystemImageFieldUUID = "uuid"
)
type RKEK8sWindowsSystemImage struct {
types.Resource
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
Created string `json:"created,omitempty" yaml:"created,omitempty"`
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
SystemImages *WindowsSystemImages `json:"windowsSystemImages,omitempty" yaml:"windowsSystemImages,omitempty"`
UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
}
type RKEK8sWindowsSystemImageCollection struct {
types.Collection
Data []RKEK8sWindowsSystemImage `json:"data,omitempty"`
client *RKEK8sWindowsSystemImageClient
}
type RKEK8sWindowsSystemImageClient struct {
apiClient *Client
}
type RKEK8sWindowsSystemImageOperations interface {
List(opts *types.ListOpts) (*RKEK8sWindowsSystemImageCollection, error)
Create(opts *RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error)
Update(existing *RKEK8sWindowsSystemImage, updates interface{}) (*RKEK8sWindowsSystemImage, error)
Replace(existing *RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error)
ByID(id string) (*RKEK8sWindowsSystemImage, error)
Delete(container *RKEK8sWindowsSystemImage) error
}
func newRKEK8sWindowsSystemImageClient(apiClient *Client) *RKEK8sWindowsSystemImageClient {
return &RKEK8sWindowsSystemImageClient{
apiClient: apiClient,
}
}
func (c *RKEK8sWindowsSystemImageClient) Create(container *RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error) {
resp := &RKEK8sWindowsSystemImage{}
err := c.apiClient.Ops.DoCreate(RKEK8sWindowsSystemImageType, container, resp)
return resp, err
}
func (c *RKEK8sWindowsSystemImageClient) Update(existing *RKEK8sWindowsSystemImage, updates interface{}) (*RKEK8sWindowsSystemImage, error) {
resp := &RKEK8sWindowsSystemImage{}
err := c.apiClient.Ops.DoUpdate(RKEK8sWindowsSystemImageType, &existing.Resource, updates, resp)
return resp, err
}
func (c *RKEK8sWindowsSystemImageClient) Replace(obj *RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error) {
resp := &RKEK8sWindowsSystemImage{}
err := c.apiClient.Ops.DoReplace(RKEK8sWindowsSystemImageType, &obj.Resource, obj, resp)
return resp, err
}
func (c *RKEK8sWindowsSystemImageClient) List(opts *types.ListOpts) (*RKEK8sWindowsSystemImageCollection, error) {
resp := &RKEK8sWindowsSystemImageCollection{}
err := c.apiClient.Ops.DoList(RKEK8sWindowsSystemImageType, opts, resp)
resp.client = c
return resp, err
}
func (cc *RKEK8sWindowsSystemImageCollection) Next() (*RKEK8sWindowsSystemImageCollection, error) {
if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
resp := &RKEK8sWindowsSystemImageCollection{}
err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp)
resp.client = cc.client
return resp, err
}
return nil, nil
}
func (c *RKEK8sWindowsSystemImageClient) ByID(id string) (*RKEK8sWindowsSystemImage, error) {
resp := &RKEK8sWindowsSystemImage{}
err := c.apiClient.Ops.DoByID(RKEK8sWindowsSystemImageType, id, resp)
return resp, err
}
func (c *RKEK8sWindowsSystemImageClient) Delete(container *RKEK8sWindowsSystemImage) error {
return c.apiClient.Ops.DoResourceDelete(RKEK8sWindowsSystemImageType, &container.Resource)
}

View File

@@ -31,6 +31,7 @@ const (
RKESystemImagesFieldPodInfraContainer = "podInfraContainer"
RKESystemImagesFieldWeaveCNI = "weaveCni"
RKESystemImagesFieldWeaveNode = "weaveNode"
RKESystemImagesFieldWindowsPodInfraContainer = "podInfraWindowsContainer"
)
type RKESystemImages struct {
@@ -63,4 +64,5 @@ type RKESystemImages struct {
PodInfraContainer string `json:"podInfraContainer,omitempty" yaml:"podInfraContainer,omitempty"`
WeaveCNI string `json:"weaveCni,omitempty" yaml:"weaveCni,omitempty"`
WeaveNode string `json:"weaveNode,omitempty" yaml:"weaveNode,omitempty"`
WindowsPodInfraContainer string `json:"podInfraWindowsContainer,omitempty" yaml:"podInfraWindowsContainer,omitempty"`
}

View File

@@ -1,20 +0,0 @@
package client
const (
WindowsSystemImagesType = "windowsSystemImages"
WindowsSystemImagesFieldCalicoCNIBinaries = "calicoCniBinaries"
WindowsSystemImagesFieldCanalCNIBinaries = "canalCniBinaries"
WindowsSystemImagesFieldFlannelCNIBinaries = "flannelCniBinaries"
WindowsSystemImagesFieldKubeletPause = "kubeletPause"
WindowsSystemImagesFieldKubernetesBinaries = "kubernetesBinaries"
WindowsSystemImagesFieldNginxProxy = "nginxProxy"
)
type WindowsSystemImages struct {
CalicoCNIBinaries string `json:"calicoCniBinaries,omitempty" yaml:"calicoCniBinaries,omitempty"`
CanalCNIBinaries string `json:"canalCniBinaries,omitempty" yaml:"canalCniBinaries,omitempty"`
FlannelCNIBinaries string `json:"flannelCniBinaries,omitempty" yaml:"flannelCniBinaries,omitempty"`
KubeletPause string `json:"kubeletPause,omitempty" yaml:"kubeletPause,omitempty"`
KubernetesBinaries string `json:"kubernetesBinaries,omitempty" yaml:"kubernetesBinaries,omitempty"`
NginxProxy string `json:"nginxProxy,omitempty" yaml:"nginxProxy,omitempty"`
}