Vendor main dependencies.
This commit is contained in:
parent
49a09ab7dd
commit
dd5e3fba01
2738 changed files with 1045689 additions and 0 deletions
81
vendor/github.com/rancher/go-rancher/client/generated_haproxy_config.go
generated
vendored
Normal file
81
vendor/github.com/rancher/go-rancher/client/generated_haproxy_config.go
generated
vendored
Normal file
|
@ -0,0 +1,81 @@
|
|||
package client
|
||||
|
||||
const (
|
||||
HAPROXY_CONFIG_TYPE = "haproxyConfig"
|
||||
)
|
||||
|
||||
type HaproxyConfig struct {
|
||||
Resource
|
||||
|
||||
Defaults string `json:"defaults,omitempty" yaml:"defaults,omitempty"`
|
||||
|
||||
Global string `json:"global,omitempty" yaml:"global,omitempty"`
|
||||
}
|
||||
|
||||
type HaproxyConfigCollection struct {
|
||||
Collection
|
||||
Data []HaproxyConfig `json:"data,omitempty"`
|
||||
client *HaproxyConfigClient
|
||||
}
|
||||
|
||||
type HaproxyConfigClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type HaproxyConfigOperations interface {
|
||||
List(opts *ListOpts) (*HaproxyConfigCollection, error)
|
||||
Create(opts *HaproxyConfig) (*HaproxyConfig, error)
|
||||
Update(existing *HaproxyConfig, updates interface{}) (*HaproxyConfig, error)
|
||||
ById(id string) (*HaproxyConfig, error)
|
||||
Delete(container *HaproxyConfig) error
|
||||
}
|
||||
|
||||
func newHaproxyConfigClient(rancherClient *RancherClient) *HaproxyConfigClient {
|
||||
return &HaproxyConfigClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *HaproxyConfigClient) Create(container *HaproxyConfig) (*HaproxyConfig, error) {
|
||||
resp := &HaproxyConfig{}
|
||||
err := c.rancherClient.doCreate(HAPROXY_CONFIG_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HaproxyConfigClient) Update(existing *HaproxyConfig, updates interface{}) (*HaproxyConfig, error) {
|
||||
resp := &HaproxyConfig{}
|
||||
err := c.rancherClient.doUpdate(HAPROXY_CONFIG_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HaproxyConfigClient) List(opts *ListOpts) (*HaproxyConfigCollection, error) {
|
||||
resp := &HaproxyConfigCollection{}
|
||||
err := c.rancherClient.doList(HAPROXY_CONFIG_TYPE, opts, resp)
|
||||
resp.client = c
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (cc *HaproxyConfigCollection) Next() (*HaproxyConfigCollection, error) {
|
||||
if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
|
||||
resp := &HaproxyConfigCollection{}
|
||||
err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
|
||||
resp.client = cc.client
|
||||
return resp, err
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (c *HaproxyConfigClient) ById(id string) (*HaproxyConfig, error) {
|
||||
resp := &HaproxyConfig{}
|
||||
err := c.rancherClient.doById(HAPROXY_CONFIG_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HaproxyConfigClient) Delete(container *HaproxyConfig) error {
|
||||
return c.rancherClient.doResourceDelete(HAPROXY_CONFIG_TYPE, &container.Resource)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue