mirror of
https://github.com/rancher/types.git
synced 2025-09-01 13:18:20 +00:00
generated code
This commit is contained in:
committed by
Darren Shepherd
parent
5cc3e0bed2
commit
f95b1eede3
@@ -1,14 +1,14 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
GithubConfigApplyInputType = "githubConfigApplyInput"
|
||||
GithubConfigApplyInputFieldEnabled = "enabled"
|
||||
GithubConfigApplyInputFieldGithubConfig = "githubConfig"
|
||||
GithubConfigApplyInputFieldGithubCredential = "githubCredential"
|
||||
GithubConfigApplyInputType = "githubConfigApplyInput"
|
||||
GithubConfigApplyInputFieldCode = "code"
|
||||
GithubConfigApplyInputFieldEnabled = "enabled"
|
||||
GithubConfigApplyInputFieldGithubConfig = "githubConfig"
|
||||
)
|
||||
|
||||
type GithubConfigApplyInput struct {
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
GithubConfig *GithubConfig `json:"githubConfig,omitempty"`
|
||||
GithubCredential *GithubCredential `json:"githubCredential,omitempty"`
|
||||
Code string `json:"code,omitempty"`
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
GithubConfig *GithubConfig `json:"githubConfig,omitempty"`
|
||||
}
|
||||
|
@@ -1,10 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
GithubCredentialType = "githubCredential"
|
||||
GithubCredentialFieldCode = "code"
|
||||
)
|
||||
|
||||
type GithubCredential struct {
|
||||
Code string `json:"code,omitempty"`
|
||||
}
|
@@ -1,12 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
LocalCredentialType = "localCredential"
|
||||
LocalCredentialFieldPassword = "password"
|
||||
LocalCredentialFieldUsername = "username"
|
||||
)
|
||||
|
||||
type LocalCredential struct {
|
||||
Password string `json:"password,omitempty"`
|
||||
Username string `json:"username,omitempty"`
|
||||
}
|
@@ -1,18 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
LoginInputType = "loginInput"
|
||||
LoginInputFieldDescription = "description"
|
||||
LoginInputFieldGithubCredential = "githubCredential"
|
||||
LoginInputFieldLocalCredential = "localCredential"
|
||||
LoginInputFieldResponseType = "responseType"
|
||||
LoginInputFieldTTLMillis = "ttl"
|
||||
)
|
||||
|
||||
type LoginInput struct {
|
||||
Description string `json:"description,omitempty"`
|
||||
GithubCredential *GithubCredential `json:"githubCredential,omitempty"`
|
||||
LocalCredential *LocalCredential `json:"localCredential,omitempty"`
|
||||
ResponseType string `json:"responseType,omitempty"`
|
||||
TTLMillis *int64 `json:"ttl,omitempty"`
|
||||
}
|
93
client/management/v3public/zz_generated_auth_provider.go
Normal file
93
client/management/v3public/zz_generated_auth_provider.go
Normal file
@@ -0,0 +1,93 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/types"
|
||||
)
|
||||
|
||||
const (
|
||||
AuthProviderType = "authProvider"
|
||||
AuthProviderFieldAnnotations = "annotations"
|
||||
AuthProviderFieldCreated = "created"
|
||||
AuthProviderFieldCreatorID = "creatorId"
|
||||
AuthProviderFieldLabels = "labels"
|
||||
AuthProviderFieldName = "name"
|
||||
AuthProviderFieldOwnerReferences = "ownerReferences"
|
||||
AuthProviderFieldRemoved = "removed"
|
||||
AuthProviderFieldType = "type"
|
||||
AuthProviderFieldUuid = "uuid"
|
||||
)
|
||||
|
||||
type AuthProvider struct {
|
||||
types.Resource
|
||||
Annotations map[string]string `json:"annotations,omitempty"`
|
||||
Created string `json:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"`
|
||||
Removed string `json:"removed,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
Uuid string `json:"uuid,omitempty"`
|
||||
}
|
||||
type AuthProviderCollection struct {
|
||||
types.Collection
|
||||
Data []AuthProvider `json:"data,omitempty"`
|
||||
client *AuthProviderClient
|
||||
}
|
||||
|
||||
type AuthProviderClient struct {
|
||||
apiClient *Client
|
||||
}
|
||||
|
||||
type AuthProviderOperations interface {
|
||||
List(opts *types.ListOpts) (*AuthProviderCollection, error)
|
||||
Create(opts *AuthProvider) (*AuthProvider, error)
|
||||
Update(existing *AuthProvider, updates interface{}) (*AuthProvider, error)
|
||||
ByID(id string) (*AuthProvider, error)
|
||||
Delete(container *AuthProvider) error
|
||||
}
|
||||
|
||||
func newAuthProviderClient(apiClient *Client) *AuthProviderClient {
|
||||
return &AuthProviderClient{
|
||||
apiClient: apiClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *AuthProviderClient) Create(container *AuthProvider) (*AuthProvider, error) {
|
||||
resp := &AuthProvider{}
|
||||
err := c.apiClient.Ops.DoCreate(AuthProviderType, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AuthProviderClient) Update(existing *AuthProvider, updates interface{}) (*AuthProvider, error) {
|
||||
resp := &AuthProvider{}
|
||||
err := c.apiClient.Ops.DoUpdate(AuthProviderType, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AuthProviderClient) List(opts *types.ListOpts) (*AuthProviderCollection, error) {
|
||||
resp := &AuthProviderCollection{}
|
||||
err := c.apiClient.Ops.DoList(AuthProviderType, opts, resp)
|
||||
resp.client = c
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (cc *AuthProviderCollection) Next() (*AuthProviderCollection, error) {
|
||||
if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
|
||||
resp := &AuthProviderCollection{}
|
||||
err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp)
|
||||
resp.client = cc.client
|
||||
return resp, err
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (c *AuthProviderClient) ByID(id string) (*AuthProvider, error) {
|
||||
resp := &AuthProvider{}
|
||||
err := c.apiClient.Ops.DoByID(AuthProviderType, id, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AuthProviderClient) Delete(container *AuthProvider) error {
|
||||
return c.apiClient.Ops.DoResourceDelete(AuthProviderType, &container.Resource)
|
||||
}
|
26
client/management/v3public/zz_generated_client.go
Normal file
26
client/management/v3public/zz_generated_client.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/clientbase"
|
||||
)
|
||||
|
||||
type Client struct {
|
||||
clientbase.APIBaseClient
|
||||
|
||||
AuthProvider AuthProviderOperations
|
||||
}
|
||||
|
||||
func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
|
||||
baseClient, err := clientbase.NewAPIClient(opts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
client := &Client{
|
||||
APIBaseClient: baseClient,
|
||||
}
|
||||
|
||||
client.AuthProvider = newAuthProviderClient(client)
|
||||
|
||||
return client, nil
|
||||
}
|
16
client/management/v3public/zz_generated_github_login.go
Normal file
16
client/management/v3public/zz_generated_github_login.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
GithubLoginType = "githubLogin"
|
||||
GithubLoginFieldCode = "code"
|
||||
GithubLoginFieldDescription = "description"
|
||||
GithubLoginFieldResponseType = "responseType"
|
||||
GithubLoginFieldTTLMillis = "ttl"
|
||||
)
|
||||
|
||||
type GithubLogin struct {
|
||||
Code string `json:"code,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
ResponseType string `json:"responseType,omitempty"`
|
||||
TTLMillis *int64 `json:"ttl,omitempty"`
|
||||
}
|
26
client/management/v3public/zz_generated_github_provider.go
Normal file
26
client/management/v3public/zz_generated_github_provider.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
GithubProviderType = "githubProvider"
|
||||
GithubProviderFieldAnnotations = "annotations"
|
||||
GithubProviderFieldCreated = "created"
|
||||
GithubProviderFieldCreatorID = "creatorId"
|
||||
GithubProviderFieldLabels = "labels"
|
||||
GithubProviderFieldName = "name"
|
||||
GithubProviderFieldOwnerReferences = "ownerReferences"
|
||||
GithubProviderFieldRemoved = "removed"
|
||||
GithubProviderFieldType = "type"
|
||||
GithubProviderFieldUuid = "uuid"
|
||||
)
|
||||
|
||||
type GithubProvider struct {
|
||||
Annotations map[string]string `json:"annotations,omitempty"`
|
||||
Created string `json:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"`
|
||||
Removed string `json:"removed,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
Uuid string `json:"uuid,omitempty"`
|
||||
}
|
10
client/management/v3public/zz_generated_initializer.go
Normal file
10
client/management/v3public/zz_generated_initializer.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
InitializerType = "initializer"
|
||||
InitializerFieldName = "name"
|
||||
)
|
||||
|
||||
type Initializer struct {
|
||||
Name string `json:"name,omitempty"`
|
||||
}
|
12
client/management/v3public/zz_generated_initializers.go
Normal file
12
client/management/v3public/zz_generated_initializers.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
InitializersType = "initializers"
|
||||
InitializersFieldPending = "pending"
|
||||
InitializersFieldResult = "result"
|
||||
)
|
||||
|
||||
type Initializers struct {
|
||||
Pending []Initializer `json:"pending,omitempty"`
|
||||
Result *Status `json:"result,omitempty"`
|
||||
}
|
14
client/management/v3public/zz_generated_list_meta.go
Normal file
14
client/management/v3public/zz_generated_list_meta.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
ListMetaType = "listMeta"
|
||||
ListMetaFieldContinue = "continue"
|
||||
ListMetaFieldResourceVersion = "resourceVersion"
|
||||
ListMetaFieldSelfLink = "selfLink"
|
||||
)
|
||||
|
||||
type ListMeta struct {
|
||||
Continue string `json:"continue,omitempty"`
|
||||
ResourceVersion string `json:"resourceVersion,omitempty"`
|
||||
SelfLink string `json:"selfLink,omitempty"`
|
||||
}
|
18
client/management/v3public/zz_generated_local_login.go
Normal file
18
client/management/v3public/zz_generated_local_login.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
LocalLoginType = "localLogin"
|
||||
LocalLoginFieldDescription = "description"
|
||||
LocalLoginFieldPassword = "password"
|
||||
LocalLoginFieldResponseType = "responseType"
|
||||
LocalLoginFieldTTLMillis = "ttl"
|
||||
LocalLoginFieldUsername = "username"
|
||||
)
|
||||
|
||||
type LocalLogin struct {
|
||||
Description string `json:"description,omitempty"`
|
||||
Password string `json:"password,omitempty"`
|
||||
ResponseType string `json:"responseType,omitempty"`
|
||||
TTLMillis *int64 `json:"ttl,omitempty"`
|
||||
Username string `json:"username,omitempty"`
|
||||
}
|
26
client/management/v3public/zz_generated_local_provider.go
Normal file
26
client/management/v3public/zz_generated_local_provider.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
LocalProviderType = "localProvider"
|
||||
LocalProviderFieldAnnotations = "annotations"
|
||||
LocalProviderFieldCreated = "created"
|
||||
LocalProviderFieldCreatorID = "creatorId"
|
||||
LocalProviderFieldLabels = "labels"
|
||||
LocalProviderFieldName = "name"
|
||||
LocalProviderFieldOwnerReferences = "ownerReferences"
|
||||
LocalProviderFieldRemoved = "removed"
|
||||
LocalProviderFieldType = "type"
|
||||
LocalProviderFieldUuid = "uuid"
|
||||
)
|
||||
|
||||
type LocalProvider struct {
|
||||
Annotations map[string]string `json:"annotations,omitempty"`
|
||||
Created string `json:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"`
|
||||
Removed string `json:"removed,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
Uuid string `json:"uuid,omitempty"`
|
||||
}
|
26
client/management/v3public/zz_generated_object_meta.go
Normal file
26
client/management/v3public/zz_generated_object_meta.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
ObjectMetaType = "objectMeta"
|
||||
ObjectMetaFieldAnnotations = "annotations"
|
||||
ObjectMetaFieldCreated = "created"
|
||||
ObjectMetaFieldFinalizers = "finalizers"
|
||||
ObjectMetaFieldLabels = "labels"
|
||||
ObjectMetaFieldName = "name"
|
||||
ObjectMetaFieldNamespace = "namespace"
|
||||
ObjectMetaFieldOwnerReferences = "ownerReferences"
|
||||
ObjectMetaFieldRemoved = "removed"
|
||||
ObjectMetaFieldUuid = "uuid"
|
||||
)
|
||||
|
||||
type ObjectMeta struct {
|
||||
Annotations map[string]string `json:"annotations,omitempty"`
|
||||
Created string `json:"created,omitempty"`
|
||||
Finalizers []string `json:"finalizers,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Namespace string `json:"namespace,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"`
|
||||
Removed string `json:"removed,omitempty"`
|
||||
Uuid string `json:"uuid,omitempty"`
|
||||
}
|
20
client/management/v3public/zz_generated_owner_reference.go
Normal file
20
client/management/v3public/zz_generated_owner_reference.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
OwnerReferenceType = "ownerReference"
|
||||
OwnerReferenceFieldAPIVersion = "apiVersion"
|
||||
OwnerReferenceFieldBlockOwnerDeletion = "blockOwnerDeletion"
|
||||
OwnerReferenceFieldController = "controller"
|
||||
OwnerReferenceFieldKind = "kind"
|
||||
OwnerReferenceFieldName = "name"
|
||||
OwnerReferenceFieldUID = "uid"
|
||||
)
|
||||
|
||||
type OwnerReference struct {
|
||||
APIVersion string `json:"apiVersion,omitempty"`
|
||||
BlockOwnerDeletion *bool `json:"blockOwnerDeletion,omitempty"`
|
||||
Controller *bool `json:"controller,omitempty"`
|
||||
Kind string `json:"kind,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
UID string `json:"uid,omitempty"`
|
||||
}
|
24
client/management/v3public/zz_generated_status.go
Normal file
24
client/management/v3public/zz_generated_status.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
StatusType = "status"
|
||||
StatusFieldAPIVersion = "apiVersion"
|
||||
StatusFieldCode = "code"
|
||||
StatusFieldDetails = "details"
|
||||
StatusFieldKind = "kind"
|
||||
StatusFieldListMeta = "metadata"
|
||||
StatusFieldMessage = "message"
|
||||
StatusFieldReason = "reason"
|
||||
StatusFieldStatus = "status"
|
||||
)
|
||||
|
||||
type Status struct {
|
||||
APIVersion string `json:"apiVersion,omitempty"`
|
||||
Code *int64 `json:"code,omitempty"`
|
||||
Details *StatusDetails `json:"details,omitempty"`
|
||||
Kind string `json:"kind,omitempty"`
|
||||
ListMeta *ListMeta `json:"metadata,omitempty"`
|
||||
Message string `json:"message,omitempty"`
|
||||
Reason string `json:"reason,omitempty"`
|
||||
Status string `json:"status,omitempty"`
|
||||
}
|
14
client/management/v3public/zz_generated_status_cause.go
Normal file
14
client/management/v3public/zz_generated_status_cause.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
StatusCauseType = "statusCause"
|
||||
StatusCauseFieldField = "field"
|
||||
StatusCauseFieldMessage = "message"
|
||||
StatusCauseFieldType = "reason"
|
||||
)
|
||||
|
||||
type StatusCause struct {
|
||||
Field string `json:"field,omitempty"`
|
||||
Message string `json:"message,omitempty"`
|
||||
Type string `json:"reason,omitempty"`
|
||||
}
|
20
client/management/v3public/zz_generated_status_details.go
Normal file
20
client/management/v3public/zz_generated_status_details.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
StatusDetailsType = "statusDetails"
|
||||
StatusDetailsFieldCauses = "causes"
|
||||
StatusDetailsFieldGroup = "group"
|
||||
StatusDetailsFieldKind = "kind"
|
||||
StatusDetailsFieldName = "name"
|
||||
StatusDetailsFieldRetryAfterSeconds = "retryAfterSeconds"
|
||||
StatusDetailsFieldUID = "uid"
|
||||
)
|
||||
|
||||
type StatusDetails struct {
|
||||
Causes []StatusCause `json:"causes,omitempty"`
|
||||
Group string `json:"group,omitempty"`
|
||||
Kind string `json:"kind,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
RetryAfterSeconds *int64 `json:"retryAfterSeconds,omitempty"`
|
||||
UID string `json:"uid,omitempty"`
|
||||
}
|
44
client/management/v3public/zz_generated_token.go
Normal file
44
client/management/v3public/zz_generated_token.go
Normal file
@@ -0,0 +1,44 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
TokenType = "token"
|
||||
TokenFieldAnnotations = "annotations"
|
||||
TokenFieldAuthProvider = "authProvider"
|
||||
TokenFieldCreated = "created"
|
||||
TokenFieldCreatorID = "creatorId"
|
||||
TokenFieldDescription = "description"
|
||||
TokenFieldGroupPrincipals = "groupPrincipals"
|
||||
TokenFieldIsDerived = "isDerived"
|
||||
TokenFieldLabels = "labels"
|
||||
TokenFieldLastUpdateTime = "lastUpdateTime"
|
||||
TokenFieldName = "name"
|
||||
TokenFieldOwnerReferences = "ownerReferences"
|
||||
TokenFieldProviderInfo = "providerInfo"
|
||||
TokenFieldRemoved = "removed"
|
||||
TokenFieldTTLMillis = "ttl"
|
||||
TokenFieldToken = "token"
|
||||
TokenFieldUserID = "userId"
|
||||
TokenFieldUserPrincipal = "userPrincipal"
|
||||
TokenFieldUuid = "uuid"
|
||||
)
|
||||
|
||||
type Token struct {
|
||||
Annotations map[string]string `json:"annotations,omitempty"`
|
||||
AuthProvider string `json:"authProvider,omitempty"`
|
||||
Created string `json:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
GroupPrincipals []string `json:"groupPrincipals,omitempty"`
|
||||
IsDerived *bool `json:"isDerived,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
LastUpdateTime string `json:"lastUpdateTime,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"`
|
||||
ProviderInfo map[string]string `json:"providerInfo,omitempty"`
|
||||
Removed string `json:"removed,omitempty"`
|
||||
TTLMillis *int64 `json:"ttl,omitempty"`
|
||||
Token string `json:"token,omitempty"`
|
||||
UserID string `json:"userId,omitempty"`
|
||||
UserPrincipal string `json:"userPrincipal,omitempty"`
|
||||
Uuid string `json:"uuid,omitempty"`
|
||||
}
|
Reference in New Issue
Block a user