mirror of
https://github.com/rancher/types.git
synced 2025-09-03 06:04:24 +00:00
Update generated code
This commit is contained in:
@@ -39,7 +39,6 @@ type Client struct {
|
||||
ProjectNetworkPolicy ProjectNetworkPolicyOperations
|
||||
ClusterLogging ClusterLoggingOperations
|
||||
ProjectLogging ProjectLoggingOperations
|
||||
ListenConfig ListenConfigOperations
|
||||
Setting SettingOperations
|
||||
Feature FeatureOperations
|
||||
ClusterAlert ClusterAlertOperations
|
||||
@@ -115,7 +114,6 @@ func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
|
||||
client.ProjectNetworkPolicy = newProjectNetworkPolicyClient(client)
|
||||
client.ClusterLogging = newClusterLoggingClient(client)
|
||||
client.ProjectLogging = newProjectLoggingClient(client)
|
||||
client.ListenConfig = newListenConfigClient(client)
|
||||
client.Setting = newSettingClient(client)
|
||||
client.Feature = newFeatureClient(client)
|
||||
client.ClusterAlert = newClusterAlertClient(client)
|
||||
|
@@ -3,6 +3,7 @@ package client
|
||||
const (
|
||||
GithubConfigType = "githubConfig"
|
||||
GithubConfigFieldAccessMode = "accessMode"
|
||||
GithubConfigFieldAdditionalClientIDs = "additionalClientIds"
|
||||
GithubConfigFieldAllowedPrincipalIDs = "allowedPrincipalIds"
|
||||
GithubConfigFieldAnnotations = "annotations"
|
||||
GithubConfigFieldClientID = "clientId"
|
||||
@@ -11,6 +12,7 @@ const (
|
||||
GithubConfigFieldCreatorID = "creatorId"
|
||||
GithubConfigFieldEnabled = "enabled"
|
||||
GithubConfigFieldHostname = "hostname"
|
||||
GithubConfigFieldHostnameToClientID = "hostnameToClientId"
|
||||
GithubConfigFieldLabels = "labels"
|
||||
GithubConfigFieldName = "name"
|
||||
GithubConfigFieldOwnerReferences = "ownerReferences"
|
||||
@@ -22,6 +24,7 @@ const (
|
||||
|
||||
type GithubConfig struct {
|
||||
AccessMode string `json:"accessMode,omitempty" yaml:"accessMode,omitempty"`
|
||||
AdditionalClientIDs map[string]string `json:"additionalClientIds,omitempty" yaml:"additionalClientIds,omitempty"`
|
||||
AllowedPrincipalIDs []string `json:"allowedPrincipalIds,omitempty" yaml:"allowedPrincipalIds,omitempty"`
|
||||
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
|
||||
ClientID string `json:"clientId,omitempty" yaml:"clientId,omitempty"`
|
||||
@@ -30,6 +33,7 @@ type GithubConfig struct {
|
||||
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
|
||||
Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
|
||||
Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"`
|
||||
HostnameToClientID map[string]string `json:"hostnameToClientId,omitempty" yaml:"hostnameToClientId,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"`
|
||||
|
@@ -1,139 +0,0 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/types"
|
||||
)
|
||||
|
||||
const (
|
||||
ListenConfigType = "listenConfig"
|
||||
ListenConfigFieldAlgorithm = "algorithm"
|
||||
ListenConfigFieldAnnotations = "annotations"
|
||||
ListenConfigFieldCACerts = "caCerts"
|
||||
ListenConfigFieldCN = "cn"
|
||||
ListenConfigFieldCert = "cert"
|
||||
ListenConfigFieldCertFingerprint = "certFingerprint"
|
||||
ListenConfigFieldCreated = "created"
|
||||
ListenConfigFieldCreatorID = "creatorId"
|
||||
ListenConfigFieldDescription = "description"
|
||||
ListenConfigFieldDomains = "domains"
|
||||
ListenConfigFieldEnabled = "enabled"
|
||||
ListenConfigFieldExpiresAt = "expiresAt"
|
||||
ListenConfigFieldGeneratedCerts = "generatedCerts"
|
||||
ListenConfigFieldIssuedAt = "issuedAt"
|
||||
ListenConfigFieldIssuer = "issuer"
|
||||
ListenConfigFieldKey = "key"
|
||||
ListenConfigFieldKeySize = "keySize"
|
||||
ListenConfigFieldKnownIPs = "knownIps"
|
||||
ListenConfigFieldLabels = "labels"
|
||||
ListenConfigFieldMode = "mode"
|
||||
ListenConfigFieldName = "name"
|
||||
ListenConfigFieldOwnerReferences = "ownerReferences"
|
||||
ListenConfigFieldRemoved = "removed"
|
||||
ListenConfigFieldSerialNumber = "serialNumber"
|
||||
ListenConfigFieldSubjectAlternativeNames = "subjectAlternativeNames"
|
||||
ListenConfigFieldTOS = "tos"
|
||||
ListenConfigFieldUUID = "uuid"
|
||||
ListenConfigFieldVersion = "version"
|
||||
)
|
||||
|
||||
type ListenConfig struct {
|
||||
types.Resource
|
||||
Algorithm string `json:"algorithm,omitempty" yaml:"algorithm,omitempty"`
|
||||
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
|
||||
CACerts string `json:"caCerts,omitempty" yaml:"caCerts,omitempty"`
|
||||
CN string `json:"cn,omitempty" yaml:"cn,omitempty"`
|
||||
Cert string `json:"cert,omitempty" yaml:"cert,omitempty"`
|
||||
CertFingerprint string `json:"certFingerprint,omitempty" yaml:"certFingerprint,omitempty"`
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
Domains []string `json:"domains,omitempty" yaml:"domains,omitempty"`
|
||||
Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
|
||||
ExpiresAt string `json:"expiresAt,omitempty" yaml:"expiresAt,omitempty"`
|
||||
GeneratedCerts map[string]string `json:"generatedCerts,omitempty" yaml:"generatedCerts,omitempty"`
|
||||
IssuedAt string `json:"issuedAt,omitempty" yaml:"issuedAt,omitempty"`
|
||||
Issuer string `json:"issuer,omitempty" yaml:"issuer,omitempty"`
|
||||
Key string `json:"key,omitempty" yaml:"key,omitempty"`
|
||||
KeySize int64 `json:"keySize,omitempty" yaml:"keySize,omitempty"`
|
||||
KnownIPs []string `json:"knownIps,omitempty" yaml:"knownIps,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
|
||||
Mode string `json:"mode,omitempty" yaml:"mode,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"`
|
||||
SerialNumber string `json:"serialNumber,omitempty" yaml:"serialNumber,omitempty"`
|
||||
SubjectAlternativeNames []string `json:"subjectAlternativeNames,omitempty" yaml:"subjectAlternativeNames,omitempty"`
|
||||
TOS []string `json:"tos,omitempty" yaml:"tos,omitempty"`
|
||||
UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
Version int64 `json:"version,omitempty" yaml:"version,omitempty"`
|
||||
}
|
||||
|
||||
type ListenConfigCollection struct {
|
||||
types.Collection
|
||||
Data []ListenConfig `json:"data,omitempty"`
|
||||
client *ListenConfigClient
|
||||
}
|
||||
|
||||
type ListenConfigClient struct {
|
||||
apiClient *Client
|
||||
}
|
||||
|
||||
type ListenConfigOperations interface {
|
||||
List(opts *types.ListOpts) (*ListenConfigCollection, error)
|
||||
Create(opts *ListenConfig) (*ListenConfig, error)
|
||||
Update(existing *ListenConfig, updates interface{}) (*ListenConfig, error)
|
||||
Replace(existing *ListenConfig) (*ListenConfig, error)
|
||||
ByID(id string) (*ListenConfig, error)
|
||||
Delete(container *ListenConfig) error
|
||||
}
|
||||
|
||||
func newListenConfigClient(apiClient *Client) *ListenConfigClient {
|
||||
return &ListenConfigClient{
|
||||
apiClient: apiClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ListenConfigClient) Create(container *ListenConfig) (*ListenConfig, error) {
|
||||
resp := &ListenConfig{}
|
||||
err := c.apiClient.Ops.DoCreate(ListenConfigType, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ListenConfigClient) Update(existing *ListenConfig, updates interface{}) (*ListenConfig, error) {
|
||||
resp := &ListenConfig{}
|
||||
err := c.apiClient.Ops.DoUpdate(ListenConfigType, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ListenConfigClient) Replace(obj *ListenConfig) (*ListenConfig, error) {
|
||||
resp := &ListenConfig{}
|
||||
err := c.apiClient.Ops.DoReplace(ListenConfigType, &obj.Resource, obj, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ListenConfigClient) List(opts *types.ListOpts) (*ListenConfigCollection, error) {
|
||||
resp := &ListenConfigCollection{}
|
||||
err := c.apiClient.Ops.DoList(ListenConfigType, opts, resp)
|
||||
resp.client = c
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (cc *ListenConfigCollection) Next() (*ListenConfigCollection, error) {
|
||||
if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
|
||||
resp := &ListenConfigCollection{}
|
||||
err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp)
|
||||
resp.client = cc.client
|
||||
return resp, err
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (c *ListenConfigClient) ByID(id string) (*ListenConfig, error) {
|
||||
resp := &ListenConfig{}
|
||||
err := c.apiClient.Ops.DoByID(ListenConfigType, id, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ListenConfigClient) Delete(container *ListenConfig) error {
|
||||
return c.apiClient.Ops.DoResourceDelete(ListenConfigType, &container.Resource)
|
||||
}
|
Reference in New Issue
Block a user