1
0
mirror of https://github.com/rancher/types.git synced 2025-09-15 22:39:05 +00:00

generated changes

This commit is contained in:
Craig Jellick
2018-01-31 19:24:26 -07:00
parent b7f233b36c
commit 11a5bafb3e
10 changed files with 0 additions and 876 deletions

View File

@@ -29,8 +29,6 @@ type Client struct {
Principal PrincipalOperations
User UserOperations
AuthConfig AuthConfigOperations
GithubConfig GithubConfigOperations
LocalConfig LocalConfigOperations
Token TokenOperations
DynamicSchema DynamicSchemaOperations
Stack StackOperations
@@ -73,8 +71,6 @@ func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
client.Principal = newPrincipalClient(client)
client.User = newUserClient(client)
client.AuthConfig = newAuthConfigClient(client)
client.GithubConfig = newGithubConfigClient(client)
client.LocalConfig = newLocalConfigClient(client)
client.Token = newTokenClient(client)
client.DynamicSchema = newDynamicSchemaClient(client)
client.Stack = newStackClient(client)

View File

@@ -1,9 +1,5 @@
package client
import (
"github.com/rancher/norman/types"
)
const (
GithubConfigType = "githubConfig"
GithubConfigFieldAnnotations = "annotations"
@@ -23,7 +19,6 @@ const (
)
type GithubConfig struct {
types.Resource
Annotations map[string]string `json:"annotations,omitempty"`
ClientID string `json:"clientId,omitempty"`
ClientSecret string `json:"clientSecret,omitempty"`
@@ -39,87 +34,3 @@ type GithubConfig struct {
Type string `json:"type,omitempty"`
Uuid string `json:"uuid,omitempty"`
}
type GithubConfigCollection struct {
types.Collection
Data []GithubConfig `json:"data,omitempty"`
client *GithubConfigClient
}
type GithubConfigClient struct {
apiClient *Client
}
type GithubConfigOperations interface {
List(opts *types.ListOpts) (*GithubConfigCollection, error)
Create(opts *GithubConfig) (*GithubConfig, error)
Update(existing *GithubConfig, updates interface{}) (*GithubConfig, error)
ByID(id string) (*GithubConfig, error)
Delete(container *GithubConfig) error
ActionConfigureTest(*GithubConfig, *GithubConfigTestInput) (*GithubConfig, error)
ActionTestAndApply(*GithubConfig, *GithubConfigApplyInput) (*GithubConfig, error)
}
func newGithubConfigClient(apiClient *Client) *GithubConfigClient {
return &GithubConfigClient{
apiClient: apiClient,
}
}
func (c *GithubConfigClient) Create(container *GithubConfig) (*GithubConfig, error) {
resp := &GithubConfig{}
err := c.apiClient.Ops.DoCreate(GithubConfigType, container, resp)
return resp, err
}
func (c *GithubConfigClient) Update(existing *GithubConfig, updates interface{}) (*GithubConfig, error) {
resp := &GithubConfig{}
err := c.apiClient.Ops.DoUpdate(GithubConfigType, &existing.Resource, updates, resp)
return resp, err
}
func (c *GithubConfigClient) List(opts *types.ListOpts) (*GithubConfigCollection, error) {
resp := &GithubConfigCollection{}
err := c.apiClient.Ops.DoList(GithubConfigType, opts, resp)
resp.client = c
return resp, err
}
func (cc *GithubConfigCollection) Next() (*GithubConfigCollection, error) {
if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
resp := &GithubConfigCollection{}
err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp)
resp.client = cc.client
return resp, err
}
return nil, nil
}
func (c *GithubConfigClient) ByID(id string) (*GithubConfig, error) {
resp := &GithubConfig{}
err := c.apiClient.Ops.DoByID(GithubConfigType, id, resp)
return resp, err
}
func (c *GithubConfigClient) Delete(container *GithubConfig) error {
return c.apiClient.Ops.DoResourceDelete(GithubConfigType, &container.Resource)
}
func (c *GithubConfigClient) ActionConfigureTest(resource *GithubConfig, input *GithubConfigTestInput) (*GithubConfig, error) {
resp := &GithubConfig{}
err := c.apiClient.Ops.DoAction(GithubConfigType, "configureTest", &resource.Resource, input, resp)
return resp, err
}
func (c *GithubConfigClient) ActionTestAndApply(resource *GithubConfig, input *GithubConfigApplyInput) (*GithubConfig, error) {
resp := &GithubConfig{}
err := c.apiClient.Ops.DoAction(GithubConfigType, "testAndApply", &resource.Resource, input, resp)
return resp, err
}

View File

@@ -1,9 +1,5 @@
package client
import (
"github.com/rancher/norman/types"
)
const (
LocalConfigType = "localConfig"
LocalConfigFieldAnnotations = "annotations"
@@ -17,7 +13,6 @@ const (
)
type LocalConfig struct {
types.Resource
Annotations map[string]string `json:"annotations,omitempty"`
Created string `json:"created,omitempty"`
CreatorID string `json:"creatorId,omitempty"`
@@ -27,65 +22,3 @@ type LocalConfig struct {
Removed string `json:"removed,omitempty"`
Uuid string `json:"uuid,omitempty"`
}
type LocalConfigCollection struct {
types.Collection
Data []LocalConfig `json:"data,omitempty"`
client *LocalConfigClient
}
type LocalConfigClient struct {
apiClient *Client
}
type LocalConfigOperations interface {
List(opts *types.ListOpts) (*LocalConfigCollection, error)
Create(opts *LocalConfig) (*LocalConfig, error)
Update(existing *LocalConfig, updates interface{}) (*LocalConfig, error)
ByID(id string) (*LocalConfig, error)
Delete(container *LocalConfig) error
}
func newLocalConfigClient(apiClient *Client) *LocalConfigClient {
return &LocalConfigClient{
apiClient: apiClient,
}
}
func (c *LocalConfigClient) Create(container *LocalConfig) (*LocalConfig, error) {
resp := &LocalConfig{}
err := c.apiClient.Ops.DoCreate(LocalConfigType, container, resp)
return resp, err
}
func (c *LocalConfigClient) Update(existing *LocalConfig, updates interface{}) (*LocalConfig, error) {
resp := &LocalConfig{}
err := c.apiClient.Ops.DoUpdate(LocalConfigType, &existing.Resource, updates, resp)
return resp, err
}
func (c *LocalConfigClient) List(opts *types.ListOpts) (*LocalConfigCollection, error) {
resp := &LocalConfigCollection{}
err := c.apiClient.Ops.DoList(LocalConfigType, opts, resp)
resp.client = c
return resp, err
}
func (cc *LocalConfigCollection) Next() (*LocalConfigCollection, error) {
if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
resp := &LocalConfigCollection{}
err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp)
resp.client = cc.client
return resp, err
}
return nil, nil
}
func (c *LocalConfigClient) ByID(id string) (*LocalConfig, error) {
resp := &LocalConfig{}
err := c.apiClient.Ops.DoByID(LocalConfigType, id, resp)
return resp, err
}
func (c *LocalConfigClient) Delete(container *LocalConfig) error {
return c.apiClient.Ops.DoResourceDelete(LocalConfigType, &container.Resource)
}