mirror of
https://github.com/rancher/types.git
synced 2025-09-12 02:19:49 +00:00
go generate changes
This commit is contained in:
101
client/management/v3/zz_generated_cis_benchmark_version.go
Normal file
101
client/management/v3/zz_generated_cis_benchmark_version.go
Normal file
@@ -0,0 +1,101 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/types"
|
||||
)
|
||||
|
||||
const (
|
||||
CisBenchmarkVersionType = "cisBenchmarkVersion"
|
||||
CisBenchmarkVersionFieldAnnotations = "annotations"
|
||||
CisBenchmarkVersionFieldCreated = "created"
|
||||
CisBenchmarkVersionFieldCreatorID = "creatorId"
|
||||
CisBenchmarkVersionFieldInfo = "info"
|
||||
CisBenchmarkVersionFieldLabels = "labels"
|
||||
CisBenchmarkVersionFieldName = "name"
|
||||
CisBenchmarkVersionFieldOwnerReferences = "ownerReferences"
|
||||
CisBenchmarkVersionFieldRemoved = "removed"
|
||||
CisBenchmarkVersionFieldUUID = "uuid"
|
||||
)
|
||||
|
||||
type CisBenchmarkVersion 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"`
|
||||
Info *CisBenchmarkVersionInfo `json:"info,omitempty" yaml:"info,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"`
|
||||
UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type CisBenchmarkVersionCollection struct {
|
||||
types.Collection
|
||||
Data []CisBenchmarkVersion `json:"data,omitempty"`
|
||||
client *CisBenchmarkVersionClient
|
||||
}
|
||||
|
||||
type CisBenchmarkVersionClient struct {
|
||||
apiClient *Client
|
||||
}
|
||||
|
||||
type CisBenchmarkVersionOperations interface {
|
||||
List(opts *types.ListOpts) (*CisBenchmarkVersionCollection, error)
|
||||
Create(opts *CisBenchmarkVersion) (*CisBenchmarkVersion, error)
|
||||
Update(existing *CisBenchmarkVersion, updates interface{}) (*CisBenchmarkVersion, error)
|
||||
Replace(existing *CisBenchmarkVersion) (*CisBenchmarkVersion, error)
|
||||
ByID(id string) (*CisBenchmarkVersion, error)
|
||||
Delete(container *CisBenchmarkVersion) error
|
||||
}
|
||||
|
||||
func newCisBenchmarkVersionClient(apiClient *Client) *CisBenchmarkVersionClient {
|
||||
return &CisBenchmarkVersionClient{
|
||||
apiClient: apiClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *CisBenchmarkVersionClient) Create(container *CisBenchmarkVersion) (*CisBenchmarkVersion, error) {
|
||||
resp := &CisBenchmarkVersion{}
|
||||
err := c.apiClient.Ops.DoCreate(CisBenchmarkVersionType, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *CisBenchmarkVersionClient) Update(existing *CisBenchmarkVersion, updates interface{}) (*CisBenchmarkVersion, error) {
|
||||
resp := &CisBenchmarkVersion{}
|
||||
err := c.apiClient.Ops.DoUpdate(CisBenchmarkVersionType, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *CisBenchmarkVersionClient) Replace(obj *CisBenchmarkVersion) (*CisBenchmarkVersion, error) {
|
||||
resp := &CisBenchmarkVersion{}
|
||||
err := c.apiClient.Ops.DoReplace(CisBenchmarkVersionType, &obj.Resource, obj, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *CisBenchmarkVersionClient) List(opts *types.ListOpts) (*CisBenchmarkVersionCollection, error) {
|
||||
resp := &CisBenchmarkVersionCollection{}
|
||||
err := c.apiClient.Ops.DoList(CisBenchmarkVersionType, opts, resp)
|
||||
resp.client = c
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (cc *CisBenchmarkVersionCollection) Next() (*CisBenchmarkVersionCollection, error) {
|
||||
if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
|
||||
resp := &CisBenchmarkVersionCollection{}
|
||||
err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp)
|
||||
resp.client = cc.client
|
||||
return resp, err
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (c *CisBenchmarkVersionClient) ByID(id string) (*CisBenchmarkVersion, error) {
|
||||
resp := &CisBenchmarkVersion{}
|
||||
err := c.apiClient.Ops.DoByID(CisBenchmarkVersionType, id, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *CisBenchmarkVersionClient) Delete(container *CisBenchmarkVersion) error {
|
||||
return c.apiClient.Ops.DoResourceDelete(CisBenchmarkVersionType, &container.Resource)
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
CisBenchmarkVersionInfoType = "cisBenchmarkVersionInfo"
|
||||
CisBenchmarkVersionInfoFieldMinKubernetesVersion = "minKubernetesVersion"
|
||||
)
|
||||
|
||||
type CisBenchmarkVersionInfo struct {
|
||||
MinKubernetesVersion string `json:"minKubernetesVersion,omitempty" yaml:"minKubernetesVersion,omitempty"`
|
||||
}
|
101
client/management/v3/zz_generated_cis_config.go
Normal file
101
client/management/v3/zz_generated_cis_config.go
Normal file
@@ -0,0 +1,101 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/types"
|
||||
)
|
||||
|
||||
const (
|
||||
CisConfigType = "cisConfig"
|
||||
CisConfigFieldAnnotations = "annotations"
|
||||
CisConfigFieldCreated = "created"
|
||||
CisConfigFieldCreatorID = "creatorId"
|
||||
CisConfigFieldLabels = "labels"
|
||||
CisConfigFieldName = "name"
|
||||
CisConfigFieldOwnerReferences = "ownerReferences"
|
||||
CisConfigFieldParams = "params"
|
||||
CisConfigFieldRemoved = "removed"
|
||||
CisConfigFieldUUID = "uuid"
|
||||
)
|
||||
|
||||
type CisConfig 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"`
|
||||
Params *CisConfigParams `json:"params,omitempty" yaml:"params,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type CisConfigCollection struct {
|
||||
types.Collection
|
||||
Data []CisConfig `json:"data,omitempty"`
|
||||
client *CisConfigClient
|
||||
}
|
||||
|
||||
type CisConfigClient struct {
|
||||
apiClient *Client
|
||||
}
|
||||
|
||||
type CisConfigOperations interface {
|
||||
List(opts *types.ListOpts) (*CisConfigCollection, error)
|
||||
Create(opts *CisConfig) (*CisConfig, error)
|
||||
Update(existing *CisConfig, updates interface{}) (*CisConfig, error)
|
||||
Replace(existing *CisConfig) (*CisConfig, error)
|
||||
ByID(id string) (*CisConfig, error)
|
||||
Delete(container *CisConfig) error
|
||||
}
|
||||
|
||||
func newCisConfigClient(apiClient *Client) *CisConfigClient {
|
||||
return &CisConfigClient{
|
||||
apiClient: apiClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *CisConfigClient) Create(container *CisConfig) (*CisConfig, error) {
|
||||
resp := &CisConfig{}
|
||||
err := c.apiClient.Ops.DoCreate(CisConfigType, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *CisConfigClient) Update(existing *CisConfig, updates interface{}) (*CisConfig, error) {
|
||||
resp := &CisConfig{}
|
||||
err := c.apiClient.Ops.DoUpdate(CisConfigType, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *CisConfigClient) Replace(obj *CisConfig) (*CisConfig, error) {
|
||||
resp := &CisConfig{}
|
||||
err := c.apiClient.Ops.DoReplace(CisConfigType, &obj.Resource, obj, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *CisConfigClient) List(opts *types.ListOpts) (*CisConfigCollection, error) {
|
||||
resp := &CisConfigCollection{}
|
||||
err := c.apiClient.Ops.DoList(CisConfigType, opts, resp)
|
||||
resp.client = c
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (cc *CisConfigCollection) Next() (*CisConfigCollection, error) {
|
||||
if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
|
||||
resp := &CisConfigCollection{}
|
||||
err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp)
|
||||
resp.client = cc.client
|
||||
return resp, err
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (c *CisConfigClient) ByID(id string) (*CisConfig, error) {
|
||||
resp := &CisConfig{}
|
||||
err := c.apiClient.Ops.DoByID(CisConfigType, id, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *CisConfigClient) Delete(container *CisConfig) error {
|
||||
return c.apiClient.Ops.DoResourceDelete(CisConfigType, &container.Resource)
|
||||
}
|
10
client/management/v3/zz_generated_cis_config_params.go
Normal file
10
client/management/v3/zz_generated_cis_config_params.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
CisConfigParamsType = "cisConfigParams"
|
||||
CisConfigParamsFieldBenchmarkVersion = "benchmarkVersion"
|
||||
)
|
||||
|
||||
type CisConfigParams struct {
|
||||
BenchmarkVersion string `json:"benchmarkVersion,omitempty" yaml:"benchmarkVersion,omitempty"`
|
||||
}
|
@@ -69,6 +69,8 @@ type Client struct {
|
||||
RKEK8sSystemImage RKEK8sSystemImageOperations
|
||||
RKEK8sServiceOption RKEK8sServiceOptionOperations
|
||||
RKEAddon RKEAddonOperations
|
||||
CisConfig CisConfigOperations
|
||||
CisBenchmarkVersion CisBenchmarkVersionOperations
|
||||
}
|
||||
|
||||
func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
|
||||
@@ -143,6 +145,8 @@ func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
|
||||
client.RKEK8sSystemImage = newRKEK8sSystemImageClient(client)
|
||||
client.RKEK8sServiceOption = newRKEK8sServiceOptionClient(client)
|
||||
client.RKEAddon = newRKEAddonClient(client)
|
||||
client.CisConfig = newCisConfigClient(client)
|
||||
client.CisBenchmarkVersion = newCisBenchmarkVersionClient(client)
|
||||
|
||||
return client, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user