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_container_logs.go
generated
vendored
Normal file
81
vendor/github.com/rancher/go-rancher/client/generated_container_logs.go
generated
vendored
Normal file
|
@ -0,0 +1,81 @@
|
|||
package client
|
||||
|
||||
const (
|
||||
CONTAINER_LOGS_TYPE = "containerLogs"
|
||||
)
|
||||
|
||||
type ContainerLogs struct {
|
||||
Resource
|
||||
|
||||
Follow bool `json:"follow,omitempty" yaml:"follow,omitempty"`
|
||||
|
||||
Lines int64 `json:"lines,omitempty" yaml:"lines,omitempty"`
|
||||
}
|
||||
|
||||
type ContainerLogsCollection struct {
|
||||
Collection
|
||||
Data []ContainerLogs `json:"data,omitempty"`
|
||||
client *ContainerLogsClient
|
||||
}
|
||||
|
||||
type ContainerLogsClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ContainerLogsOperations interface {
|
||||
List(opts *ListOpts) (*ContainerLogsCollection, error)
|
||||
Create(opts *ContainerLogs) (*ContainerLogs, error)
|
||||
Update(existing *ContainerLogs, updates interface{}) (*ContainerLogs, error)
|
||||
ById(id string) (*ContainerLogs, error)
|
||||
Delete(container *ContainerLogs) error
|
||||
}
|
||||
|
||||
func newContainerLogsClient(rancherClient *RancherClient) *ContainerLogsClient {
|
||||
return &ContainerLogsClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ContainerLogsClient) Create(container *ContainerLogs) (*ContainerLogs, error) {
|
||||
resp := &ContainerLogs{}
|
||||
err := c.rancherClient.doCreate(CONTAINER_LOGS_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerLogsClient) Update(existing *ContainerLogs, updates interface{}) (*ContainerLogs, error) {
|
||||
resp := &ContainerLogs{}
|
||||
err := c.rancherClient.doUpdate(CONTAINER_LOGS_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerLogsClient) List(opts *ListOpts) (*ContainerLogsCollection, error) {
|
||||
resp := &ContainerLogsCollection{}
|
||||
err := c.rancherClient.doList(CONTAINER_LOGS_TYPE, opts, resp)
|
||||
resp.client = c
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (cc *ContainerLogsCollection) Next() (*ContainerLogsCollection, error) {
|
||||
if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
|
||||
resp := &ContainerLogsCollection{}
|
||||
err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
|
||||
resp.client = cc.client
|
||||
return resp, err
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (c *ContainerLogsClient) ById(id string) (*ContainerLogs, error) {
|
||||
resp := &ContainerLogs{}
|
||||
err := c.rancherClient.doById(CONTAINER_LOGS_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerLogsClient) Delete(container *ContainerLogs) error {
|
||||
return c.rancherClient.doResourceDelete(CONTAINER_LOGS_TYPE, &container.Resource)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue