mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 03:11:40 +00:00
Remove Rancher Credential Provider from upstream kubernetes
This is useful only in rancher environment, they are using this in a very old branch (1.6), they are currently at 2.2.x. There is just no point in us carrying this code as this is not useful to anyone else outside of the rancher environment. Let us please remove this code from upstream. Change-Id: I5196d0edd79a7809c3a04e6028ddbd01063f224b
This commit is contained in:
parent
dc071b8e81
commit
edf8577654
185
Godeps/LICENSES
generated
185
Godeps/LICENSES
generated
@ -16646,191 +16646,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
================================================================================
|
||||
|
||||
|
||||
================================================================================
|
||||
= vendor/github.com/rancher/go-rancher licensed under: =
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
= vendor/github.com/rancher/go-rancher/LICENSE 2ee41112a44fe7014dce33e26468ba93
|
||||
================================================================================
|
||||
|
||||
|
||||
================================================================================
|
||||
= vendor/github.com/robfig/cron licensed under: =
|
||||
|
||||
|
@ -48,7 +48,6 @@ go_library(
|
||||
"//pkg/credentialprovider/aws:go_default_library",
|
||||
"//pkg/credentialprovider/azure:go_default_library",
|
||||
"//pkg/credentialprovider/gcp:go_default_library",
|
||||
"//pkg/credentialprovider/rancher:go_default_library",
|
||||
"//pkg/features:go_default_library",
|
||||
"//pkg/kubelet:go_default_library",
|
||||
"//pkg/kubelet/apis/config:go_default_library",
|
||||
|
@ -22,7 +22,6 @@ import (
|
||||
_ "k8s.io/kubernetes/pkg/credentialprovider/aws"
|
||||
_ "k8s.io/kubernetes/pkg/credentialprovider/azure"
|
||||
_ "k8s.io/kubernetes/pkg/credentialprovider/gcp"
|
||||
_ "k8s.io/kubernetes/pkg/credentialprovider/rancher"
|
||||
"k8s.io/utils/exec"
|
||||
// Volume plugins
|
||||
"k8s.io/kubernetes/pkg/volume"
|
||||
|
1
go.mod
1
go.mod
@ -131,7 +131,6 @@ require (
|
||||
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910
|
||||
github.com/prometheus/common v0.0.0-20181126121408-4724e9255275
|
||||
github.com/quobyte/api v0.1.2
|
||||
github.com/rancher/go-rancher v0.0.0-20160922212217-09693a8743ba
|
||||
github.com/robfig/cron v0.0.0-20170309132418-df38d32658d8
|
||||
github.com/rubiojr/go-vhd v0.0.0-20160810183302-0bfd3b39853c
|
||||
github.com/russross/blackfriday v0.0.0-20151117072312-300106c228d5
|
||||
|
2
go.sum
2
go.sum
@ -337,8 +337,6 @@ github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a h1:9a8MnZMP0X2nL
|
||||
github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/quobyte/api v0.1.2 h1:lPHLsuvtjFyk8WhC4uHoHRkScijIHcffTWBBP+YpzYo=
|
||||
github.com/quobyte/api v0.1.2/go.mod h1:jL7lIHrmqQ7yh05OJ+eEEdHr0u/kmT1Ff9iHd+4H6VI=
|
||||
github.com/rancher/go-rancher v0.0.0-20160922212217-09693a8743ba h1:YPSbZK9YwHzifTgnX/TdxhL+UV9FCk+9ku9Iz1uc8kc=
|
||||
github.com/rancher/go-rancher v0.0.0-20160922212217-09693a8743ba/go.mod h1:7oQvGNiJsGvrUgB+7AH8bmdzuR0uhULfwKb43Ht0hUk=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M=
|
||||
github.com/robfig/cron v0.0.0-20170309132418-df38d32658d8 h1:b904/jbnmYuSPd5ojGzVTLjKPVTSj3t/e1vEPiPGjEg=
|
||||
github.com/robfig/cron v0.0.0-20170309132418-df38d32658d8/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
|
||||
|
@ -112,7 +112,6 @@ pkg/controller/volume/persistentvolume/config/v1alpha1
|
||||
pkg/controller/volume/persistentvolume/options
|
||||
pkg/credentialprovider
|
||||
pkg/credentialprovider/gcp
|
||||
pkg/credentialprovider/rancher
|
||||
pkg/features
|
||||
pkg/kubeapiserver
|
||||
pkg/kubeapiserver/options
|
||||
|
@ -46,7 +46,6 @@ filegroup(
|
||||
"//pkg/credentialprovider/aws:all-srcs",
|
||||
"//pkg/credentialprovider/azure:all-srcs",
|
||||
"//pkg/credentialprovider/gcp:all-srcs",
|
||||
"//pkg/credentialprovider/rancher:all-srcs",
|
||||
"//pkg/credentialprovider/secrets:all-srcs",
|
||||
],
|
||||
tags = ["automanaged"],
|
||||
|
@ -1,44 +0,0 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load(
|
||||
"@io_bazel_rules_go//go:def.bzl",
|
||||
"go_library",
|
||||
"go_test",
|
||||
)
|
||||
|
||||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["rancher_registry_credentials_test.go"],
|
||||
embed = [":go_default_library"],
|
||||
deps = [
|
||||
"//pkg/credentialprovider:go_default_library",
|
||||
"//vendor/github.com/rancher/go-rancher/client:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"doc.go",
|
||||
"rancher_registry_credentials.go",
|
||||
],
|
||||
importpath = "k8s.io/kubernetes/pkg/credentialprovider/rancher",
|
||||
deps = [
|
||||
"//pkg/credentialprovider:go_default_library",
|
||||
"//vendor/github.com/rancher/go-rancher/client:go_default_library",
|
||||
"//vendor/k8s.io/klog:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "package-srcs",
|
||||
srcs = glob(["**"]),
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "all-srcs",
|
||||
srcs = [":package-srcs"],
|
||||
tags = ["automanaged"],
|
||||
)
|
@ -1,17 +0,0 @@
|
||||
/*
|
||||
Copyright 2017 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package rancher_credentials
|
@ -1,145 +0,0 @@
|
||||
/*
|
||||
Copyright 2014 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package rancher_credentials
|
||||
|
||||
import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/rancher/go-rancher/client"
|
||||
"k8s.io/klog"
|
||||
"k8s.io/kubernetes/pkg/credentialprovider"
|
||||
)
|
||||
|
||||
// rancher provider
|
||||
type rancherProvider struct {
|
||||
credGetter credentialsGetter
|
||||
}
|
||||
|
||||
// credentials getter from Rancher private registry
|
||||
type rancherCredentialsGetter struct {
|
||||
client *client.RancherClient
|
||||
}
|
||||
|
||||
type rConfig struct {
|
||||
Global configGlobal
|
||||
}
|
||||
|
||||
// An interface for testing purposes.
|
||||
type credentialsGetter interface {
|
||||
getCredentials() []registryCredential
|
||||
}
|
||||
|
||||
type configGlobal struct {
|
||||
CattleURL string `gcfg:"cattle-url"`
|
||||
CattleAccessKey string `gcfg:"cattle-access-key"`
|
||||
CattleSecretKey string `gcfg:"cattle-secret-key"`
|
||||
}
|
||||
|
||||
type registryCredential struct {
|
||||
credential *client.RegistryCredential
|
||||
serverIP string
|
||||
}
|
||||
|
||||
var rancherGetter = &rancherCredentialsGetter{}
|
||||
|
||||
func init() {
|
||||
credentialprovider.RegisterCredentialProvider("rancher-registry-creds",
|
||||
&credentialprovider.CachingDockerConfigProvider{
|
||||
Provider: &rancherProvider{rancherGetter},
|
||||
Lifetime: 30 * time.Second,
|
||||
})
|
||||
}
|
||||
|
||||
func (p *rancherProvider) Enabled() bool {
|
||||
client, err := getRancherClient()
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
if client == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
rancherGetter.client = client
|
||||
return true
|
||||
}
|
||||
|
||||
// LazyProvide implements DockerConfigProvider. Should never be called.
|
||||
func (p *rancherProvider) LazyProvide(image string) *credentialprovider.DockerConfigEntry {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Provide implements DockerConfigProvider.Provide, refreshing Rancher tokens on demand
|
||||
func (p *rancherProvider) Provide(image string) credentialprovider.DockerConfig {
|
||||
cfg := credentialprovider.DockerConfig{}
|
||||
for _, cred := range p.credGetter.getCredentials() {
|
||||
entry := credentialprovider.DockerConfigEntry{
|
||||
Username: cred.credential.PublicValue,
|
||||
Password: cred.credential.SecretValue,
|
||||
Email: cred.credential.Email,
|
||||
}
|
||||
cfg[cred.serverIP] = entry
|
||||
}
|
||||
|
||||
return cfg
|
||||
}
|
||||
|
||||
func (g *rancherCredentialsGetter) getCredentials() []registryCredential {
|
||||
var registryCreds []registryCredential
|
||||
credColl, err := g.client.RegistryCredential.List(client.NewListOpts())
|
||||
if err != nil {
|
||||
klog.Errorf("Failed to pull registry credentials from rancher %v", err)
|
||||
return registryCreds
|
||||
}
|
||||
for _, cred := range credColl.Data {
|
||||
registry := &client.Registry{}
|
||||
if err = g.client.GetLink(cred.Resource, "registry", registry); err != nil {
|
||||
klog.Errorf("Failed to pull registry from rancher %v", err)
|
||||
return registryCreds
|
||||
}
|
||||
registryCred := registryCredential{
|
||||
credential: &cred,
|
||||
serverIP: registry.ServerAddress,
|
||||
}
|
||||
registryCreds = append(registryCreds, registryCred)
|
||||
}
|
||||
return registryCreds
|
||||
}
|
||||
|
||||
func getRancherClient() (*client.RancherClient, error) {
|
||||
url := os.Getenv("CATTLE_URL")
|
||||
accessKey := os.Getenv("CATTLE_ACCESS_KEY")
|
||||
secretKey := os.Getenv("CATTLE_SECRET_KEY")
|
||||
|
||||
if url == "" || accessKey == "" || secretKey == "" {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
conf := rConfig{
|
||||
Global: configGlobal{
|
||||
CattleURL: url,
|
||||
CattleAccessKey: accessKey,
|
||||
CattleSecretKey: secretKey,
|
||||
},
|
||||
}
|
||||
|
||||
return client.NewRancherClient(&client.ClientOpts{
|
||||
Url: conf.Global.CattleURL,
|
||||
AccessKey: conf.Global.CattleAccessKey,
|
||||
SecretKey: conf.Global.CattleSecretKey,
|
||||
})
|
||||
}
|
@ -1,120 +0,0 @@
|
||||
/*
|
||||
Copyright 2014 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package rancher_credentials
|
||||
|
||||
import (
|
||||
"path"
|
||||
"testing"
|
||||
|
||||
"github.com/rancher/go-rancher/client"
|
||||
"k8s.io/kubernetes/pkg/credentialprovider"
|
||||
)
|
||||
|
||||
const username = "foo"
|
||||
const password = "qwerty"
|
||||
const email = "foo@bar.baz"
|
||||
|
||||
var serverAddresses = []string{"quay.io", "192.168.5.0"}
|
||||
|
||||
type testCredentialsGetter struct {
|
||||
client *client.RancherClient
|
||||
}
|
||||
|
||||
func (p *testCredentialsGetter) getCredentials() []registryCredential {
|
||||
var registryCreds []registryCredential
|
||||
|
||||
for _, serverAddress := range serverAddresses {
|
||||
cred := &client.RegistryCredential{
|
||||
PublicValue: username,
|
||||
SecretValue: password,
|
||||
Email: email,
|
||||
}
|
||||
registryCred := registryCredential{
|
||||
credential: cred,
|
||||
serverIP: serverAddress,
|
||||
}
|
||||
registryCreds = append(registryCreds, registryCred)
|
||||
}
|
||||
|
||||
return registryCreds
|
||||
}
|
||||
|
||||
func TestRancherCredentialsProvide(t *testing.T) {
|
||||
image := "foo/bar"
|
||||
|
||||
url := "http://localhost:8080"
|
||||
accessKey := "B481F55E0C48C546E094"
|
||||
secretKey := "dND2fBcytWWvCRJ8LvqnYcjyNfEkaikvfVxk2C5r"
|
||||
conf := rConfig{
|
||||
Global: configGlobal{
|
||||
CattleURL: url,
|
||||
CattleAccessKey: accessKey,
|
||||
CattleSecretKey: secretKey,
|
||||
},
|
||||
}
|
||||
|
||||
rancherClient, _ := client.NewRancherClient(&client.ClientOpts{
|
||||
Url: conf.Global.CattleURL,
|
||||
AccessKey: conf.Global.CattleAccessKey,
|
||||
SecretKey: conf.Global.CattleSecretKey,
|
||||
})
|
||||
|
||||
testGetter := &testCredentialsGetter{
|
||||
client: rancherClient,
|
||||
}
|
||||
|
||||
provider := &rancherProvider{
|
||||
credGetter: testGetter,
|
||||
}
|
||||
|
||||
keyring := &credentialprovider.BasicDockerKeyring{}
|
||||
keyring.Add(provider.Provide(""))
|
||||
|
||||
for _, registry := range serverAddresses {
|
||||
fullImagePath := path.Join(registry, image)
|
||||
creds, ok := keyring.Lookup(fullImagePath)
|
||||
if !ok {
|
||||
t.Errorf("Didn't find expected image: %s", fullImagePath)
|
||||
return
|
||||
}
|
||||
|
||||
if len(creds) > 1 {
|
||||
t.Errorf("Expected 1 result, received %v", len(creds))
|
||||
}
|
||||
|
||||
val := creds[0]
|
||||
|
||||
if username != val.Username {
|
||||
t.Errorf("Unexpected username value, want: %s, got: %s", username, val.Username)
|
||||
}
|
||||
if password != val.Password {
|
||||
t.Errorf("Unexpected password value, want: %s, got: %s", password, val.Password)
|
||||
}
|
||||
if email != val.Email {
|
||||
t.Errorf("Unexpected email value, want: %s, got: %s", email, val.Email)
|
||||
}
|
||||
}
|
||||
|
||||
// try to fetch non-existing registry
|
||||
fullImagePath := path.Join("1.1.1.1", image)
|
||||
_, ok := keyring.Lookup(fullImagePath)
|
||||
if ok {
|
||||
t.Errorf("Found non-existing image: %s", fullImagePath)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
1
vendor/BUILD
vendored
1
vendor/BUILD
vendored
@ -326,7 +326,6 @@ filegroup(
|
||||
"//vendor/github.com/prometheus/common/model:all-srcs",
|
||||
"//vendor/github.com/prometheus/procfs:all-srcs",
|
||||
"//vendor/github.com/quobyte/api:all-srcs",
|
||||
"//vendor/github.com/rancher/go-rancher/client:all-srcs",
|
||||
"//vendor/github.com/robfig/cron:all-srcs",
|
||||
"//vendor/github.com/rubiojr/go-vhd/vhd:all-srcs",
|
||||
"//vendor/github.com/russross/blackfriday:all-srcs",
|
||||
|
177
vendor/github.com/rancher/go-rancher/LICENSE
generated
vendored
177
vendor/github.com/rancher/go-rancher/LICENSE
generated
vendored
@ -1,177 +0,0 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
175
vendor/github.com/rancher/go-rancher/client/BUILD
generated
vendored
175
vendor/github.com/rancher/go-rancher/client/BUILD
generated
vendored
@ -1,175 +0,0 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"client.go",
|
||||
"common.go",
|
||||
"generated_account.go",
|
||||
"generated_active_setting.go",
|
||||
"generated_add_outputs_input.go",
|
||||
"generated_add_remove_load_balancer_service_link_input.go",
|
||||
"generated_add_remove_service_link_input.go",
|
||||
"generated_agent.go",
|
||||
"generated_amazonec2config.go",
|
||||
"generated_api_key.go",
|
||||
"generated_audit_log.go",
|
||||
"generated_azure_config.go",
|
||||
"generated_azureadconfig.go",
|
||||
"generated_backup.go",
|
||||
"generated_backup_target.go",
|
||||
"generated_base_machine_config.go",
|
||||
"generated_blkio_device_option.go",
|
||||
"generated_certificate.go",
|
||||
"generated_change_secret_input.go",
|
||||
"generated_client.go",
|
||||
"generated_compose_config.go",
|
||||
"generated_compose_config_input.go",
|
||||
"generated_compose_project.go",
|
||||
"generated_compose_service.go",
|
||||
"generated_config_item.go",
|
||||
"generated_config_item_status.go",
|
||||
"generated_container.go",
|
||||
"generated_container_event.go",
|
||||
"generated_container_exec.go",
|
||||
"generated_container_logs.go",
|
||||
"generated_container_proxy.go",
|
||||
"generated_credential.go",
|
||||
"generated_databasechangelog.go",
|
||||
"generated_databasechangeloglock.go",
|
||||
"generated_digitalocean_config.go",
|
||||
"generated_dns_service.go",
|
||||
"generated_docker_build.go",
|
||||
"generated_dynamic_schema.go",
|
||||
"generated_environment.go",
|
||||
"generated_environment_upgrade.go",
|
||||
"generated_extension_implementation.go",
|
||||
"generated_extension_point.go",
|
||||
"generated_external_dns_event.go",
|
||||
"generated_external_event.go",
|
||||
"generated_external_handler.go",
|
||||
"generated_external_handler_external_handler_process_map.go",
|
||||
"generated_external_handler_process.go",
|
||||
"generated_external_handler_process_config.go",
|
||||
"generated_external_host_event.go",
|
||||
"generated_external_service.go",
|
||||
"generated_external_service_event.go",
|
||||
"generated_external_storage_pool_event.go",
|
||||
"generated_external_volume_event.go",
|
||||
"generated_field_documentation.go",
|
||||
"generated_githubconfig.go",
|
||||
"generated_ha_config.go",
|
||||
"generated_ha_config_input.go",
|
||||
"generated_haproxy_config.go",
|
||||
"generated_healthcheck_instance_host_map.go",
|
||||
"generated_host.go",
|
||||
"generated_host_access.go",
|
||||
"generated_host_api_proxy_token.go",
|
||||
"generated_identity.go",
|
||||
"generated_image.go",
|
||||
"generated_in_service_upgrade_strategy.go",
|
||||
"generated_instance.go",
|
||||
"generated_instance_console.go",
|
||||
"generated_instance_console_input.go",
|
||||
"generated_instance_health_check.go",
|
||||
"generated_instance_link.go",
|
||||
"generated_instance_stop.go",
|
||||
"generated_ip_address.go",
|
||||
"generated_ip_address_associate_input.go",
|
||||
"generated_kubernetes_service.go",
|
||||
"generated_kubernetes_stack.go",
|
||||
"generated_kubernetes_stack_upgrade.go",
|
||||
"generated_label.go",
|
||||
"generated_launch_config.go",
|
||||
"generated_ldapconfig.go",
|
||||
"generated_load_balancer_app_cookie_stickiness_policy.go",
|
||||
"generated_load_balancer_config.go",
|
||||
"generated_load_balancer_cookie_stickiness_policy.go",
|
||||
"generated_load_balancer_service.go",
|
||||
"generated_load_balancer_service_link.go",
|
||||
"generated_local_auth_config.go",
|
||||
"generated_log_config.go",
|
||||
"generated_machine.go",
|
||||
"generated_machine_driver.go",
|
||||
"generated_mount.go",
|
||||
"generated_network.go",
|
||||
"generated_nfs_config.go",
|
||||
"generated_openldapconfig.go",
|
||||
"generated_packet_config.go",
|
||||
"generated_password.go",
|
||||
"generated_physical_host.go",
|
||||
"generated_port.go",
|
||||
"generated_process_definition.go",
|
||||
"generated_process_execution.go",
|
||||
"generated_process_instance.go",
|
||||
"generated_project.go",
|
||||
"generated_project_member.go",
|
||||
"generated_public_endpoint.go",
|
||||
"generated_publish.go",
|
||||
"generated_pull_task.go",
|
||||
"generated_recreate_on_quorum_strategy_config.go",
|
||||
"generated_register.go",
|
||||
"generated_registration_token.go",
|
||||
"generated_registry.go",
|
||||
"generated_registry_credential.go",
|
||||
"generated_resource_definition.go",
|
||||
"generated_restart_policy.go",
|
||||
"generated_restore_from_backup_input.go",
|
||||
"generated_revert_to_snapshot_input.go",
|
||||
"generated_rolling_restart_strategy.go",
|
||||
"generated_scale_policy.go",
|
||||
"generated_secondary_launch_config.go",
|
||||
"generated_service.go",
|
||||
"generated_service_consume_map.go",
|
||||
"generated_service_event.go",
|
||||
"generated_service_expose_map.go",
|
||||
"generated_service_link.go",
|
||||
"generated_service_proxy.go",
|
||||
"generated_service_restart.go",
|
||||
"generated_service_upgrade.go",
|
||||
"generated_service_upgrade_strategy.go",
|
||||
"generated_services_port_range.go",
|
||||
"generated_set_labels_input.go",
|
||||
"generated_set_load_balancer_service_links_input.go",
|
||||
"generated_set_project_members_input.go",
|
||||
"generated_set_service_links_input.go",
|
||||
"generated_setting.go",
|
||||
"generated_snapshot.go",
|
||||
"generated_snapshot_backup_input.go",
|
||||
"generated_state_transition.go",
|
||||
"generated_stats_access.go",
|
||||
"generated_storage_pool.go",
|
||||
"generated_subscribe.go",
|
||||
"generated_task.go",
|
||||
"generated_task_instance.go",
|
||||
"generated_to_service_upgrade_strategy.go",
|
||||
"generated_type_documentation.go",
|
||||
"generated_virtual_machine.go",
|
||||
"generated_virtual_machine_disk.go",
|
||||
"generated_volume.go",
|
||||
"generated_volume_snapshot_input.go",
|
||||
"schemas.go",
|
||||
"types.go",
|
||||
],
|
||||
importmap = "k8s.io/kubernetes/vendor/github.com/rancher/go-rancher/client",
|
||||
importpath = "github.com/rancher/go-rancher/client",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//vendor/github.com/gorilla/websocket:go_default_library",
|
||||
"//vendor/github.com/pkg/errors:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "package-srcs",
|
||||
srcs = glob(["**"]),
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "all-srcs",
|
||||
srcs = [":package-srcs"],
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
35
vendor/github.com/rancher/go-rancher/client/client.go
generated
vendored
35
vendor/github.com/rancher/go-rancher/client/client.go
generated
vendored
@ -1,35 +0,0 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
)
|
||||
|
||||
type RancherBaseClientImpl struct {
|
||||
Opts *ClientOpts
|
||||
Schemas *Schemas
|
||||
Types map[string]Schema
|
||||
}
|
||||
|
||||
type RancherBaseClient interface {
|
||||
Websocket(string, map[string][]string) (*websocket.Conn, *http.Response, error)
|
||||
List(string, *ListOpts, interface{}) error
|
||||
Post(string, interface{}, interface{}) error
|
||||
GetLink(Resource, string, interface{}) error
|
||||
Create(string, interface{}, interface{}) error
|
||||
Update(string, *Resource, interface{}, interface{}) error
|
||||
ById(string, string, interface{}) error
|
||||
Delete(*Resource) error
|
||||
Reload(*Resource, interface{}) error
|
||||
Action(string, string, *Resource, interface{}, interface{}) error
|
||||
|
||||
doGet(string, *ListOpts, interface{}) error
|
||||
doList(string, *ListOpts, interface{}) error
|
||||
doModify(string, string, interface{}, interface{}) error
|
||||
doCreate(string, interface{}, interface{}) error
|
||||
doUpdate(string, *Resource, interface{}, interface{}) error
|
||||
doById(string, string, interface{}) error
|
||||
doResourceDelete(string, *Resource) error
|
||||
doAction(string, string, *Resource, interface{}, interface{}) error
|
||||
}
|
571
vendor/github.com/rancher/go-rancher/client/common.go
generated
vendored
571
vendor/github.com/rancher/go-rancher/client/common.go
generated
vendored
@ -1,571 +0,0 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"regexp"
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
const (
|
||||
SELF = "self"
|
||||
COLLECTION = "collection"
|
||||
)
|
||||
|
||||
var (
|
||||
debug = false
|
||||
dialer = &websocket.Dialer{}
|
||||
)
|
||||
|
||||
type ClientOpts struct {
|
||||
Url string
|
||||
AccessKey string
|
||||
SecretKey string
|
||||
Timeout time.Duration
|
||||
}
|
||||
|
||||
type ApiError struct {
|
||||
StatusCode int
|
||||
Url string
|
||||
Msg string
|
||||
Status string
|
||||
Body string
|
||||
}
|
||||
|
||||
func (e *ApiError) Error() string {
|
||||
return e.Msg
|
||||
}
|
||||
|
||||
func IsNotFound(err error) bool {
|
||||
apiError, ok := err.(*ApiError)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
|
||||
return apiError.StatusCode == http.StatusNotFound
|
||||
}
|
||||
|
||||
func newApiError(resp *http.Response, url string) *ApiError {
|
||||
contents, err := ioutil.ReadAll(resp.Body)
|
||||
var body string
|
||||
if err != nil {
|
||||
body = "Unreadable body."
|
||||
} else {
|
||||
body = string(contents)
|
||||
}
|
||||
|
||||
data := map[string]interface{}{}
|
||||
if json.Unmarshal(contents, &data) == nil {
|
||||
delete(data, "id")
|
||||
delete(data, "links")
|
||||
delete(data, "actions")
|
||||
delete(data, "type")
|
||||
delete(data, "status")
|
||||
buf := &bytes.Buffer{}
|
||||
for k, v := range data {
|
||||
if v == nil {
|
||||
continue
|
||||
}
|
||||
if buf.Len() > 0 {
|
||||
buf.WriteString(", ")
|
||||
}
|
||||
fmt.Fprintf(buf, "%s=%v", k, v)
|
||||
}
|
||||
body = buf.String()
|
||||
}
|
||||
formattedMsg := fmt.Sprintf("Bad response statusCode [%d]. Status [%s]. Body: [%s] from [%s]",
|
||||
resp.StatusCode, resp.Status, body, url)
|
||||
return &ApiError{
|
||||
Url: url,
|
||||
Msg: formattedMsg,
|
||||
StatusCode: resp.StatusCode,
|
||||
Status: resp.Status,
|
||||
Body: body,
|
||||
}
|
||||
}
|
||||
|
||||
func contains(array []string, item string) bool {
|
||||
for _, check := range array {
|
||||
if check == item {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func appendFilters(urlString string, filters map[string]interface{}) (string, error) {
|
||||
if len(filters) == 0 {
|
||||
return urlString, nil
|
||||
}
|
||||
|
||||
u, err := url.Parse(urlString)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
q := u.Query()
|
||||
for k, v := range filters {
|
||||
if l, ok := v.([]string); ok {
|
||||
for _, v := range l {
|
||||
q.Add(k, v)
|
||||
}
|
||||
} else {
|
||||
q.Add(k, fmt.Sprintf("%v", v))
|
||||
}
|
||||
}
|
||||
|
||||
u.RawQuery = q.Encode()
|
||||
return u.String(), nil
|
||||
}
|
||||
|
||||
func setupRancherBaseClient(rancherClient *RancherBaseClientImpl, opts *ClientOpts) error {
|
||||
if opts.Timeout == 0 {
|
||||
opts.Timeout = time.Second * 10
|
||||
}
|
||||
client := &http.Client{Timeout: opts.Timeout}
|
||||
req, err := http.NewRequest("GET", opts.Url, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
req.SetBasicAuth(opts.AccessKey, opts.SecretKey)
|
||||
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode != 200 {
|
||||
return newApiError(resp, opts.Url)
|
||||
}
|
||||
|
||||
schemasUrls := resp.Header.Get("X-API-Schemas")
|
||||
if len(schemasUrls) == 0 {
|
||||
return errors.New("Failed to find schema at [" + opts.Url + "]")
|
||||
}
|
||||
|
||||
if schemasUrls != opts.Url {
|
||||
req, err = http.NewRequest("GET", schemasUrls, nil)
|
||||
req.SetBasicAuth(opts.AccessKey, opts.SecretKey)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
resp, err = client.Do(req)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode != 200 {
|
||||
return newApiError(resp, opts.Url)
|
||||
}
|
||||
}
|
||||
|
||||
var schemas Schemas
|
||||
bytes, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = json.Unmarshal(bytes, &schemas)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
rancherClient.Opts = opts
|
||||
rancherClient.Schemas = &schemas
|
||||
|
||||
for _, schema := range schemas.Data {
|
||||
rancherClient.Types[schema.Id] = schema
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewListOpts() *ListOpts {
|
||||
return &ListOpts{
|
||||
Filters: map[string]interface{}{},
|
||||
}
|
||||
}
|
||||
|
||||
func (rancherClient *RancherBaseClientImpl) setupRequest(req *http.Request) {
|
||||
req.SetBasicAuth(rancherClient.Opts.AccessKey, rancherClient.Opts.SecretKey)
|
||||
}
|
||||
|
||||
func (rancherClient *RancherBaseClientImpl) newHttpClient() *http.Client {
|
||||
if rancherClient.Opts.Timeout == 0 {
|
||||
rancherClient.Opts.Timeout = time.Second * 10
|
||||
}
|
||||
return &http.Client{Timeout: rancherClient.Opts.Timeout}
|
||||
}
|
||||
|
||||
func (rancherClient *RancherBaseClientImpl) doDelete(url string) error {
|
||||
client := rancherClient.newHttpClient()
|
||||
req, err := http.NewRequest("DELETE", url, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
rancherClient.setupRequest(req)
|
||||
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
io.Copy(ioutil.Discard, resp.Body)
|
||||
|
||||
if resp.StatusCode >= 300 {
|
||||
return newApiError(resp, url)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (rancherClient *RancherBaseClientImpl) Websocket(url string, headers map[string][]string) (*websocket.Conn, *http.Response, error) {
|
||||
return dialer.Dial(url, http.Header(headers))
|
||||
}
|
||||
|
||||
func (rancherClient *RancherBaseClientImpl) doGet(url string, opts *ListOpts, respObject interface{}) error {
|
||||
if opts == nil {
|
||||
opts = NewListOpts()
|
||||
}
|
||||
url, err := appendFilters(url, opts.Filters)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if debug {
|
||||
fmt.Println("GET " + url)
|
||||
}
|
||||
|
||||
client := rancherClient.newHttpClient()
|
||||
req, err := http.NewRequest("GET", url, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
rancherClient.setupRequest(req)
|
||||
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode != 200 {
|
||||
return newApiError(resp, url)
|
||||
}
|
||||
|
||||
byteContent, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if debug {
|
||||
fmt.Println("Response <= " + string(byteContent))
|
||||
}
|
||||
|
||||
if err := json.Unmarshal(byteContent, respObject); err != nil {
|
||||
return errors.Wrap(err, fmt.Sprintf("Failed to parse: %s", byteContent))
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (rancherClient *RancherBaseClientImpl) List(schemaType string, opts *ListOpts, respObject interface{}) error {
|
||||
return rancherClient.doList(schemaType, opts, respObject)
|
||||
}
|
||||
|
||||
func (rancherClient *RancherBaseClientImpl) doList(schemaType string, opts *ListOpts, respObject interface{}) error {
|
||||
schema, ok := rancherClient.Types[schemaType]
|
||||
if !ok {
|
||||
return errors.New("Unknown schema type [" + schemaType + "]")
|
||||
}
|
||||
|
||||
if !contains(schema.CollectionMethods, "GET") {
|
||||
return errors.New("Resource type [" + schemaType + "] is not listable")
|
||||
}
|
||||
|
||||
collectionUrl, ok := schema.Links[COLLECTION]
|
||||
if !ok {
|
||||
return errors.New("Failed to find collection URL for [" + schemaType + "]")
|
||||
}
|
||||
|
||||
return rancherClient.doGet(collectionUrl, opts, respObject)
|
||||
}
|
||||
|
||||
func (rancherClient *RancherBaseClientImpl) Post(url string, createObj interface{}, respObject interface{}) error {
|
||||
return rancherClient.doModify("POST", url, createObj, respObject)
|
||||
}
|
||||
|
||||
func (rancherClient *RancherBaseClientImpl) GetLink(resource Resource, link string, respObject interface{}) error {
|
||||
url := resource.Links[link]
|
||||
if url == "" {
|
||||
return fmt.Errorf("Failed to find link: %s", link)
|
||||
}
|
||||
|
||||
return rancherClient.doGet(url, &ListOpts{}, respObject)
|
||||
}
|
||||
|
||||
func (rancherClient *RancherBaseClientImpl) doModify(method string, url string, createObj interface{}, respObject interface{}) error {
|
||||
bodyContent, err := json.Marshal(createObj)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if debug {
|
||||
fmt.Println(method + " " + url)
|
||||
fmt.Println("Request => " + string(bodyContent))
|
||||
}
|
||||
|
||||
client := rancherClient.newHttpClient()
|
||||
req, err := http.NewRequest(method, url, bytes.NewBuffer(bodyContent))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
rancherClient.setupRequest(req)
|
||||
req.Header.Set("Content-Type", "application/json")
|
||||
req.Header.Set("Content-Length", string(len(bodyContent)))
|
||||
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode >= 300 {
|
||||
return newApiError(resp, url)
|
||||
}
|
||||
|
||||
byteContent, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(byteContent) > 0 {
|
||||
if debug {
|
||||
fmt.Println("Response <= " + string(byteContent))
|
||||
}
|
||||
return json.Unmarshal(byteContent, respObject)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (rancherClient *RancherBaseClientImpl) Create(schemaType string, createObj interface{}, respObject interface{}) error {
|
||||
return rancherClient.doCreate(schemaType, createObj, respObject)
|
||||
}
|
||||
|
||||
func (rancherClient *RancherBaseClientImpl) doCreate(schemaType string, createObj interface{}, respObject interface{}) error {
|
||||
if createObj == nil {
|
||||
createObj = map[string]string{}
|
||||
}
|
||||
if respObject == nil {
|
||||
respObject = &map[string]interface{}{}
|
||||
}
|
||||
schema, ok := rancherClient.Types[schemaType]
|
||||
if !ok {
|
||||
return errors.New("Unknown schema type [" + schemaType + "]")
|
||||
}
|
||||
|
||||
if !contains(schema.CollectionMethods, "POST") {
|
||||
return errors.New("Resource type [" + schemaType + "] is not creatable")
|
||||
}
|
||||
|
||||
var collectionUrl string
|
||||
collectionUrl, ok = schema.Links[COLLECTION]
|
||||
if !ok {
|
||||
// return errors.New("Failed to find collection URL for [" + schemaType + "]")
|
||||
// This is a hack to address https://github.com/rancher/cattle/issues/254
|
||||
re := regexp.MustCompile("schemas.*")
|
||||
collectionUrl = re.ReplaceAllString(schema.Links[SELF], schema.PluralName)
|
||||
}
|
||||
|
||||
return rancherClient.doModify("POST", collectionUrl, createObj, respObject)
|
||||
}
|
||||
|
||||
func (rancherClient *RancherBaseClientImpl) Update(schemaType string, existing *Resource, updates interface{}, respObject interface{}) error {
|
||||
return rancherClient.doUpdate(schemaType, existing, updates, respObject)
|
||||
}
|
||||
|
||||
func (rancherClient *RancherBaseClientImpl) doUpdate(schemaType string, existing *Resource, updates interface{}, respObject interface{}) error {
|
||||
if existing == nil {
|
||||
return errors.New("Existing object is nil")
|
||||
}
|
||||
|
||||
selfUrl, ok := existing.Links[SELF]
|
||||
if !ok {
|
||||
return errors.New(fmt.Sprintf("Failed to find self URL of [%v]", existing))
|
||||
}
|
||||
|
||||
if updates == nil {
|
||||
updates = map[string]string{}
|
||||
}
|
||||
|
||||
if respObject == nil {
|
||||
respObject = &map[string]interface{}{}
|
||||
}
|
||||
|
||||
schema, ok := rancherClient.Types[schemaType]
|
||||
if !ok {
|
||||
return errors.New("Unknown schema type [" + schemaType + "]")
|
||||
}
|
||||
|
||||
if !contains(schema.ResourceMethods, "PUT") {
|
||||
return errors.New("Resource type [" + schemaType + "] is not updatable")
|
||||
}
|
||||
|
||||
return rancherClient.doModify("PUT", selfUrl, updates, respObject)
|
||||
}
|
||||
|
||||
func (rancherClient *RancherBaseClientImpl) ById(schemaType string, id string, respObject interface{}) error {
|
||||
return rancherClient.doById(schemaType, id, respObject)
|
||||
}
|
||||
|
||||
func (rancherClient *RancherBaseClientImpl) doById(schemaType string, id string, respObject interface{}) error {
|
||||
schema, ok := rancherClient.Types[schemaType]
|
||||
if !ok {
|
||||
return errors.New("Unknown schema type [" + schemaType + "]")
|
||||
}
|
||||
|
||||
if !contains(schema.ResourceMethods, "GET") {
|
||||
return errors.New("Resource type [" + schemaType + "] can not be looked up by ID")
|
||||
}
|
||||
|
||||
collectionUrl, ok := schema.Links[COLLECTION]
|
||||
if !ok {
|
||||
return errors.New("Failed to find collection URL for [" + schemaType + "]")
|
||||
}
|
||||
|
||||
err := rancherClient.doGet(collectionUrl+"/"+id, nil, respObject)
|
||||
//TODO check for 404 and return nil, nil
|
||||
return err
|
||||
}
|
||||
|
||||
func (rancherClient *RancherBaseClientImpl) Delete(existing *Resource) error {
|
||||
if existing == nil {
|
||||
return nil
|
||||
}
|
||||
return rancherClient.doResourceDelete(existing.Type, existing)
|
||||
}
|
||||
|
||||
func (rancherClient *RancherBaseClientImpl) doResourceDelete(schemaType string, existing *Resource) error {
|
||||
schema, ok := rancherClient.Types[schemaType]
|
||||
if !ok {
|
||||
return errors.New("Unknown schema type [" + schemaType + "]")
|
||||
}
|
||||
|
||||
if !contains(schema.ResourceMethods, "DELETE") {
|
||||
return errors.New("Resource type [" + schemaType + "] can not be deleted")
|
||||
}
|
||||
|
||||
selfUrl, ok := existing.Links[SELF]
|
||||
if !ok {
|
||||
return errors.New(fmt.Sprintf("Failed to find self URL of [%v]", existing))
|
||||
}
|
||||
|
||||
return rancherClient.doDelete(selfUrl)
|
||||
}
|
||||
|
||||
func (rancherClient *RancherBaseClientImpl) Reload(existing *Resource, output interface{}) error {
|
||||
selfUrl, ok := existing.Links[SELF]
|
||||
if !ok {
|
||||
return errors.New(fmt.Sprintf("Failed to find self URL of [%v]", existing))
|
||||
}
|
||||
|
||||
return rancherClient.doGet(selfUrl, NewListOpts(), output)
|
||||
}
|
||||
|
||||
func (rancherClient *RancherBaseClientImpl) Action(schemaType string, action string,
|
||||
existing *Resource, inputObject, respObject interface{}) error {
|
||||
return rancherClient.doAction(schemaType, action, existing, inputObject, respObject)
|
||||
}
|
||||
|
||||
func (rancherClient *RancherBaseClientImpl) doAction(schemaType string, action string,
|
||||
existing *Resource, inputObject, respObject interface{}) error {
|
||||
|
||||
if existing == nil {
|
||||
return errors.New("Existing object is nil")
|
||||
}
|
||||
|
||||
actionUrl, ok := existing.Actions[action]
|
||||
if !ok {
|
||||
return errors.New(fmt.Sprintf("Action [%v] not available on [%v]", action, existing))
|
||||
}
|
||||
|
||||
_, ok = rancherClient.Types[schemaType]
|
||||
if !ok {
|
||||
return errors.New("Unknown schema type [" + schemaType + "]")
|
||||
}
|
||||
|
||||
var input io.Reader
|
||||
|
||||
if inputObject != nil {
|
||||
bodyContent, err := json.Marshal(inputObject)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if debug {
|
||||
fmt.Println("Request => " + string(bodyContent))
|
||||
}
|
||||
input = bytes.NewBuffer(bodyContent)
|
||||
}
|
||||
|
||||
client := rancherClient.newHttpClient()
|
||||
req, err := http.NewRequest("POST", actionUrl, input)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
rancherClient.setupRequest(req)
|
||||
req.Header.Set("Content-Type", "application/json")
|
||||
req.Header.Set("Content-Length", "0")
|
||||
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode >= 300 {
|
||||
return newApiError(resp, actionUrl)
|
||||
}
|
||||
|
||||
byteContent, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if debug {
|
||||
fmt.Println("Response <= " + string(byteContent))
|
||||
}
|
||||
|
||||
return json.Unmarshal(byteContent, respObject)
|
||||
}
|
||||
|
||||
func init() {
|
||||
debug = os.Getenv("RANCHER_CLIENT_DEBUG") == "true"
|
||||
if debug {
|
||||
fmt.Println("Rancher client debug on")
|
||||
}
|
||||
}
|
172
vendor/github.com/rancher/go-rancher/client/generated_account.go
generated
vendored
172
vendor/github.com/rancher/go-rancher/client/generated_account.go
generated
vendored
@ -1,172 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
ACCOUNT_TYPE = "account"
|
||||
)
|
||||
|
||||
type Account struct {
|
||||
Resource
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
|
||||
|
||||
ExternalIdType string `json:"externalIdType,omitempty" yaml:"external_id_type,omitempty"`
|
||||
|
||||
Identity string `json:"identity,omitempty" yaml:"identity,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type AccountCollection struct {
|
||||
Collection
|
||||
Data []Account `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type AccountClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type AccountOperations interface {
|
||||
List(opts *ListOpts) (*AccountCollection, error)
|
||||
Create(opts *Account) (*Account, error)
|
||||
Update(existing *Account, updates interface{}) (*Account, error)
|
||||
ById(id string) (*Account, error)
|
||||
Delete(container *Account) error
|
||||
|
||||
ActionActivate(*Account) (*Account, error)
|
||||
|
||||
ActionCreate(*Account) (*Account, error)
|
||||
|
||||
ActionDeactivate(*Account) (*Account, error)
|
||||
|
||||
ActionPurge(*Account) (*Account, error)
|
||||
|
||||
ActionRemove(*Account) (*Account, error)
|
||||
|
||||
ActionRestore(*Account) (*Account, error)
|
||||
|
||||
ActionUpdate(*Account) (*Account, error)
|
||||
}
|
||||
|
||||
func newAccountClient(rancherClient *RancherClient) *AccountClient {
|
||||
return &AccountClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *AccountClient) Create(container *Account) (*Account, error) {
|
||||
resp := &Account{}
|
||||
err := c.rancherClient.doCreate(ACCOUNT_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AccountClient) Update(existing *Account, updates interface{}) (*Account, error) {
|
||||
resp := &Account{}
|
||||
err := c.rancherClient.doUpdate(ACCOUNT_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AccountClient) List(opts *ListOpts) (*AccountCollection, error) {
|
||||
resp := &AccountCollection{}
|
||||
err := c.rancherClient.doList(ACCOUNT_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AccountClient) ById(id string) (*Account, error) {
|
||||
resp := &Account{}
|
||||
err := c.rancherClient.doById(ACCOUNT_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AccountClient) Delete(container *Account) error {
|
||||
return c.rancherClient.doResourceDelete(ACCOUNT_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *AccountClient) ActionActivate(resource *Account) (*Account, error) {
|
||||
|
||||
resp := &Account{}
|
||||
|
||||
err := c.rancherClient.doAction(ACCOUNT_TYPE, "activate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AccountClient) ActionCreate(resource *Account) (*Account, error) {
|
||||
|
||||
resp := &Account{}
|
||||
|
||||
err := c.rancherClient.doAction(ACCOUNT_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AccountClient) ActionDeactivate(resource *Account) (*Account, error) {
|
||||
|
||||
resp := &Account{}
|
||||
|
||||
err := c.rancherClient.doAction(ACCOUNT_TYPE, "deactivate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AccountClient) ActionPurge(resource *Account) (*Account, error) {
|
||||
|
||||
resp := &Account{}
|
||||
|
||||
err := c.rancherClient.doAction(ACCOUNT_TYPE, "purge", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AccountClient) ActionRemove(resource *Account) (*Account, error) {
|
||||
|
||||
resp := &Account{}
|
||||
|
||||
err := c.rancherClient.doAction(ACCOUNT_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AccountClient) ActionRestore(resource *Account) (*Account, error) {
|
||||
|
||||
resp := &Account{}
|
||||
|
||||
err := c.rancherClient.doAction(ACCOUNT_TYPE, "restore", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AccountClient) ActionUpdate(resource *Account) (*Account, error) {
|
||||
|
||||
resp := &Account{}
|
||||
|
||||
err := c.rancherClient.doAction(ACCOUNT_TYPE, "update", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
75
vendor/github.com/rancher/go-rancher/client/generated_active_setting.go
generated
vendored
75
vendor/github.com/rancher/go-rancher/client/generated_active_setting.go
generated
vendored
@ -1,75 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
ACTIVE_SETTING_TYPE = "activeSetting"
|
||||
)
|
||||
|
||||
type ActiveSetting struct {
|
||||
Resource
|
||||
|
||||
ActiveValue interface{} `json:"activeValue,omitempty" yaml:"active_value,omitempty"`
|
||||
|
||||
InDb bool `json:"inDb,omitempty" yaml:"in_db,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
Source string `json:"source,omitempty" yaml:"source,omitempty"`
|
||||
|
||||
Value string `json:"value,omitempty" yaml:"value,omitempty"`
|
||||
}
|
||||
|
||||
type ActiveSettingCollection struct {
|
||||
Collection
|
||||
Data []ActiveSetting `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ActiveSettingClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ActiveSettingOperations interface {
|
||||
List(opts *ListOpts) (*ActiveSettingCollection, error)
|
||||
Create(opts *ActiveSetting) (*ActiveSetting, error)
|
||||
Update(existing *ActiveSetting, updates interface{}) (*ActiveSetting, error)
|
||||
ById(id string) (*ActiveSetting, error)
|
||||
Delete(container *ActiveSetting) error
|
||||
}
|
||||
|
||||
func newActiveSettingClient(rancherClient *RancherClient) *ActiveSettingClient {
|
||||
return &ActiveSettingClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ActiveSettingClient) Create(container *ActiveSetting) (*ActiveSetting, error) {
|
||||
resp := &ActiveSetting{}
|
||||
err := c.rancherClient.doCreate(ACTIVE_SETTING_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ActiveSettingClient) Update(existing *ActiveSetting, updates interface{}) (*ActiveSetting, error) {
|
||||
resp := &ActiveSetting{}
|
||||
err := c.rancherClient.doUpdate(ACTIVE_SETTING_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ActiveSettingClient) List(opts *ListOpts) (*ActiveSettingCollection, error) {
|
||||
resp := &ActiveSettingCollection{}
|
||||
err := c.rancherClient.doList(ACTIVE_SETTING_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ActiveSettingClient) ById(id string) (*ActiveSetting, error) {
|
||||
resp := &ActiveSetting{}
|
||||
err := c.rancherClient.doById(ACTIVE_SETTING_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ActiveSettingClient) Delete(container *ActiveSetting) error {
|
||||
return c.rancherClient.doResourceDelete(ACTIVE_SETTING_TYPE, &container.Resource)
|
||||
}
|
67
vendor/github.com/rancher/go-rancher/client/generated_add_outputs_input.go
generated
vendored
67
vendor/github.com/rancher/go-rancher/client/generated_add_outputs_input.go
generated
vendored
@ -1,67 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
ADD_OUTPUTS_INPUT_TYPE = "addOutputsInput"
|
||||
)
|
||||
|
||||
type AddOutputsInput struct {
|
||||
Resource
|
||||
|
||||
Outputs map[string]interface{} `json:"outputs,omitempty" yaml:"outputs,omitempty"`
|
||||
}
|
||||
|
||||
type AddOutputsInputCollection struct {
|
||||
Collection
|
||||
Data []AddOutputsInput `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type AddOutputsInputClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type AddOutputsInputOperations interface {
|
||||
List(opts *ListOpts) (*AddOutputsInputCollection, error)
|
||||
Create(opts *AddOutputsInput) (*AddOutputsInput, error)
|
||||
Update(existing *AddOutputsInput, updates interface{}) (*AddOutputsInput, error)
|
||||
ById(id string) (*AddOutputsInput, error)
|
||||
Delete(container *AddOutputsInput) error
|
||||
}
|
||||
|
||||
func newAddOutputsInputClient(rancherClient *RancherClient) *AddOutputsInputClient {
|
||||
return &AddOutputsInputClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *AddOutputsInputClient) Create(container *AddOutputsInput) (*AddOutputsInput, error) {
|
||||
resp := &AddOutputsInput{}
|
||||
err := c.rancherClient.doCreate(ADD_OUTPUTS_INPUT_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AddOutputsInputClient) Update(existing *AddOutputsInput, updates interface{}) (*AddOutputsInput, error) {
|
||||
resp := &AddOutputsInput{}
|
||||
err := c.rancherClient.doUpdate(ADD_OUTPUTS_INPUT_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AddOutputsInputClient) List(opts *ListOpts) (*AddOutputsInputCollection, error) {
|
||||
resp := &AddOutputsInputCollection{}
|
||||
err := c.rancherClient.doList(ADD_OUTPUTS_INPUT_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AddOutputsInputClient) ById(id string) (*AddOutputsInput, error) {
|
||||
resp := &AddOutputsInput{}
|
||||
err := c.rancherClient.doById(ADD_OUTPUTS_INPUT_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AddOutputsInputClient) Delete(container *AddOutputsInput) error {
|
||||
return c.rancherClient.doResourceDelete(ADD_OUTPUTS_INPUT_TYPE, &container.Resource)
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
ADD_REMOVE_LOAD_BALANCER_SERVICE_LINK_INPUT_TYPE = "addRemoveLoadBalancerServiceLinkInput"
|
||||
)
|
||||
|
||||
type AddRemoveLoadBalancerServiceLinkInput struct {
|
||||
Resource
|
||||
|
||||
ServiceLink LoadBalancerServiceLink `json:"serviceLink,omitempty" yaml:"service_link,omitempty"`
|
||||
}
|
||||
|
||||
type AddRemoveLoadBalancerServiceLinkInputCollection struct {
|
||||
Collection
|
||||
Data []AddRemoveLoadBalancerServiceLinkInput `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type AddRemoveLoadBalancerServiceLinkInputClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type AddRemoveLoadBalancerServiceLinkInputOperations interface {
|
||||
List(opts *ListOpts) (*AddRemoveLoadBalancerServiceLinkInputCollection, error)
|
||||
Create(opts *AddRemoveLoadBalancerServiceLinkInput) (*AddRemoveLoadBalancerServiceLinkInput, error)
|
||||
Update(existing *AddRemoveLoadBalancerServiceLinkInput, updates interface{}) (*AddRemoveLoadBalancerServiceLinkInput, error)
|
||||
ById(id string) (*AddRemoveLoadBalancerServiceLinkInput, error)
|
||||
Delete(container *AddRemoveLoadBalancerServiceLinkInput) error
|
||||
}
|
||||
|
||||
func newAddRemoveLoadBalancerServiceLinkInputClient(rancherClient *RancherClient) *AddRemoveLoadBalancerServiceLinkInputClient {
|
||||
return &AddRemoveLoadBalancerServiceLinkInputClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *AddRemoveLoadBalancerServiceLinkInputClient) Create(container *AddRemoveLoadBalancerServiceLinkInput) (*AddRemoveLoadBalancerServiceLinkInput, error) {
|
||||
resp := &AddRemoveLoadBalancerServiceLinkInput{}
|
||||
err := c.rancherClient.doCreate(ADD_REMOVE_LOAD_BALANCER_SERVICE_LINK_INPUT_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AddRemoveLoadBalancerServiceLinkInputClient) Update(existing *AddRemoveLoadBalancerServiceLinkInput, updates interface{}) (*AddRemoveLoadBalancerServiceLinkInput, error) {
|
||||
resp := &AddRemoveLoadBalancerServiceLinkInput{}
|
||||
err := c.rancherClient.doUpdate(ADD_REMOVE_LOAD_BALANCER_SERVICE_LINK_INPUT_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AddRemoveLoadBalancerServiceLinkInputClient) List(opts *ListOpts) (*AddRemoveLoadBalancerServiceLinkInputCollection, error) {
|
||||
resp := &AddRemoveLoadBalancerServiceLinkInputCollection{}
|
||||
err := c.rancherClient.doList(ADD_REMOVE_LOAD_BALANCER_SERVICE_LINK_INPUT_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AddRemoveLoadBalancerServiceLinkInputClient) ById(id string) (*AddRemoveLoadBalancerServiceLinkInput, error) {
|
||||
resp := &AddRemoveLoadBalancerServiceLinkInput{}
|
||||
err := c.rancherClient.doById(ADD_REMOVE_LOAD_BALANCER_SERVICE_LINK_INPUT_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AddRemoveLoadBalancerServiceLinkInputClient) Delete(container *AddRemoveLoadBalancerServiceLinkInput) error {
|
||||
return c.rancherClient.doResourceDelete(ADD_REMOVE_LOAD_BALANCER_SERVICE_LINK_INPUT_TYPE, &container.Resource)
|
||||
}
|
67
vendor/github.com/rancher/go-rancher/client/generated_add_remove_service_link_input.go
generated
vendored
67
vendor/github.com/rancher/go-rancher/client/generated_add_remove_service_link_input.go
generated
vendored
@ -1,67 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
ADD_REMOVE_SERVICE_LINK_INPUT_TYPE = "addRemoveServiceLinkInput"
|
||||
)
|
||||
|
||||
type AddRemoveServiceLinkInput struct {
|
||||
Resource
|
||||
|
||||
ServiceLink ServiceLink `json:"serviceLink,omitempty" yaml:"service_link,omitempty"`
|
||||
}
|
||||
|
||||
type AddRemoveServiceLinkInputCollection struct {
|
||||
Collection
|
||||
Data []AddRemoveServiceLinkInput `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type AddRemoveServiceLinkInputClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type AddRemoveServiceLinkInputOperations interface {
|
||||
List(opts *ListOpts) (*AddRemoveServiceLinkInputCollection, error)
|
||||
Create(opts *AddRemoveServiceLinkInput) (*AddRemoveServiceLinkInput, error)
|
||||
Update(existing *AddRemoveServiceLinkInput, updates interface{}) (*AddRemoveServiceLinkInput, error)
|
||||
ById(id string) (*AddRemoveServiceLinkInput, error)
|
||||
Delete(container *AddRemoveServiceLinkInput) error
|
||||
}
|
||||
|
||||
func newAddRemoveServiceLinkInputClient(rancherClient *RancherClient) *AddRemoveServiceLinkInputClient {
|
||||
return &AddRemoveServiceLinkInputClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *AddRemoveServiceLinkInputClient) Create(container *AddRemoveServiceLinkInput) (*AddRemoveServiceLinkInput, error) {
|
||||
resp := &AddRemoveServiceLinkInput{}
|
||||
err := c.rancherClient.doCreate(ADD_REMOVE_SERVICE_LINK_INPUT_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AddRemoveServiceLinkInputClient) Update(existing *AddRemoveServiceLinkInput, updates interface{}) (*AddRemoveServiceLinkInput, error) {
|
||||
resp := &AddRemoveServiceLinkInput{}
|
||||
err := c.rancherClient.doUpdate(ADD_REMOVE_SERVICE_LINK_INPUT_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AddRemoveServiceLinkInputClient) List(opts *ListOpts) (*AddRemoveServiceLinkInputCollection, error) {
|
||||
resp := &AddRemoveServiceLinkInputCollection{}
|
||||
err := c.rancherClient.doList(ADD_REMOVE_SERVICE_LINK_INPUT_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AddRemoveServiceLinkInputClient) ById(id string) (*AddRemoveServiceLinkInput, error) {
|
||||
resp := &AddRemoveServiceLinkInput{}
|
||||
err := c.rancherClient.doById(ADD_REMOVE_SERVICE_LINK_INPUT_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AddRemoveServiceLinkInputClient) Delete(container *AddRemoveServiceLinkInput) error {
|
||||
return c.rancherClient.doResourceDelete(ADD_REMOVE_SERVICE_LINK_INPUT_TYPE, &container.Resource)
|
||||
}
|
194
vendor/github.com/rancher/go-rancher/client/generated_agent.go
generated
vendored
194
vendor/github.com/rancher/go-rancher/client/generated_agent.go
generated
vendored
@ -1,194 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
AGENT_TYPE = "agent"
|
||||
)
|
||||
|
||||
type Agent struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
ManagedConfig bool `json:"managedConfig,omitempty" yaml:"managed_config,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uri string `json:"uri,omitempty" yaml:"uri,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type AgentCollection struct {
|
||||
Collection
|
||||
Data []Agent `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type AgentClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type AgentOperations interface {
|
||||
List(opts *ListOpts) (*AgentCollection, error)
|
||||
Create(opts *Agent) (*Agent, error)
|
||||
Update(existing *Agent, updates interface{}) (*Agent, error)
|
||||
ById(id string) (*Agent, error)
|
||||
Delete(container *Agent) error
|
||||
|
||||
ActionActivate(*Agent) (*Agent, error)
|
||||
|
||||
ActionCreate(*Agent) (*Agent, error)
|
||||
|
||||
ActionDeactivate(*Agent) (*Agent, error)
|
||||
|
||||
ActionDisconnect(*Agent) (*Agent, error)
|
||||
|
||||
ActionPurge(*Agent) (*Agent, error)
|
||||
|
||||
ActionReconnect(*Agent) (*Agent, error)
|
||||
|
||||
ActionRemove(*Agent) (*Agent, error)
|
||||
|
||||
ActionRestore(*Agent) (*Agent, error)
|
||||
|
||||
ActionUpdate(*Agent) (*Agent, error)
|
||||
}
|
||||
|
||||
func newAgentClient(rancherClient *RancherClient) *AgentClient {
|
||||
return &AgentClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *AgentClient) Create(container *Agent) (*Agent, error) {
|
||||
resp := &Agent{}
|
||||
err := c.rancherClient.doCreate(AGENT_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AgentClient) Update(existing *Agent, updates interface{}) (*Agent, error) {
|
||||
resp := &Agent{}
|
||||
err := c.rancherClient.doUpdate(AGENT_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AgentClient) List(opts *ListOpts) (*AgentCollection, error) {
|
||||
resp := &AgentCollection{}
|
||||
err := c.rancherClient.doList(AGENT_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AgentClient) ById(id string) (*Agent, error) {
|
||||
resp := &Agent{}
|
||||
err := c.rancherClient.doById(AGENT_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AgentClient) Delete(container *Agent) error {
|
||||
return c.rancherClient.doResourceDelete(AGENT_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *AgentClient) ActionActivate(resource *Agent) (*Agent, error) {
|
||||
|
||||
resp := &Agent{}
|
||||
|
||||
err := c.rancherClient.doAction(AGENT_TYPE, "activate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AgentClient) ActionCreate(resource *Agent) (*Agent, error) {
|
||||
|
||||
resp := &Agent{}
|
||||
|
||||
err := c.rancherClient.doAction(AGENT_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AgentClient) ActionDeactivate(resource *Agent) (*Agent, error) {
|
||||
|
||||
resp := &Agent{}
|
||||
|
||||
err := c.rancherClient.doAction(AGENT_TYPE, "deactivate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AgentClient) ActionDisconnect(resource *Agent) (*Agent, error) {
|
||||
|
||||
resp := &Agent{}
|
||||
|
||||
err := c.rancherClient.doAction(AGENT_TYPE, "disconnect", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AgentClient) ActionPurge(resource *Agent) (*Agent, error) {
|
||||
|
||||
resp := &Agent{}
|
||||
|
||||
err := c.rancherClient.doAction(AGENT_TYPE, "purge", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AgentClient) ActionReconnect(resource *Agent) (*Agent, error) {
|
||||
|
||||
resp := &Agent{}
|
||||
|
||||
err := c.rancherClient.doAction(AGENT_TYPE, "reconnect", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AgentClient) ActionRemove(resource *Agent) (*Agent, error) {
|
||||
|
||||
resp := &Agent{}
|
||||
|
||||
err := c.rancherClient.doAction(AGENT_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AgentClient) ActionRestore(resource *Agent) (*Agent, error) {
|
||||
|
||||
resp := &Agent{}
|
||||
|
||||
err := c.rancherClient.doAction(AGENT_TYPE, "restore", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AgentClient) ActionUpdate(resource *Agent) (*Agent, error) {
|
||||
|
||||
resp := &Agent{}
|
||||
|
||||
err := c.rancherClient.doAction(AGENT_TYPE, "update", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
121
vendor/github.com/rancher/go-rancher/client/generated_amazonec2config.go
generated
vendored
121
vendor/github.com/rancher/go-rancher/client/generated_amazonec2config.go
generated
vendored
@ -1,121 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
AMAZONEC2CONFIG_TYPE = "amazonec2Config"
|
||||
)
|
||||
|
||||
type Amazonec2Config struct {
|
||||
Resource
|
||||
|
||||
AccessKey string `json:"accessKey,omitempty" yaml:"access_key,omitempty"`
|
||||
|
||||
Ami string `json:"ami,omitempty" yaml:"ami,omitempty"`
|
||||
|
||||
DeviceName string `json:"deviceName,omitempty" yaml:"device_name,omitempty"`
|
||||
|
||||
Endpoint string `json:"endpoint,omitempty" yaml:"endpoint,omitempty"`
|
||||
|
||||
IamInstanceProfile string `json:"iamInstanceProfile,omitempty" yaml:"iam_instance_profile,omitempty"`
|
||||
|
||||
InsecureTransport bool `json:"insecureTransport,omitempty" yaml:"insecure_transport,omitempty"`
|
||||
|
||||
InstanceType string `json:"instanceType,omitempty" yaml:"instance_type,omitempty"`
|
||||
|
||||
KeypairName string `json:"keypairName,omitempty" yaml:"keypair_name,omitempty"`
|
||||
|
||||
Monitoring bool `json:"monitoring,omitempty" yaml:"monitoring,omitempty"`
|
||||
|
||||
OpenPort []string `json:"openPort,omitempty" yaml:"open_port,omitempty"`
|
||||
|
||||
PrivateAddressOnly bool `json:"privateAddressOnly,omitempty" yaml:"private_address_only,omitempty"`
|
||||
|
||||
Region string `json:"region,omitempty" yaml:"region,omitempty"`
|
||||
|
||||
RequestSpotInstance bool `json:"requestSpotInstance,omitempty" yaml:"request_spot_instance,omitempty"`
|
||||
|
||||
Retries string `json:"retries,omitempty" yaml:"retries,omitempty"`
|
||||
|
||||
RootSize string `json:"rootSize,omitempty" yaml:"root_size,omitempty"`
|
||||
|
||||
SecretKey string `json:"secretKey,omitempty" yaml:"secret_key,omitempty"`
|
||||
|
||||
SecurityGroup []string `json:"securityGroup,omitempty" yaml:"security_group,omitempty"`
|
||||
|
||||
SessionToken string `json:"sessionToken,omitempty" yaml:"session_token,omitempty"`
|
||||
|
||||
SpotPrice string `json:"spotPrice,omitempty" yaml:"spot_price,omitempty"`
|
||||
|
||||
SshKeypath string `json:"sshKeypath,omitempty" yaml:"ssh_keypath,omitempty"`
|
||||
|
||||
SshUser string `json:"sshUser,omitempty" yaml:"ssh_user,omitempty"`
|
||||
|
||||
SubnetId string `json:"subnetId,omitempty" yaml:"subnet_id,omitempty"`
|
||||
|
||||
Tags string `json:"tags,omitempty" yaml:"tags,omitempty"`
|
||||
|
||||
UseEbsOptimizedInstance bool `json:"useEbsOptimizedInstance,omitempty" yaml:"use_ebs_optimized_instance,omitempty"`
|
||||
|
||||
UsePrivateAddress bool `json:"usePrivateAddress,omitempty" yaml:"use_private_address,omitempty"`
|
||||
|
||||
VolumeType string `json:"volumeType,omitempty" yaml:"volume_type,omitempty"`
|
||||
|
||||
VpcId string `json:"vpcId,omitempty" yaml:"vpc_id,omitempty"`
|
||||
|
||||
Zone string `json:"zone,omitempty" yaml:"zone,omitempty"`
|
||||
}
|
||||
|
||||
type Amazonec2ConfigCollection struct {
|
||||
Collection
|
||||
Data []Amazonec2Config `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type Amazonec2ConfigClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type Amazonec2ConfigOperations interface {
|
||||
List(opts *ListOpts) (*Amazonec2ConfigCollection, error)
|
||||
Create(opts *Amazonec2Config) (*Amazonec2Config, error)
|
||||
Update(existing *Amazonec2Config, updates interface{}) (*Amazonec2Config, error)
|
||||
ById(id string) (*Amazonec2Config, error)
|
||||
Delete(container *Amazonec2Config) error
|
||||
}
|
||||
|
||||
func newAmazonec2ConfigClient(rancherClient *RancherClient) *Amazonec2ConfigClient {
|
||||
return &Amazonec2ConfigClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Amazonec2ConfigClient) Create(container *Amazonec2Config) (*Amazonec2Config, error) {
|
||||
resp := &Amazonec2Config{}
|
||||
err := c.rancherClient.doCreate(AMAZONEC2CONFIG_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *Amazonec2ConfigClient) Update(existing *Amazonec2Config, updates interface{}) (*Amazonec2Config, error) {
|
||||
resp := &Amazonec2Config{}
|
||||
err := c.rancherClient.doUpdate(AMAZONEC2CONFIG_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *Amazonec2ConfigClient) List(opts *ListOpts) (*Amazonec2ConfigCollection, error) {
|
||||
resp := &Amazonec2ConfigCollection{}
|
||||
err := c.rancherClient.doList(AMAZONEC2CONFIG_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *Amazonec2ConfigClient) ById(id string) (*Amazonec2Config, error) {
|
||||
resp := &Amazonec2Config{}
|
||||
err := c.rancherClient.doById(AMAZONEC2CONFIG_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *Amazonec2ConfigClient) Delete(container *Amazonec2Config) error {
|
||||
return c.rancherClient.doResourceDelete(AMAZONEC2CONFIG_TYPE, &container.Resource)
|
||||
}
|
161
vendor/github.com/rancher/go-rancher/client/generated_api_key.go
generated
vendored
161
vendor/github.com/rancher/go-rancher/client/generated_api_key.go
generated
vendored
@ -1,161 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
API_KEY_TYPE = "apiKey"
|
||||
)
|
||||
|
||||
type ApiKey struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
PublicValue string `json:"publicValue,omitempty" yaml:"public_value,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
SecretValue string `json:"secretValue,omitempty" yaml:"secret_value,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type ApiKeyCollection struct {
|
||||
Collection
|
||||
Data []ApiKey `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ApiKeyClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ApiKeyOperations interface {
|
||||
List(opts *ListOpts) (*ApiKeyCollection, error)
|
||||
Create(opts *ApiKey) (*ApiKey, error)
|
||||
Update(existing *ApiKey, updates interface{}) (*ApiKey, error)
|
||||
ById(id string) (*ApiKey, error)
|
||||
Delete(container *ApiKey) error
|
||||
|
||||
ActionActivate(*ApiKey) (*Credential, error)
|
||||
|
||||
ActionCreate(*ApiKey) (*Credential, error)
|
||||
|
||||
ActionDeactivate(*ApiKey) (*Credential, error)
|
||||
|
||||
ActionPurge(*ApiKey) (*Credential, error)
|
||||
|
||||
ActionRemove(*ApiKey) (*Credential, error)
|
||||
|
||||
ActionUpdate(*ApiKey) (*Credential, error)
|
||||
}
|
||||
|
||||
func newApiKeyClient(rancherClient *RancherClient) *ApiKeyClient {
|
||||
return &ApiKeyClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ApiKeyClient) Create(container *ApiKey) (*ApiKey, error) {
|
||||
resp := &ApiKey{}
|
||||
err := c.rancherClient.doCreate(API_KEY_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ApiKeyClient) Update(existing *ApiKey, updates interface{}) (*ApiKey, error) {
|
||||
resp := &ApiKey{}
|
||||
err := c.rancherClient.doUpdate(API_KEY_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ApiKeyClient) List(opts *ListOpts) (*ApiKeyCollection, error) {
|
||||
resp := &ApiKeyCollection{}
|
||||
err := c.rancherClient.doList(API_KEY_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ApiKeyClient) ById(id string) (*ApiKey, error) {
|
||||
resp := &ApiKey{}
|
||||
err := c.rancherClient.doById(API_KEY_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ApiKeyClient) Delete(container *ApiKey) error {
|
||||
return c.rancherClient.doResourceDelete(API_KEY_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *ApiKeyClient) ActionActivate(resource *ApiKey) (*Credential, error) {
|
||||
|
||||
resp := &Credential{}
|
||||
|
||||
err := c.rancherClient.doAction(API_KEY_TYPE, "activate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ApiKeyClient) ActionCreate(resource *ApiKey) (*Credential, error) {
|
||||
|
||||
resp := &Credential{}
|
||||
|
||||
err := c.rancherClient.doAction(API_KEY_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ApiKeyClient) ActionDeactivate(resource *ApiKey) (*Credential, error) {
|
||||
|
||||
resp := &Credential{}
|
||||
|
||||
err := c.rancherClient.doAction(API_KEY_TYPE, "deactivate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ApiKeyClient) ActionPurge(resource *ApiKey) (*Credential, error) {
|
||||
|
||||
resp := &Credential{}
|
||||
|
||||
err := c.rancherClient.doAction(API_KEY_TYPE, "purge", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ApiKeyClient) ActionRemove(resource *ApiKey) (*Credential, error) {
|
||||
|
||||
resp := &Credential{}
|
||||
|
||||
err := c.rancherClient.doAction(API_KEY_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ApiKeyClient) ActionUpdate(resource *ApiKey) (*Credential, error) {
|
||||
|
||||
resp := &Credential{}
|
||||
|
||||
err := c.rancherClient.doAction(API_KEY_TYPE, "update", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
93
vendor/github.com/rancher/go-rancher/client/generated_audit_log.go
generated
vendored
93
vendor/github.com/rancher/go-rancher/client/generated_audit_log.go
generated
vendored
@ -1,93 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
AUDIT_LOG_TYPE = "auditLog"
|
||||
)
|
||||
|
||||
type AuditLog struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
AuthType string `json:"authType,omitempty" yaml:"auth_type,omitempty"`
|
||||
|
||||
AuthenticatedAsAccountId string `json:"authenticatedAsAccountId,omitempty" yaml:"authenticated_as_account_id,omitempty"`
|
||||
|
||||
AuthenticatedAsIdentityId string `json:"authenticatedAsIdentityId,omitempty" yaml:"authenticated_as_identity_id,omitempty"`
|
||||
|
||||
ClientIp string `json:"clientIp,omitempty" yaml:"client_ip,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
EventType string `json:"eventType,omitempty" yaml:"event_type,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
RequestObject string `json:"requestObject,omitempty" yaml:"request_object,omitempty"`
|
||||
|
||||
ResourceId int64 `json:"resourceId,omitempty" yaml:"resource_id,omitempty"`
|
||||
|
||||
ResourceType string `json:"resourceType,omitempty" yaml:"resource_type,omitempty"`
|
||||
|
||||
ResponseCode string `json:"responseCode,omitempty" yaml:"response_code,omitempty"`
|
||||
|
||||
ResponseObject string `json:"responseObject,omitempty" yaml:"response_object,omitempty"`
|
||||
}
|
||||
|
||||
type AuditLogCollection struct {
|
||||
Collection
|
||||
Data []AuditLog `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type AuditLogClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type AuditLogOperations interface {
|
||||
List(opts *ListOpts) (*AuditLogCollection, error)
|
||||
Create(opts *AuditLog) (*AuditLog, error)
|
||||
Update(existing *AuditLog, updates interface{}) (*AuditLog, error)
|
||||
ById(id string) (*AuditLog, error)
|
||||
Delete(container *AuditLog) error
|
||||
}
|
||||
|
||||
func newAuditLogClient(rancherClient *RancherClient) *AuditLogClient {
|
||||
return &AuditLogClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *AuditLogClient) Create(container *AuditLog) (*AuditLog, error) {
|
||||
resp := &AuditLog{}
|
||||
err := c.rancherClient.doCreate(AUDIT_LOG_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AuditLogClient) Update(existing *AuditLog, updates interface{}) (*AuditLog, error) {
|
||||
resp := &AuditLog{}
|
||||
err := c.rancherClient.doUpdate(AUDIT_LOG_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AuditLogClient) List(opts *ListOpts) (*AuditLogCollection, error) {
|
||||
resp := &AuditLogCollection{}
|
||||
err := c.rancherClient.doList(AUDIT_LOG_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AuditLogClient) ById(id string) (*AuditLog, error) {
|
||||
resp := &AuditLog{}
|
||||
err := c.rancherClient.doById(AUDIT_LOG_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AuditLogClient) Delete(container *AuditLog) error {
|
||||
return c.rancherClient.doResourceDelete(AUDIT_LOG_TYPE, &container.Resource)
|
||||
}
|
107
vendor/github.com/rancher/go-rancher/client/generated_azure_config.go
generated
vendored
107
vendor/github.com/rancher/go-rancher/client/generated_azure_config.go
generated
vendored
@ -1,107 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
AZURE_CONFIG_TYPE = "azureConfig"
|
||||
)
|
||||
|
||||
type AzureConfig struct {
|
||||
Resource
|
||||
|
||||
AvailabilitySet string `json:"availabilitySet,omitempty" yaml:"availability_set,omitempty"`
|
||||
|
||||
ClientId string `json:"clientId,omitempty" yaml:"client_id,omitempty"`
|
||||
|
||||
ClientSecret string `json:"clientSecret,omitempty" yaml:"client_secret,omitempty"`
|
||||
|
||||
CustomData string `json:"customData,omitempty" yaml:"custom_data,omitempty"`
|
||||
|
||||
DockerPort string `json:"dockerPort,omitempty" yaml:"docker_port,omitempty"`
|
||||
|
||||
Environment string `json:"environment,omitempty" yaml:"environment,omitempty"`
|
||||
|
||||
Image string `json:"image,omitempty" yaml:"image,omitempty"`
|
||||
|
||||
Location string `json:"location,omitempty" yaml:"location,omitempty"`
|
||||
|
||||
NoPublicIp bool `json:"noPublicIp,omitempty" yaml:"no_public_ip,omitempty"`
|
||||
|
||||
OpenPort []string `json:"openPort,omitempty" yaml:"open_port,omitempty"`
|
||||
|
||||
PrivateIpAddress string `json:"privateIpAddress,omitempty" yaml:"private_ip_address,omitempty"`
|
||||
|
||||
ResourceGroup string `json:"resourceGroup,omitempty" yaml:"resource_group,omitempty"`
|
||||
|
||||
Size string `json:"size,omitempty" yaml:"size,omitempty"`
|
||||
|
||||
SshUser string `json:"sshUser,omitempty" yaml:"ssh_user,omitempty"`
|
||||
|
||||
StaticPublicIp bool `json:"staticPublicIp,omitempty" yaml:"static_public_ip,omitempty"`
|
||||
|
||||
StorageType string `json:"storageType,omitempty" yaml:"storage_type,omitempty"`
|
||||
|
||||
Subnet string `json:"subnet,omitempty" yaml:"subnet,omitempty"`
|
||||
|
||||
SubnetPrefix string `json:"subnetPrefix,omitempty" yaml:"subnet_prefix,omitempty"`
|
||||
|
||||
SubscriptionId string `json:"subscriptionId,omitempty" yaml:"subscription_id,omitempty"`
|
||||
|
||||
UsePrivateIp bool `json:"usePrivateIp,omitempty" yaml:"use_private_ip,omitempty"`
|
||||
|
||||
Vnet string `json:"vnet,omitempty" yaml:"vnet,omitempty"`
|
||||
}
|
||||
|
||||
type AzureConfigCollection struct {
|
||||
Collection
|
||||
Data []AzureConfig `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type AzureConfigClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type AzureConfigOperations interface {
|
||||
List(opts *ListOpts) (*AzureConfigCollection, error)
|
||||
Create(opts *AzureConfig) (*AzureConfig, error)
|
||||
Update(existing *AzureConfig, updates interface{}) (*AzureConfig, error)
|
||||
ById(id string) (*AzureConfig, error)
|
||||
Delete(container *AzureConfig) error
|
||||
}
|
||||
|
||||
func newAzureConfigClient(rancherClient *RancherClient) *AzureConfigClient {
|
||||
return &AzureConfigClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *AzureConfigClient) Create(container *AzureConfig) (*AzureConfig, error) {
|
||||
resp := &AzureConfig{}
|
||||
err := c.rancherClient.doCreate(AZURE_CONFIG_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AzureConfigClient) Update(existing *AzureConfig, updates interface{}) (*AzureConfig, error) {
|
||||
resp := &AzureConfig{}
|
||||
err := c.rancherClient.doUpdate(AZURE_CONFIG_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AzureConfigClient) List(opts *ListOpts) (*AzureConfigCollection, error) {
|
||||
resp := &AzureConfigCollection{}
|
||||
err := c.rancherClient.doList(AZURE_CONFIG_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AzureConfigClient) ById(id string) (*AzureConfig, error) {
|
||||
resp := &AzureConfig{}
|
||||
err := c.rancherClient.doById(AZURE_CONFIG_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AzureConfigClient) Delete(container *AzureConfig) error {
|
||||
return c.rancherClient.doResourceDelete(AZURE_CONFIG_TYPE, &container.Resource)
|
||||
}
|
81
vendor/github.com/rancher/go-rancher/client/generated_azureadconfig.go
generated
vendored
81
vendor/github.com/rancher/go-rancher/client/generated_azureadconfig.go
generated
vendored
@ -1,81 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
AZUREADCONFIG_TYPE = "azureadconfig"
|
||||
)
|
||||
|
||||
type Azureadconfig struct {
|
||||
Resource
|
||||
|
||||
AccessMode string `json:"accessMode,omitempty" yaml:"access_mode,omitempty"`
|
||||
|
||||
AdminAccountPassword string `json:"adminAccountPassword,omitempty" yaml:"admin_account_password,omitempty"`
|
||||
|
||||
AdminAccountUsername string `json:"adminAccountUsername,omitempty" yaml:"admin_account_username,omitempty"`
|
||||
|
||||
ClientId string `json:"clientId,omitempty" yaml:"client_id,omitempty"`
|
||||
|
||||
Domain string `json:"domain,omitempty" yaml:"domain,omitempty"`
|
||||
|
||||
Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
TenantId string `json:"tenantId,omitempty" yaml:"tenant_id,omitempty"`
|
||||
}
|
||||
|
||||
type AzureadconfigCollection struct {
|
||||
Collection
|
||||
Data []Azureadconfig `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type AzureadconfigClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type AzureadconfigOperations interface {
|
||||
List(opts *ListOpts) (*AzureadconfigCollection, error)
|
||||
Create(opts *Azureadconfig) (*Azureadconfig, error)
|
||||
Update(existing *Azureadconfig, updates interface{}) (*Azureadconfig, error)
|
||||
ById(id string) (*Azureadconfig, error)
|
||||
Delete(container *Azureadconfig) error
|
||||
}
|
||||
|
||||
func newAzureadconfigClient(rancherClient *RancherClient) *AzureadconfigClient {
|
||||
return &AzureadconfigClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *AzureadconfigClient) Create(container *Azureadconfig) (*Azureadconfig, error) {
|
||||
resp := &Azureadconfig{}
|
||||
err := c.rancherClient.doCreate(AZUREADCONFIG_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AzureadconfigClient) Update(existing *Azureadconfig, updates interface{}) (*Azureadconfig, error) {
|
||||
resp := &Azureadconfig{}
|
||||
err := c.rancherClient.doUpdate(AZUREADCONFIG_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AzureadconfigClient) List(opts *ListOpts) (*AzureadconfigCollection, error) {
|
||||
resp := &AzureadconfigCollection{}
|
||||
err := c.rancherClient.doList(AZUREADCONFIG_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AzureadconfigClient) ById(id string) (*Azureadconfig, error) {
|
||||
resp := &Azureadconfig{}
|
||||
err := c.rancherClient.doById(AZUREADCONFIG_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *AzureadconfigClient) Delete(container *Azureadconfig) error {
|
||||
return c.rancherClient.doResourceDelete(AZUREADCONFIG_TYPE, &container.Resource)
|
||||
}
|
121
vendor/github.com/rancher/go-rancher/client/generated_backup.go
generated
vendored
121
vendor/github.com/rancher/go-rancher/client/generated_backup.go
generated
vendored
@ -1,121 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
BACKUP_TYPE = "backup"
|
||||
)
|
||||
|
||||
type Backup struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
BackupTargetId string `json:"backupTargetId,omitempty" yaml:"backup_target_id,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
SnapshotId string `json:"snapshotId,omitempty" yaml:"snapshot_id,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uri string `json:"uri,omitempty" yaml:"uri,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
|
||||
VolumeId string `json:"volumeId,omitempty" yaml:"volume_id,omitempty"`
|
||||
}
|
||||
|
||||
type BackupCollection struct {
|
||||
Collection
|
||||
Data []Backup `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type BackupClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type BackupOperations interface {
|
||||
List(opts *ListOpts) (*BackupCollection, error)
|
||||
Create(opts *Backup) (*Backup, error)
|
||||
Update(existing *Backup, updates interface{}) (*Backup, error)
|
||||
ById(id string) (*Backup, error)
|
||||
Delete(container *Backup) error
|
||||
|
||||
ActionCreate(*Backup) (*Backup, error)
|
||||
|
||||
ActionRemove(*Backup) (*Backup, error)
|
||||
}
|
||||
|
||||
func newBackupClient(rancherClient *RancherClient) *BackupClient {
|
||||
return &BackupClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *BackupClient) Create(container *Backup) (*Backup, error) {
|
||||
resp := &Backup{}
|
||||
err := c.rancherClient.doCreate(BACKUP_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *BackupClient) Update(existing *Backup, updates interface{}) (*Backup, error) {
|
||||
resp := &Backup{}
|
||||
err := c.rancherClient.doUpdate(BACKUP_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *BackupClient) List(opts *ListOpts) (*BackupCollection, error) {
|
||||
resp := &BackupCollection{}
|
||||
err := c.rancherClient.doList(BACKUP_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *BackupClient) ById(id string) (*Backup, error) {
|
||||
resp := &Backup{}
|
||||
err := c.rancherClient.doById(BACKUP_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *BackupClient) Delete(container *Backup) error {
|
||||
return c.rancherClient.doResourceDelete(BACKUP_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *BackupClient) ActionCreate(resource *Backup) (*Backup, error) {
|
||||
|
||||
resp := &Backup{}
|
||||
|
||||
err := c.rancherClient.doAction(BACKUP_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *BackupClient) ActionRemove(resource *Backup) (*Backup, error) {
|
||||
|
||||
resp := &Backup{}
|
||||
|
||||
err := c.rancherClient.doAction(BACKUP_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
115
vendor/github.com/rancher/go-rancher/client/generated_backup_target.go
generated
vendored
115
vendor/github.com/rancher/go-rancher/client/generated_backup_target.go
generated
vendored
@ -1,115 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
BACKUP_TARGET_TYPE = "backupTarget"
|
||||
)
|
||||
|
||||
type BackupTarget struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
NfsConfig *NfsConfig `json:"nfsConfig,omitempty" yaml:"nfs_config,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type BackupTargetCollection struct {
|
||||
Collection
|
||||
Data []BackupTarget `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type BackupTargetClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type BackupTargetOperations interface {
|
||||
List(opts *ListOpts) (*BackupTargetCollection, error)
|
||||
Create(opts *BackupTarget) (*BackupTarget, error)
|
||||
Update(existing *BackupTarget, updates interface{}) (*BackupTarget, error)
|
||||
ById(id string) (*BackupTarget, error)
|
||||
Delete(container *BackupTarget) error
|
||||
|
||||
ActionCreate(*BackupTarget) (*BackupTarget, error)
|
||||
|
||||
ActionRemove(*BackupTarget) (*BackupTarget, error)
|
||||
}
|
||||
|
||||
func newBackupTargetClient(rancherClient *RancherClient) *BackupTargetClient {
|
||||
return &BackupTargetClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *BackupTargetClient) Create(container *BackupTarget) (*BackupTarget, error) {
|
||||
resp := &BackupTarget{}
|
||||
err := c.rancherClient.doCreate(BACKUP_TARGET_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *BackupTargetClient) Update(existing *BackupTarget, updates interface{}) (*BackupTarget, error) {
|
||||
resp := &BackupTarget{}
|
||||
err := c.rancherClient.doUpdate(BACKUP_TARGET_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *BackupTargetClient) List(opts *ListOpts) (*BackupTargetCollection, error) {
|
||||
resp := &BackupTargetCollection{}
|
||||
err := c.rancherClient.doList(BACKUP_TARGET_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *BackupTargetClient) ById(id string) (*BackupTarget, error) {
|
||||
resp := &BackupTarget{}
|
||||
err := c.rancherClient.doById(BACKUP_TARGET_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *BackupTargetClient) Delete(container *BackupTarget) error {
|
||||
return c.rancherClient.doResourceDelete(BACKUP_TARGET_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *BackupTargetClient) ActionCreate(resource *BackupTarget) (*BackupTarget, error) {
|
||||
|
||||
resp := &BackupTarget{}
|
||||
|
||||
err := c.rancherClient.doAction(BACKUP_TARGET_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *BackupTargetClient) ActionRemove(resource *BackupTarget) (*BackupTarget, error) {
|
||||
|
||||
resp := &BackupTarget{}
|
||||
|
||||
err := c.rancherClient.doAction(BACKUP_TARGET_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
65
vendor/github.com/rancher/go-rancher/client/generated_base_machine_config.go
generated
vendored
65
vendor/github.com/rancher/go-rancher/client/generated_base_machine_config.go
generated
vendored
@ -1,65 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
BASE_MACHINE_CONFIG_TYPE = "baseMachineConfig"
|
||||
)
|
||||
|
||||
type BaseMachineConfig struct {
|
||||
Resource
|
||||
}
|
||||
|
||||
type BaseMachineConfigCollection struct {
|
||||
Collection
|
||||
Data []BaseMachineConfig `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type BaseMachineConfigClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type BaseMachineConfigOperations interface {
|
||||
List(opts *ListOpts) (*BaseMachineConfigCollection, error)
|
||||
Create(opts *BaseMachineConfig) (*BaseMachineConfig, error)
|
||||
Update(existing *BaseMachineConfig, updates interface{}) (*BaseMachineConfig, error)
|
||||
ById(id string) (*BaseMachineConfig, error)
|
||||
Delete(container *BaseMachineConfig) error
|
||||
}
|
||||
|
||||
func newBaseMachineConfigClient(rancherClient *RancherClient) *BaseMachineConfigClient {
|
||||
return &BaseMachineConfigClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *BaseMachineConfigClient) Create(container *BaseMachineConfig) (*BaseMachineConfig, error) {
|
||||
resp := &BaseMachineConfig{}
|
||||
err := c.rancherClient.doCreate(BASE_MACHINE_CONFIG_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *BaseMachineConfigClient) Update(existing *BaseMachineConfig, updates interface{}) (*BaseMachineConfig, error) {
|
||||
resp := &BaseMachineConfig{}
|
||||
err := c.rancherClient.doUpdate(BASE_MACHINE_CONFIG_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *BaseMachineConfigClient) List(opts *ListOpts) (*BaseMachineConfigCollection, error) {
|
||||
resp := &BaseMachineConfigCollection{}
|
||||
err := c.rancherClient.doList(BASE_MACHINE_CONFIG_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *BaseMachineConfigClient) ById(id string) (*BaseMachineConfig, error) {
|
||||
resp := &BaseMachineConfig{}
|
||||
err := c.rancherClient.doById(BASE_MACHINE_CONFIG_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *BaseMachineConfigClient) Delete(container *BaseMachineConfig) error {
|
||||
return c.rancherClient.doResourceDelete(BASE_MACHINE_CONFIG_TYPE, &container.Resource)
|
||||
}
|
75
vendor/github.com/rancher/go-rancher/client/generated_blkio_device_option.go
generated
vendored
75
vendor/github.com/rancher/go-rancher/client/generated_blkio_device_option.go
generated
vendored
@ -1,75 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
BLKIO_DEVICE_OPTION_TYPE = "blkioDeviceOption"
|
||||
)
|
||||
|
||||
type BlkioDeviceOption struct {
|
||||
Resource
|
||||
|
||||
ReadBps int64 `json:"readBps,omitempty" yaml:"read_bps,omitempty"`
|
||||
|
||||
ReadIops int64 `json:"readIops,omitempty" yaml:"read_iops,omitempty"`
|
||||
|
||||
Weight int64 `json:"weight,omitempty" yaml:"weight,omitempty"`
|
||||
|
||||
WriteBps int64 `json:"writeBps,omitempty" yaml:"write_bps,omitempty"`
|
||||
|
||||
WriteIops int64 `json:"writeIops,omitempty" yaml:"write_iops,omitempty"`
|
||||
}
|
||||
|
||||
type BlkioDeviceOptionCollection struct {
|
||||
Collection
|
||||
Data []BlkioDeviceOption `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type BlkioDeviceOptionClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type BlkioDeviceOptionOperations interface {
|
||||
List(opts *ListOpts) (*BlkioDeviceOptionCollection, error)
|
||||
Create(opts *BlkioDeviceOption) (*BlkioDeviceOption, error)
|
||||
Update(existing *BlkioDeviceOption, updates interface{}) (*BlkioDeviceOption, error)
|
||||
ById(id string) (*BlkioDeviceOption, error)
|
||||
Delete(container *BlkioDeviceOption) error
|
||||
}
|
||||
|
||||
func newBlkioDeviceOptionClient(rancherClient *RancherClient) *BlkioDeviceOptionClient {
|
||||
return &BlkioDeviceOptionClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *BlkioDeviceOptionClient) Create(container *BlkioDeviceOption) (*BlkioDeviceOption, error) {
|
||||
resp := &BlkioDeviceOption{}
|
||||
err := c.rancherClient.doCreate(BLKIO_DEVICE_OPTION_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *BlkioDeviceOptionClient) Update(existing *BlkioDeviceOption, updates interface{}) (*BlkioDeviceOption, error) {
|
||||
resp := &BlkioDeviceOption{}
|
||||
err := c.rancherClient.doUpdate(BLKIO_DEVICE_OPTION_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *BlkioDeviceOptionClient) List(opts *ListOpts) (*BlkioDeviceOptionCollection, error) {
|
||||
resp := &BlkioDeviceOptionCollection{}
|
||||
err := c.rancherClient.doList(BLKIO_DEVICE_OPTION_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *BlkioDeviceOptionClient) ById(id string) (*BlkioDeviceOption, error) {
|
||||
resp := &BlkioDeviceOption{}
|
||||
err := c.rancherClient.doById(BLKIO_DEVICE_OPTION_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *BlkioDeviceOptionClient) Delete(container *BlkioDeviceOption) error {
|
||||
return c.rancherClient.doResourceDelete(BLKIO_DEVICE_OPTION_TYPE, &container.Resource)
|
||||
}
|
150
vendor/github.com/rancher/go-rancher/client/generated_certificate.go
generated
vendored
150
vendor/github.com/rancher/go-rancher/client/generated_certificate.go
generated
vendored
@ -1,150 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
CERTIFICATE_TYPE = "certificate"
|
||||
)
|
||||
|
||||
type Certificate struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
Algorithm string `json:"algorithm,omitempty" yaml:"algorithm,omitempty"`
|
||||
|
||||
CN string `json:"cN,omitempty" yaml:"cn,omitempty"`
|
||||
|
||||
Cert string `json:"cert,omitempty" yaml:"cert,omitempty"`
|
||||
|
||||
CertChain string `json:"certChain,omitempty" yaml:"cert_chain,omitempty"`
|
||||
|
||||
CertFingerprint string `json:"certFingerprint,omitempty" yaml:"cert_fingerprint,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
ExpiresAt string `json:"expiresAt,omitempty" yaml:"expires_at,omitempty"`
|
||||
|
||||
IssuedAt string `json:"issuedAt,omitempty" yaml:"issued_at,omitempty"`
|
||||
|
||||
Issuer string `json:"issuer,omitempty" yaml:"issuer,omitempty"`
|
||||
|
||||
Key string `json:"key,omitempty" yaml:"key,omitempty"`
|
||||
|
||||
KeySize int64 `json:"keySize,omitempty" yaml:"key_size,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
SerialNumber string `json:"serialNumber,omitempty" yaml:"serial_number,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
SubjectAlternativeNames []string `json:"subjectAlternativeNames,omitempty" yaml:"subject_alternative_names,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
|
||||
Version string `json:"version,omitempty" yaml:"version,omitempty"`
|
||||
}
|
||||
|
||||
type CertificateCollection struct {
|
||||
Collection
|
||||
Data []Certificate `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type CertificateClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type CertificateOperations interface {
|
||||
List(opts *ListOpts) (*CertificateCollection, error)
|
||||
Create(opts *Certificate) (*Certificate, error)
|
||||
Update(existing *Certificate, updates interface{}) (*Certificate, error)
|
||||
ById(id string) (*Certificate, error)
|
||||
Delete(container *Certificate) error
|
||||
|
||||
ActionCreate(*Certificate) (*Certificate, error)
|
||||
|
||||
ActionRemove(*Certificate) (*Certificate, error)
|
||||
|
||||
ActionUpdate(*Certificate) (*Certificate, error)
|
||||
}
|
||||
|
||||
func newCertificateClient(rancherClient *RancherClient) *CertificateClient {
|
||||
return &CertificateClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *CertificateClient) Create(container *Certificate) (*Certificate, error) {
|
||||
resp := &Certificate{}
|
||||
err := c.rancherClient.doCreate(CERTIFICATE_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *CertificateClient) Update(existing *Certificate, updates interface{}) (*Certificate, error) {
|
||||
resp := &Certificate{}
|
||||
err := c.rancherClient.doUpdate(CERTIFICATE_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *CertificateClient) List(opts *ListOpts) (*CertificateCollection, error) {
|
||||
resp := &CertificateCollection{}
|
||||
err := c.rancherClient.doList(CERTIFICATE_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *CertificateClient) ById(id string) (*Certificate, error) {
|
||||
resp := &Certificate{}
|
||||
err := c.rancherClient.doById(CERTIFICATE_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *CertificateClient) Delete(container *Certificate) error {
|
||||
return c.rancherClient.doResourceDelete(CERTIFICATE_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *CertificateClient) ActionCreate(resource *Certificate) (*Certificate, error) {
|
||||
|
||||
resp := &Certificate{}
|
||||
|
||||
err := c.rancherClient.doAction(CERTIFICATE_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *CertificateClient) ActionRemove(resource *Certificate) (*Certificate, error) {
|
||||
|
||||
resp := &Certificate{}
|
||||
|
||||
err := c.rancherClient.doAction(CERTIFICATE_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *CertificateClient) ActionUpdate(resource *Certificate) (*Certificate, error) {
|
||||
|
||||
resp := &Certificate{}
|
||||
|
||||
err := c.rancherClient.doAction(CERTIFICATE_TYPE, "update", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
69
vendor/github.com/rancher/go-rancher/client/generated_change_secret_input.go
generated
vendored
69
vendor/github.com/rancher/go-rancher/client/generated_change_secret_input.go
generated
vendored
@ -1,69 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
CHANGE_SECRET_INPUT_TYPE = "changeSecretInput"
|
||||
)
|
||||
|
||||
type ChangeSecretInput struct {
|
||||
Resource
|
||||
|
||||
NewSecret string `json:"newSecret,omitempty" yaml:"new_secret,omitempty"`
|
||||
|
||||
OldSecret string `json:"oldSecret,omitempty" yaml:"old_secret,omitempty"`
|
||||
}
|
||||
|
||||
type ChangeSecretInputCollection struct {
|
||||
Collection
|
||||
Data []ChangeSecretInput `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ChangeSecretInputClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ChangeSecretInputOperations interface {
|
||||
List(opts *ListOpts) (*ChangeSecretInputCollection, error)
|
||||
Create(opts *ChangeSecretInput) (*ChangeSecretInput, error)
|
||||
Update(existing *ChangeSecretInput, updates interface{}) (*ChangeSecretInput, error)
|
||||
ById(id string) (*ChangeSecretInput, error)
|
||||
Delete(container *ChangeSecretInput) error
|
||||
}
|
||||
|
||||
func newChangeSecretInputClient(rancherClient *RancherClient) *ChangeSecretInputClient {
|
||||
return &ChangeSecretInputClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ChangeSecretInputClient) Create(container *ChangeSecretInput) (*ChangeSecretInput, error) {
|
||||
resp := &ChangeSecretInput{}
|
||||
err := c.rancherClient.doCreate(CHANGE_SECRET_INPUT_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ChangeSecretInputClient) Update(existing *ChangeSecretInput, updates interface{}) (*ChangeSecretInput, error) {
|
||||
resp := &ChangeSecretInput{}
|
||||
err := c.rancherClient.doUpdate(CHANGE_SECRET_INPUT_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ChangeSecretInputClient) List(opts *ListOpts) (*ChangeSecretInputCollection, error) {
|
||||
resp := &ChangeSecretInputCollection{}
|
||||
err := c.rancherClient.doList(CHANGE_SECRET_INPUT_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ChangeSecretInputClient) ById(id string) (*ChangeSecretInput, error) {
|
||||
resp := &ChangeSecretInput{}
|
||||
err := c.rancherClient.doById(CHANGE_SECRET_INPUT_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ChangeSecretInputClient) Delete(container *ChangeSecretInput) error {
|
||||
return c.rancherClient.doResourceDelete(CHANGE_SECRET_INPUT_TYPE, &container.Resource)
|
||||
}
|
313
vendor/github.com/rancher/go-rancher/client/generated_client.go
generated
vendored
313
vendor/github.com/rancher/go-rancher/client/generated_client.go
generated
vendored
@ -1,313 +0,0 @@
|
||||
package client
|
||||
|
||||
type RancherClient struct {
|
||||
RancherBaseClient
|
||||
|
||||
Account AccountOperations
|
||||
ActiveSetting ActiveSettingOperations
|
||||
AddOutputsInput AddOutputsInputOperations
|
||||
AddRemoveLoadBalancerServiceLinkInput AddRemoveLoadBalancerServiceLinkInputOperations
|
||||
AddRemoveServiceLinkInput AddRemoveServiceLinkInputOperations
|
||||
Agent AgentOperations
|
||||
Amazonec2Config Amazonec2ConfigOperations
|
||||
ApiKey ApiKeyOperations
|
||||
AuditLog AuditLogOperations
|
||||
AzureConfig AzureConfigOperations
|
||||
Azureadconfig AzureadconfigOperations
|
||||
Backup BackupOperations
|
||||
BackupTarget BackupTargetOperations
|
||||
BaseMachineConfig BaseMachineConfigOperations
|
||||
BlkioDeviceOption BlkioDeviceOptionOperations
|
||||
Certificate CertificateOperations
|
||||
ChangeSecretInput ChangeSecretInputOperations
|
||||
ComposeConfig ComposeConfigOperations
|
||||
ComposeConfigInput ComposeConfigInputOperations
|
||||
ComposeProject ComposeProjectOperations
|
||||
ComposeService ComposeServiceOperations
|
||||
ConfigItem ConfigItemOperations
|
||||
ConfigItemStatus ConfigItemStatusOperations
|
||||
Container ContainerOperations
|
||||
ContainerEvent ContainerEventOperations
|
||||
ContainerExec ContainerExecOperations
|
||||
ContainerLogs ContainerLogsOperations
|
||||
ContainerProxy ContainerProxyOperations
|
||||
Credential CredentialOperations
|
||||
Databasechangelog DatabasechangelogOperations
|
||||
Databasechangeloglock DatabasechangeloglockOperations
|
||||
DigitaloceanConfig DigitaloceanConfigOperations
|
||||
DnsService DnsServiceOperations
|
||||
DockerBuild DockerBuildOperations
|
||||
DynamicSchema DynamicSchemaOperations
|
||||
Environment EnvironmentOperations
|
||||
EnvironmentUpgrade EnvironmentUpgradeOperations
|
||||
ExtensionImplementation ExtensionImplementationOperations
|
||||
ExtensionPoint ExtensionPointOperations
|
||||
ExternalDnsEvent ExternalDnsEventOperations
|
||||
ExternalEvent ExternalEventOperations
|
||||
ExternalHandler ExternalHandlerOperations
|
||||
ExternalHandlerExternalHandlerProcessMap ExternalHandlerExternalHandlerProcessMapOperations
|
||||
ExternalHandlerProcess ExternalHandlerProcessOperations
|
||||
ExternalHandlerProcessConfig ExternalHandlerProcessConfigOperations
|
||||
ExternalHostEvent ExternalHostEventOperations
|
||||
ExternalService ExternalServiceOperations
|
||||
ExternalServiceEvent ExternalServiceEventOperations
|
||||
ExternalStoragePoolEvent ExternalStoragePoolEventOperations
|
||||
ExternalVolumeEvent ExternalVolumeEventOperations
|
||||
FieldDocumentation FieldDocumentationOperations
|
||||
Githubconfig GithubconfigOperations
|
||||
HaConfig HaConfigOperations
|
||||
HaConfigInput HaConfigInputOperations
|
||||
HaproxyConfig HaproxyConfigOperations
|
||||
HealthcheckInstanceHostMap HealthcheckInstanceHostMapOperations
|
||||
Host HostOperations
|
||||
HostAccess HostAccessOperations
|
||||
HostApiProxyToken HostApiProxyTokenOperations
|
||||
Identity IdentityOperations
|
||||
Image ImageOperations
|
||||
InServiceUpgradeStrategy InServiceUpgradeStrategyOperations
|
||||
Instance InstanceOperations
|
||||
InstanceConsole InstanceConsoleOperations
|
||||
InstanceConsoleInput InstanceConsoleInputOperations
|
||||
InstanceHealthCheck InstanceHealthCheckOperations
|
||||
InstanceLink InstanceLinkOperations
|
||||
InstanceStop InstanceStopOperations
|
||||
IpAddress IpAddressOperations
|
||||
IpAddressAssociateInput IpAddressAssociateInputOperations
|
||||
KubernetesService KubernetesServiceOperations
|
||||
KubernetesStack KubernetesStackOperations
|
||||
KubernetesStackUpgrade KubernetesStackUpgradeOperations
|
||||
Label LabelOperations
|
||||
LaunchConfig LaunchConfigOperations
|
||||
Ldapconfig LdapconfigOperations
|
||||
LoadBalancerAppCookieStickinessPolicy LoadBalancerAppCookieStickinessPolicyOperations
|
||||
LoadBalancerConfig LoadBalancerConfigOperations
|
||||
LoadBalancerCookieStickinessPolicy LoadBalancerCookieStickinessPolicyOperations
|
||||
LoadBalancerService LoadBalancerServiceOperations
|
||||
LoadBalancerServiceLink LoadBalancerServiceLinkOperations
|
||||
LocalAuthConfig LocalAuthConfigOperations
|
||||
LogConfig LogConfigOperations
|
||||
Machine MachineOperations
|
||||
MachineDriver MachineDriverOperations
|
||||
Mount MountOperations
|
||||
Network NetworkOperations
|
||||
NfsConfig NfsConfigOperations
|
||||
Openldapconfig OpenldapconfigOperations
|
||||
PacketConfig PacketConfigOperations
|
||||
Password PasswordOperations
|
||||
PhysicalHost PhysicalHostOperations
|
||||
Port PortOperations
|
||||
ProcessDefinition ProcessDefinitionOperations
|
||||
ProcessExecution ProcessExecutionOperations
|
||||
ProcessInstance ProcessInstanceOperations
|
||||
Project ProjectOperations
|
||||
ProjectMember ProjectMemberOperations
|
||||
PublicEndpoint PublicEndpointOperations
|
||||
Publish PublishOperations
|
||||
PullTask PullTaskOperations
|
||||
RecreateOnQuorumStrategyConfig RecreateOnQuorumStrategyConfigOperations
|
||||
Register RegisterOperations
|
||||
RegistrationToken RegistrationTokenOperations
|
||||
Registry RegistryOperations
|
||||
RegistryCredential RegistryCredentialOperations
|
||||
ResourceDefinition ResourceDefinitionOperations
|
||||
RestartPolicy RestartPolicyOperations
|
||||
RestoreFromBackupInput RestoreFromBackupInputOperations
|
||||
RevertToSnapshotInput RevertToSnapshotInputOperations
|
||||
RollingRestartStrategy RollingRestartStrategyOperations
|
||||
ScalePolicy ScalePolicyOperations
|
||||
SecondaryLaunchConfig SecondaryLaunchConfigOperations
|
||||
Service ServiceOperations
|
||||
ServiceConsumeMap ServiceConsumeMapOperations
|
||||
ServiceEvent ServiceEventOperations
|
||||
ServiceExposeMap ServiceExposeMapOperations
|
||||
ServiceLink ServiceLinkOperations
|
||||
ServiceProxy ServiceProxyOperations
|
||||
ServiceRestart ServiceRestartOperations
|
||||
ServiceUpgrade ServiceUpgradeOperations
|
||||
ServiceUpgradeStrategy ServiceUpgradeStrategyOperations
|
||||
ServicesPortRange ServicesPortRangeOperations
|
||||
SetLabelsInput SetLabelsInputOperations
|
||||
SetLoadBalancerServiceLinksInput SetLoadBalancerServiceLinksInputOperations
|
||||
SetProjectMembersInput SetProjectMembersInputOperations
|
||||
SetServiceLinksInput SetServiceLinksInputOperations
|
||||
Setting SettingOperations
|
||||
Snapshot SnapshotOperations
|
||||
SnapshotBackupInput SnapshotBackupInputOperations
|
||||
StateTransition StateTransitionOperations
|
||||
StatsAccess StatsAccessOperations
|
||||
StoragePool StoragePoolOperations
|
||||
Subscribe SubscribeOperations
|
||||
Task TaskOperations
|
||||
TaskInstance TaskInstanceOperations
|
||||
ToServiceUpgradeStrategy ToServiceUpgradeStrategyOperations
|
||||
TypeDocumentation TypeDocumentationOperations
|
||||
VirtualMachine VirtualMachineOperations
|
||||
VirtualMachineDisk VirtualMachineDiskOperations
|
||||
Volume VolumeOperations
|
||||
VolumeSnapshotInput VolumeSnapshotInputOperations
|
||||
}
|
||||
|
||||
func constructClient(rancherBaseClient *RancherBaseClientImpl) *RancherClient {
|
||||
client := &RancherClient{
|
||||
RancherBaseClient: rancherBaseClient,
|
||||
}
|
||||
|
||||
client.Account = newAccountClient(client)
|
||||
client.ActiveSetting = newActiveSettingClient(client)
|
||||
client.AddOutputsInput = newAddOutputsInputClient(client)
|
||||
client.AddRemoveLoadBalancerServiceLinkInput = newAddRemoveLoadBalancerServiceLinkInputClient(client)
|
||||
client.AddRemoveServiceLinkInput = newAddRemoveServiceLinkInputClient(client)
|
||||
client.Agent = newAgentClient(client)
|
||||
client.Amazonec2Config = newAmazonec2ConfigClient(client)
|
||||
client.ApiKey = newApiKeyClient(client)
|
||||
client.AuditLog = newAuditLogClient(client)
|
||||
client.AzureConfig = newAzureConfigClient(client)
|
||||
client.Azureadconfig = newAzureadconfigClient(client)
|
||||
client.Backup = newBackupClient(client)
|
||||
client.BackupTarget = newBackupTargetClient(client)
|
||||
client.BaseMachineConfig = newBaseMachineConfigClient(client)
|
||||
client.BlkioDeviceOption = newBlkioDeviceOptionClient(client)
|
||||
client.Certificate = newCertificateClient(client)
|
||||
client.ChangeSecretInput = newChangeSecretInputClient(client)
|
||||
client.ComposeConfig = newComposeConfigClient(client)
|
||||
client.ComposeConfigInput = newComposeConfigInputClient(client)
|
||||
client.ComposeProject = newComposeProjectClient(client)
|
||||
client.ComposeService = newComposeServiceClient(client)
|
||||
client.ConfigItem = newConfigItemClient(client)
|
||||
client.ConfigItemStatus = newConfigItemStatusClient(client)
|
||||
client.Container = newContainerClient(client)
|
||||
client.ContainerEvent = newContainerEventClient(client)
|
||||
client.ContainerExec = newContainerExecClient(client)
|
||||
client.ContainerLogs = newContainerLogsClient(client)
|
||||
client.ContainerProxy = newContainerProxyClient(client)
|
||||
client.Credential = newCredentialClient(client)
|
||||
client.Databasechangelog = newDatabasechangelogClient(client)
|
||||
client.Databasechangeloglock = newDatabasechangeloglockClient(client)
|
||||
client.DigitaloceanConfig = newDigitaloceanConfigClient(client)
|
||||
client.DnsService = newDnsServiceClient(client)
|
||||
client.DockerBuild = newDockerBuildClient(client)
|
||||
client.DynamicSchema = newDynamicSchemaClient(client)
|
||||
client.Environment = newEnvironmentClient(client)
|
||||
client.EnvironmentUpgrade = newEnvironmentUpgradeClient(client)
|
||||
client.ExtensionImplementation = newExtensionImplementationClient(client)
|
||||
client.ExtensionPoint = newExtensionPointClient(client)
|
||||
client.ExternalDnsEvent = newExternalDnsEventClient(client)
|
||||
client.ExternalEvent = newExternalEventClient(client)
|
||||
client.ExternalHandler = newExternalHandlerClient(client)
|
||||
client.ExternalHandlerExternalHandlerProcessMap = newExternalHandlerExternalHandlerProcessMapClient(client)
|
||||
client.ExternalHandlerProcess = newExternalHandlerProcessClient(client)
|
||||
client.ExternalHandlerProcessConfig = newExternalHandlerProcessConfigClient(client)
|
||||
client.ExternalHostEvent = newExternalHostEventClient(client)
|
||||
client.ExternalService = newExternalServiceClient(client)
|
||||
client.ExternalServiceEvent = newExternalServiceEventClient(client)
|
||||
client.ExternalStoragePoolEvent = newExternalStoragePoolEventClient(client)
|
||||
client.ExternalVolumeEvent = newExternalVolumeEventClient(client)
|
||||
client.FieldDocumentation = newFieldDocumentationClient(client)
|
||||
client.Githubconfig = newGithubconfigClient(client)
|
||||
client.HaConfig = newHaConfigClient(client)
|
||||
client.HaConfigInput = newHaConfigInputClient(client)
|
||||
client.HaproxyConfig = newHaproxyConfigClient(client)
|
||||
client.HealthcheckInstanceHostMap = newHealthcheckInstanceHostMapClient(client)
|
||||
client.Host = newHostClient(client)
|
||||
client.HostAccess = newHostAccessClient(client)
|
||||
client.HostApiProxyToken = newHostApiProxyTokenClient(client)
|
||||
client.Identity = newIdentityClient(client)
|
||||
client.Image = newImageClient(client)
|
||||
client.InServiceUpgradeStrategy = newInServiceUpgradeStrategyClient(client)
|
||||
client.Instance = newInstanceClient(client)
|
||||
client.InstanceConsole = newInstanceConsoleClient(client)
|
||||
client.InstanceConsoleInput = newInstanceConsoleInputClient(client)
|
||||
client.InstanceHealthCheck = newInstanceHealthCheckClient(client)
|
||||
client.InstanceLink = newInstanceLinkClient(client)
|
||||
client.InstanceStop = newInstanceStopClient(client)
|
||||
client.IpAddress = newIpAddressClient(client)
|
||||
client.IpAddressAssociateInput = newIpAddressAssociateInputClient(client)
|
||||
client.KubernetesService = newKubernetesServiceClient(client)
|
||||
client.KubernetesStack = newKubernetesStackClient(client)
|
||||
client.KubernetesStackUpgrade = newKubernetesStackUpgradeClient(client)
|
||||
client.Label = newLabelClient(client)
|
||||
client.LaunchConfig = newLaunchConfigClient(client)
|
||||
client.Ldapconfig = newLdapconfigClient(client)
|
||||
client.LoadBalancerAppCookieStickinessPolicy = newLoadBalancerAppCookieStickinessPolicyClient(client)
|
||||
client.LoadBalancerConfig = newLoadBalancerConfigClient(client)
|
||||
client.LoadBalancerCookieStickinessPolicy = newLoadBalancerCookieStickinessPolicyClient(client)
|
||||
client.LoadBalancerService = newLoadBalancerServiceClient(client)
|
||||
client.LoadBalancerServiceLink = newLoadBalancerServiceLinkClient(client)
|
||||
client.LocalAuthConfig = newLocalAuthConfigClient(client)
|
||||
client.LogConfig = newLogConfigClient(client)
|
||||
client.Machine = newMachineClient(client)
|
||||
client.MachineDriver = newMachineDriverClient(client)
|
||||
client.Mount = newMountClient(client)
|
||||
client.Network = newNetworkClient(client)
|
||||
client.NfsConfig = newNfsConfigClient(client)
|
||||
client.Openldapconfig = newOpenldapconfigClient(client)
|
||||
client.PacketConfig = newPacketConfigClient(client)
|
||||
client.Password = newPasswordClient(client)
|
||||
client.PhysicalHost = newPhysicalHostClient(client)
|
||||
client.Port = newPortClient(client)
|
||||
client.ProcessDefinition = newProcessDefinitionClient(client)
|
||||
client.ProcessExecution = newProcessExecutionClient(client)
|
||||
client.ProcessInstance = newProcessInstanceClient(client)
|
||||
client.Project = newProjectClient(client)
|
||||
client.ProjectMember = newProjectMemberClient(client)
|
||||
client.PublicEndpoint = newPublicEndpointClient(client)
|
||||
client.Publish = newPublishClient(client)
|
||||
client.PullTask = newPullTaskClient(client)
|
||||
client.RecreateOnQuorumStrategyConfig = newRecreateOnQuorumStrategyConfigClient(client)
|
||||
client.Register = newRegisterClient(client)
|
||||
client.RegistrationToken = newRegistrationTokenClient(client)
|
||||
client.Registry = newRegistryClient(client)
|
||||
client.RegistryCredential = newRegistryCredentialClient(client)
|
||||
client.ResourceDefinition = newResourceDefinitionClient(client)
|
||||
client.RestartPolicy = newRestartPolicyClient(client)
|
||||
client.RestoreFromBackupInput = newRestoreFromBackupInputClient(client)
|
||||
client.RevertToSnapshotInput = newRevertToSnapshotInputClient(client)
|
||||
client.RollingRestartStrategy = newRollingRestartStrategyClient(client)
|
||||
client.ScalePolicy = newScalePolicyClient(client)
|
||||
client.SecondaryLaunchConfig = newSecondaryLaunchConfigClient(client)
|
||||
client.Service = newServiceClient(client)
|
||||
client.ServiceConsumeMap = newServiceConsumeMapClient(client)
|
||||
client.ServiceEvent = newServiceEventClient(client)
|
||||
client.ServiceExposeMap = newServiceExposeMapClient(client)
|
||||
client.ServiceLink = newServiceLinkClient(client)
|
||||
client.ServiceProxy = newServiceProxyClient(client)
|
||||
client.ServiceRestart = newServiceRestartClient(client)
|
||||
client.ServiceUpgrade = newServiceUpgradeClient(client)
|
||||
client.ServiceUpgradeStrategy = newServiceUpgradeStrategyClient(client)
|
||||
client.ServicesPortRange = newServicesPortRangeClient(client)
|
||||
client.SetLabelsInput = newSetLabelsInputClient(client)
|
||||
client.SetLoadBalancerServiceLinksInput = newSetLoadBalancerServiceLinksInputClient(client)
|
||||
client.SetProjectMembersInput = newSetProjectMembersInputClient(client)
|
||||
client.SetServiceLinksInput = newSetServiceLinksInputClient(client)
|
||||
client.Setting = newSettingClient(client)
|
||||
client.Snapshot = newSnapshotClient(client)
|
||||
client.SnapshotBackupInput = newSnapshotBackupInputClient(client)
|
||||
client.StateTransition = newStateTransitionClient(client)
|
||||
client.StatsAccess = newStatsAccessClient(client)
|
||||
client.StoragePool = newStoragePoolClient(client)
|
||||
client.Subscribe = newSubscribeClient(client)
|
||||
client.Task = newTaskClient(client)
|
||||
client.TaskInstance = newTaskInstanceClient(client)
|
||||
client.ToServiceUpgradeStrategy = newToServiceUpgradeStrategyClient(client)
|
||||
client.TypeDocumentation = newTypeDocumentationClient(client)
|
||||
client.VirtualMachine = newVirtualMachineClient(client)
|
||||
client.VirtualMachineDisk = newVirtualMachineDiskClient(client)
|
||||
client.Volume = newVolumeClient(client)
|
||||
client.VolumeSnapshotInput = newVolumeSnapshotInputClient(client)
|
||||
|
||||
return client
|
||||
}
|
||||
|
||||
func NewRancherClient(opts *ClientOpts) (*RancherClient, error) {
|
||||
rancherBaseClient := &RancherBaseClientImpl{
|
||||
Types: map[string]Schema{},
|
||||
}
|
||||
client := constructClient(rancherBaseClient)
|
||||
|
||||
err := setupRancherBaseClient(rancherBaseClient, opts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return client, nil
|
||||
}
|
69
vendor/github.com/rancher/go-rancher/client/generated_compose_config.go
generated
vendored
69
vendor/github.com/rancher/go-rancher/client/generated_compose_config.go
generated
vendored
@ -1,69 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
COMPOSE_CONFIG_TYPE = "composeConfig"
|
||||
)
|
||||
|
||||
type ComposeConfig struct {
|
||||
Resource
|
||||
|
||||
DockerComposeConfig string `json:"dockerComposeConfig,omitempty" yaml:"docker_compose_config,omitempty"`
|
||||
|
||||
RancherComposeConfig string `json:"rancherComposeConfig,omitempty" yaml:"rancher_compose_config,omitempty"`
|
||||
}
|
||||
|
||||
type ComposeConfigCollection struct {
|
||||
Collection
|
||||
Data []ComposeConfig `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ComposeConfigClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ComposeConfigOperations interface {
|
||||
List(opts *ListOpts) (*ComposeConfigCollection, error)
|
||||
Create(opts *ComposeConfig) (*ComposeConfig, error)
|
||||
Update(existing *ComposeConfig, updates interface{}) (*ComposeConfig, error)
|
||||
ById(id string) (*ComposeConfig, error)
|
||||
Delete(container *ComposeConfig) error
|
||||
}
|
||||
|
||||
func newComposeConfigClient(rancherClient *RancherClient) *ComposeConfigClient {
|
||||
return &ComposeConfigClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ComposeConfigClient) Create(container *ComposeConfig) (*ComposeConfig, error) {
|
||||
resp := &ComposeConfig{}
|
||||
err := c.rancherClient.doCreate(COMPOSE_CONFIG_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeConfigClient) Update(existing *ComposeConfig, updates interface{}) (*ComposeConfig, error) {
|
||||
resp := &ComposeConfig{}
|
||||
err := c.rancherClient.doUpdate(COMPOSE_CONFIG_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeConfigClient) List(opts *ListOpts) (*ComposeConfigCollection, error) {
|
||||
resp := &ComposeConfigCollection{}
|
||||
err := c.rancherClient.doList(COMPOSE_CONFIG_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeConfigClient) ById(id string) (*ComposeConfig, error) {
|
||||
resp := &ComposeConfig{}
|
||||
err := c.rancherClient.doById(COMPOSE_CONFIG_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeConfigClient) Delete(container *ComposeConfig) error {
|
||||
return c.rancherClient.doResourceDelete(COMPOSE_CONFIG_TYPE, &container.Resource)
|
||||
}
|
67
vendor/github.com/rancher/go-rancher/client/generated_compose_config_input.go
generated
vendored
67
vendor/github.com/rancher/go-rancher/client/generated_compose_config_input.go
generated
vendored
@ -1,67 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
COMPOSE_CONFIG_INPUT_TYPE = "composeConfigInput"
|
||||
)
|
||||
|
||||
type ComposeConfigInput struct {
|
||||
Resource
|
||||
|
||||
ServiceIds []string `json:"serviceIds,omitempty" yaml:"service_ids,omitempty"`
|
||||
}
|
||||
|
||||
type ComposeConfigInputCollection struct {
|
||||
Collection
|
||||
Data []ComposeConfigInput `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ComposeConfigInputClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ComposeConfigInputOperations interface {
|
||||
List(opts *ListOpts) (*ComposeConfigInputCollection, error)
|
||||
Create(opts *ComposeConfigInput) (*ComposeConfigInput, error)
|
||||
Update(existing *ComposeConfigInput, updates interface{}) (*ComposeConfigInput, error)
|
||||
ById(id string) (*ComposeConfigInput, error)
|
||||
Delete(container *ComposeConfigInput) error
|
||||
}
|
||||
|
||||
func newComposeConfigInputClient(rancherClient *RancherClient) *ComposeConfigInputClient {
|
||||
return &ComposeConfigInputClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ComposeConfigInputClient) Create(container *ComposeConfigInput) (*ComposeConfigInput, error) {
|
||||
resp := &ComposeConfigInput{}
|
||||
err := c.rancherClient.doCreate(COMPOSE_CONFIG_INPUT_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeConfigInputClient) Update(existing *ComposeConfigInput, updates interface{}) (*ComposeConfigInput, error) {
|
||||
resp := &ComposeConfigInput{}
|
||||
err := c.rancherClient.doUpdate(COMPOSE_CONFIG_INPUT_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeConfigInputClient) List(opts *ListOpts) (*ComposeConfigInputCollection, error) {
|
||||
resp := &ComposeConfigInputCollection{}
|
||||
err := c.rancherClient.doList(COMPOSE_CONFIG_INPUT_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeConfigInputClient) ById(id string) (*ComposeConfigInput, error) {
|
||||
resp := &ComposeConfigInput{}
|
||||
err := c.rancherClient.doById(COMPOSE_CONFIG_INPUT_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeConfigInputClient) Delete(container *ComposeConfigInput) error {
|
||||
return c.rancherClient.doResourceDelete(COMPOSE_CONFIG_INPUT_TYPE, &container.Resource)
|
||||
}
|
180
vendor/github.com/rancher/go-rancher/client/generated_compose_project.go
generated
vendored
180
vendor/github.com/rancher/go-rancher/client/generated_compose_project.go
generated
vendored
@ -1,180 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
COMPOSE_PROJECT_TYPE = "composeProject"
|
||||
)
|
||||
|
||||
type ComposeProject struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
Environment map[string]interface{} `json:"environment,omitempty" yaml:"environment,omitempty"`
|
||||
|
||||
ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
|
||||
|
||||
HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
PreviousEnvironment map[string]interface{} `json:"previousEnvironment,omitempty" yaml:"previous_environment,omitempty"`
|
||||
|
||||
PreviousExternalId string `json:"previousExternalId,omitempty" yaml:"previous_external_id,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Templates map[string]interface{} `json:"templates,omitempty" yaml:"templates,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type ComposeProjectCollection struct {
|
||||
Collection
|
||||
Data []ComposeProject `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ComposeProjectClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ComposeProjectOperations interface {
|
||||
List(opts *ListOpts) (*ComposeProjectCollection, error)
|
||||
Create(opts *ComposeProject) (*ComposeProject, error)
|
||||
Update(existing *ComposeProject, updates interface{}) (*ComposeProject, error)
|
||||
ById(id string) (*ComposeProject, error)
|
||||
Delete(container *ComposeProject) error
|
||||
|
||||
ActionCancelrollback(*ComposeProject) (*Environment, error)
|
||||
|
||||
ActionCancelupgrade(*ComposeProject) (*Environment, error)
|
||||
|
||||
ActionCreate(*ComposeProject) (*Environment, error)
|
||||
|
||||
ActionError(*ComposeProject) (*Environment, error)
|
||||
|
||||
ActionFinishupgrade(*ComposeProject) (*Environment, error)
|
||||
|
||||
ActionRemove(*ComposeProject) (*Environment, error)
|
||||
|
||||
ActionRollback(*ComposeProject) (*Environment, error)
|
||||
}
|
||||
|
||||
func newComposeProjectClient(rancherClient *RancherClient) *ComposeProjectClient {
|
||||
return &ComposeProjectClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ComposeProjectClient) Create(container *ComposeProject) (*ComposeProject, error) {
|
||||
resp := &ComposeProject{}
|
||||
err := c.rancherClient.doCreate(COMPOSE_PROJECT_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeProjectClient) Update(existing *ComposeProject, updates interface{}) (*ComposeProject, error) {
|
||||
resp := &ComposeProject{}
|
||||
err := c.rancherClient.doUpdate(COMPOSE_PROJECT_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeProjectClient) List(opts *ListOpts) (*ComposeProjectCollection, error) {
|
||||
resp := &ComposeProjectCollection{}
|
||||
err := c.rancherClient.doList(COMPOSE_PROJECT_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeProjectClient) ById(id string) (*ComposeProject, error) {
|
||||
resp := &ComposeProject{}
|
||||
err := c.rancherClient.doById(COMPOSE_PROJECT_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeProjectClient) Delete(container *ComposeProject) error {
|
||||
return c.rancherClient.doResourceDelete(COMPOSE_PROJECT_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *ComposeProjectClient) ActionCancelrollback(resource *ComposeProject) (*Environment, error) {
|
||||
|
||||
resp := &Environment{}
|
||||
|
||||
err := c.rancherClient.doAction(COMPOSE_PROJECT_TYPE, "cancelrollback", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeProjectClient) ActionCancelupgrade(resource *ComposeProject) (*Environment, error) {
|
||||
|
||||
resp := &Environment{}
|
||||
|
||||
err := c.rancherClient.doAction(COMPOSE_PROJECT_TYPE, "cancelupgrade", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeProjectClient) ActionCreate(resource *ComposeProject) (*Environment, error) {
|
||||
|
||||
resp := &Environment{}
|
||||
|
||||
err := c.rancherClient.doAction(COMPOSE_PROJECT_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeProjectClient) ActionError(resource *ComposeProject) (*Environment, error) {
|
||||
|
||||
resp := &Environment{}
|
||||
|
||||
err := c.rancherClient.doAction(COMPOSE_PROJECT_TYPE, "error", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeProjectClient) ActionFinishupgrade(resource *ComposeProject) (*Environment, error) {
|
||||
|
||||
resp := &Environment{}
|
||||
|
||||
err := c.rancherClient.doAction(COMPOSE_PROJECT_TYPE, "finishupgrade", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeProjectClient) ActionRemove(resource *ComposeProject) (*Environment, error) {
|
||||
|
||||
resp := &Environment{}
|
||||
|
||||
err := c.rancherClient.doAction(COMPOSE_PROJECT_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeProjectClient) ActionRollback(resource *ComposeProject) (*Environment, error) {
|
||||
|
||||
resp := &Environment{}
|
||||
|
||||
err := c.rancherClient.doAction(COMPOSE_PROJECT_TYPE, "rollback", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
194
vendor/github.com/rancher/go-rancher/client/generated_compose_service.go
generated
vendored
194
vendor/github.com/rancher/go-rancher/client/generated_compose_service.go
generated
vendored
@ -1,194 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
COMPOSE_SERVICE_TYPE = "composeService"
|
||||
)
|
||||
|
||||
type ComposeService struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
CurrentScale int64 `json:"currentScale,omitempty" yaml:"current_scale,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
EnvironmentId string `json:"environmentId,omitempty" yaml:"environment_id,omitempty"`
|
||||
|
||||
ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
|
||||
|
||||
Fqdn string `json:"fqdn,omitempty" yaml:"fqdn,omitempty"`
|
||||
|
||||
HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
LaunchConfig *LaunchConfig `json:"launchConfig,omitempty" yaml:"launch_config,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
PublicEndpoints []interface{} `json:"publicEndpoints,omitempty" yaml:"public_endpoints,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
Scale int64 `json:"scale,omitempty" yaml:"scale,omitempty"`
|
||||
|
||||
ScalePolicy *ScalePolicy `json:"scalePolicy,omitempty" yaml:"scale_policy,omitempty"`
|
||||
|
||||
SelectorContainer string `json:"selectorContainer,omitempty" yaml:"selector_container,omitempty"`
|
||||
|
||||
SelectorLink string `json:"selectorLink,omitempty" yaml:"selector_link,omitempty"`
|
||||
|
||||
StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
|
||||
Vip string `json:"vip,omitempty" yaml:"vip,omitempty"`
|
||||
}
|
||||
|
||||
type ComposeServiceCollection struct {
|
||||
Collection
|
||||
Data []ComposeService `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ComposeServiceClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ComposeServiceOperations interface {
|
||||
List(opts *ListOpts) (*ComposeServiceCollection, error)
|
||||
Create(opts *ComposeService) (*ComposeService, error)
|
||||
Update(existing *ComposeService, updates interface{}) (*ComposeService, error)
|
||||
ById(id string) (*ComposeService, error)
|
||||
Delete(container *ComposeService) error
|
||||
|
||||
ActionActivate(*ComposeService) (*Service, error)
|
||||
|
||||
ActionCancelrollback(*ComposeService) (*Service, error)
|
||||
|
||||
ActionCancelupgrade(*ComposeService) (*Service, error)
|
||||
|
||||
ActionCreate(*ComposeService) (*Service, error)
|
||||
|
||||
ActionFinishupgrade(*ComposeService) (*Service, error)
|
||||
|
||||
ActionRemove(*ComposeService) (*Service, error)
|
||||
|
||||
ActionRollback(*ComposeService) (*Service, error)
|
||||
}
|
||||
|
||||
func newComposeServiceClient(rancherClient *RancherClient) *ComposeServiceClient {
|
||||
return &ComposeServiceClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ComposeServiceClient) Create(container *ComposeService) (*ComposeService, error) {
|
||||
resp := &ComposeService{}
|
||||
err := c.rancherClient.doCreate(COMPOSE_SERVICE_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeServiceClient) Update(existing *ComposeService, updates interface{}) (*ComposeService, error) {
|
||||
resp := &ComposeService{}
|
||||
err := c.rancherClient.doUpdate(COMPOSE_SERVICE_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeServiceClient) List(opts *ListOpts) (*ComposeServiceCollection, error) {
|
||||
resp := &ComposeServiceCollection{}
|
||||
err := c.rancherClient.doList(COMPOSE_SERVICE_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeServiceClient) ById(id string) (*ComposeService, error) {
|
||||
resp := &ComposeService{}
|
||||
err := c.rancherClient.doById(COMPOSE_SERVICE_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeServiceClient) Delete(container *ComposeService) error {
|
||||
return c.rancherClient.doResourceDelete(COMPOSE_SERVICE_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *ComposeServiceClient) ActionActivate(resource *ComposeService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(COMPOSE_SERVICE_TYPE, "activate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeServiceClient) ActionCancelrollback(resource *ComposeService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(COMPOSE_SERVICE_TYPE, "cancelrollback", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeServiceClient) ActionCancelupgrade(resource *ComposeService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(COMPOSE_SERVICE_TYPE, "cancelupgrade", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeServiceClient) ActionCreate(resource *ComposeService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(COMPOSE_SERVICE_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeServiceClient) ActionFinishupgrade(resource *ComposeService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(COMPOSE_SERVICE_TYPE, "finishupgrade", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeServiceClient) ActionRemove(resource *ComposeService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(COMPOSE_SERVICE_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ComposeServiceClient) ActionRollback(resource *ComposeService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(COMPOSE_SERVICE_TYPE, "rollback", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
69
vendor/github.com/rancher/go-rancher/client/generated_config_item.go
generated
vendored
69
vendor/github.com/rancher/go-rancher/client/generated_config_item.go
generated
vendored
@ -1,69 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
CONFIG_ITEM_TYPE = "configItem"
|
||||
)
|
||||
|
||||
type ConfigItem struct {
|
||||
Resource
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
SourceVersion string `json:"sourceVersion,omitempty" yaml:"source_version,omitempty"`
|
||||
}
|
||||
|
||||
type ConfigItemCollection struct {
|
||||
Collection
|
||||
Data []ConfigItem `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ConfigItemClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ConfigItemOperations interface {
|
||||
List(opts *ListOpts) (*ConfigItemCollection, error)
|
||||
Create(opts *ConfigItem) (*ConfigItem, error)
|
||||
Update(existing *ConfigItem, updates interface{}) (*ConfigItem, error)
|
||||
ById(id string) (*ConfigItem, error)
|
||||
Delete(container *ConfigItem) error
|
||||
}
|
||||
|
||||
func newConfigItemClient(rancherClient *RancherClient) *ConfigItemClient {
|
||||
return &ConfigItemClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ConfigItemClient) Create(container *ConfigItem) (*ConfigItem, error) {
|
||||
resp := &ConfigItem{}
|
||||
err := c.rancherClient.doCreate(CONFIG_ITEM_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ConfigItemClient) Update(existing *ConfigItem, updates interface{}) (*ConfigItem, error) {
|
||||
resp := &ConfigItem{}
|
||||
err := c.rancherClient.doUpdate(CONFIG_ITEM_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ConfigItemClient) List(opts *ListOpts) (*ConfigItemCollection, error) {
|
||||
resp := &ConfigItemCollection{}
|
||||
err := c.rancherClient.doList(CONFIG_ITEM_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ConfigItemClient) ById(id string) (*ConfigItem, error) {
|
||||
resp := &ConfigItem{}
|
||||
err := c.rancherClient.doById(CONFIG_ITEM_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ConfigItemClient) Delete(container *ConfigItem) error {
|
||||
return c.rancherClient.doResourceDelete(CONFIG_ITEM_TYPE, &container.Resource)
|
||||
}
|
81
vendor/github.com/rancher/go-rancher/client/generated_config_item_status.go
generated
vendored
81
vendor/github.com/rancher/go-rancher/client/generated_config_item_status.go
generated
vendored
@ -1,81 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
CONFIG_ITEM_STATUS_TYPE = "configItemStatus"
|
||||
)
|
||||
|
||||
type ConfigItemStatus struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
AgentId string `json:"agentId,omitempty" yaml:"agent_id,omitempty"`
|
||||
|
||||
AppliedUpdated string `json:"appliedUpdated,omitempty" yaml:"applied_updated,omitempty"`
|
||||
|
||||
AppliedVersion int64 `json:"appliedVersion,omitempty" yaml:"applied_version,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
RequestedUpdated string `json:"requestedUpdated,omitempty" yaml:"requested_updated,omitempty"`
|
||||
|
||||
RequestedVersion int64 `json:"requestedVersion,omitempty" yaml:"requested_version,omitempty"`
|
||||
|
||||
SourceVersion string `json:"sourceVersion,omitempty" yaml:"source_version,omitempty"`
|
||||
}
|
||||
|
||||
type ConfigItemStatusCollection struct {
|
||||
Collection
|
||||
Data []ConfigItemStatus `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ConfigItemStatusClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ConfigItemStatusOperations interface {
|
||||
List(opts *ListOpts) (*ConfigItemStatusCollection, error)
|
||||
Create(opts *ConfigItemStatus) (*ConfigItemStatus, error)
|
||||
Update(existing *ConfigItemStatus, updates interface{}) (*ConfigItemStatus, error)
|
||||
ById(id string) (*ConfigItemStatus, error)
|
||||
Delete(container *ConfigItemStatus) error
|
||||
}
|
||||
|
||||
func newConfigItemStatusClient(rancherClient *RancherClient) *ConfigItemStatusClient {
|
||||
return &ConfigItemStatusClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ConfigItemStatusClient) Create(container *ConfigItemStatus) (*ConfigItemStatus, error) {
|
||||
resp := &ConfigItemStatus{}
|
||||
err := c.rancherClient.doCreate(CONFIG_ITEM_STATUS_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ConfigItemStatusClient) Update(existing *ConfigItemStatus, updates interface{}) (*ConfigItemStatus, error) {
|
||||
resp := &ConfigItemStatus{}
|
||||
err := c.rancherClient.doUpdate(CONFIG_ITEM_STATUS_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ConfigItemStatusClient) List(opts *ListOpts) (*ConfigItemStatusCollection, error) {
|
||||
resp := &ConfigItemStatusCollection{}
|
||||
err := c.rancherClient.doList(CONFIG_ITEM_STATUS_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ConfigItemStatusClient) ById(id string) (*ConfigItemStatus, error) {
|
||||
resp := &ConfigItemStatus{}
|
||||
err := c.rancherClient.doById(CONFIG_ITEM_STATUS_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ConfigItemStatusClient) Delete(container *ConfigItemStatus) error {
|
||||
return c.rancherClient.doResourceDelete(CONFIG_ITEM_STATUS_TYPE, &container.Resource)
|
||||
}
|
431
vendor/github.com/rancher/go-rancher/client/generated_container.go
generated
vendored
431
vendor/github.com/rancher/go-rancher/client/generated_container.go
generated
vendored
@ -1,431 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
CONTAINER_TYPE = "container"
|
||||
)
|
||||
|
||||
type Container struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
AgentId string `json:"agentId,omitempty" yaml:"agent_id,omitempty"`
|
||||
|
||||
AllocationState string `json:"allocationState,omitempty" yaml:"allocation_state,omitempty"`
|
||||
|
||||
BlkioDeviceOptions map[string]interface{} `json:"blkioDeviceOptions,omitempty" yaml:"blkio_device_options,omitempty"`
|
||||
|
||||
Build *DockerBuild `json:"build,omitempty" yaml:"build,omitempty"`
|
||||
|
||||
CapAdd []string `json:"capAdd,omitempty" yaml:"cap_add,omitempty"`
|
||||
|
||||
CapDrop []string `json:"capDrop,omitempty" yaml:"cap_drop,omitempty"`
|
||||
|
||||
Command []string `json:"command,omitempty" yaml:"command,omitempty"`
|
||||
|
||||
Count int64 `json:"count,omitempty" yaml:"count,omitempty"`
|
||||
|
||||
CpuSet string `json:"cpuSet,omitempty" yaml:"cpu_set,omitempty"`
|
||||
|
||||
CpuShares int64 `json:"cpuShares,omitempty" yaml:"cpu_shares,omitempty"`
|
||||
|
||||
CreateIndex int64 `json:"createIndex,omitempty" yaml:"create_index,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
DataVolumeMounts map[string]interface{} `json:"dataVolumeMounts,omitempty" yaml:"data_volume_mounts,omitempty"`
|
||||
|
||||
DataVolumes []string `json:"dataVolumes,omitempty" yaml:"data_volumes,omitempty"`
|
||||
|
||||
DataVolumesFrom []string `json:"dataVolumesFrom,omitempty" yaml:"data_volumes_from,omitempty"`
|
||||
|
||||
DeploymentUnitUuid string `json:"deploymentUnitUuid,omitempty" yaml:"deployment_unit_uuid,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
Devices []string `json:"devices,omitempty" yaml:"devices,omitempty"`
|
||||
|
||||
Dns []string `json:"dns,omitempty" yaml:"dns,omitempty"`
|
||||
|
||||
DnsSearch []string `json:"dnsSearch,omitempty" yaml:"dns_search,omitempty"`
|
||||
|
||||
DomainName string `json:"domainName,omitempty" yaml:"domain_name,omitempty"`
|
||||
|
||||
EntryPoint []string `json:"entryPoint,omitempty" yaml:"entry_point,omitempty"`
|
||||
|
||||
Environment map[string]interface{} `json:"environment,omitempty" yaml:"environment,omitempty"`
|
||||
|
||||
Expose []string `json:"expose,omitempty" yaml:"expose,omitempty"`
|
||||
|
||||
ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
|
||||
|
||||
ExtraHosts []string `json:"extraHosts,omitempty" yaml:"extra_hosts,omitempty"`
|
||||
|
||||
FirstRunning string `json:"firstRunning,omitempty" yaml:"first_running,omitempty"`
|
||||
|
||||
HealthCheck *InstanceHealthCheck `json:"healthCheck,omitempty" yaml:"health_check,omitempty"`
|
||||
|
||||
HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"`
|
||||
|
||||
HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"`
|
||||
|
||||
Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"`
|
||||
|
||||
ImageUuid string `json:"imageUuid,omitempty" yaml:"image_uuid,omitempty"`
|
||||
|
||||
InstanceLinks map[string]interface{} `json:"instanceLinks,omitempty" yaml:"instance_links,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
Labels map[string]interface{} `json:"labels,omitempty" yaml:"labels,omitempty"`
|
||||
|
||||
LogConfig *LogConfig `json:"logConfig,omitempty" yaml:"log_config,omitempty"`
|
||||
|
||||
LxcConf map[string]interface{} `json:"lxcConf,omitempty" yaml:"lxc_conf,omitempty"`
|
||||
|
||||
Memory int64 `json:"memory,omitempty" yaml:"memory,omitempty"`
|
||||
|
||||
MemorySwap int64 `json:"memorySwap,omitempty" yaml:"memory_swap,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
NativeContainer bool `json:"nativeContainer,omitempty" yaml:"native_container,omitempty"`
|
||||
|
||||
NetworkContainerId string `json:"networkContainerId,omitempty" yaml:"network_container_id,omitempty"`
|
||||
|
||||
NetworkIds []string `json:"networkIds,omitempty" yaml:"network_ids,omitempty"`
|
||||
|
||||
NetworkMode string `json:"networkMode,omitempty" yaml:"network_mode,omitempty"`
|
||||
|
||||
PidMode string `json:"pidMode,omitempty" yaml:"pid_mode,omitempty"`
|
||||
|
||||
Ports []string `json:"ports,omitempty" yaml:"ports,omitempty"`
|
||||
|
||||
PrimaryIpAddress string `json:"primaryIpAddress,omitempty" yaml:"primary_ip_address,omitempty"`
|
||||
|
||||
Privileged bool `json:"privileged,omitempty" yaml:"privileged,omitempty"`
|
||||
|
||||
PublishAllPorts bool `json:"publishAllPorts,omitempty" yaml:"publish_all_ports,omitempty"`
|
||||
|
||||
ReadOnly bool `json:"readOnly,omitempty" yaml:"read_only,omitempty"`
|
||||
|
||||
RegistryCredentialId string `json:"registryCredentialId,omitempty" yaml:"registry_credential_id,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
RequestedHostId string `json:"requestedHostId,omitempty" yaml:"requested_host_id,omitempty"`
|
||||
|
||||
RestartPolicy *RestartPolicy `json:"restartPolicy,omitempty" yaml:"restart_policy,omitempty"`
|
||||
|
||||
SecurityOpt []string `json:"securityOpt,omitempty" yaml:"security_opt,omitempty"`
|
||||
|
||||
StartCount int64 `json:"startCount,omitempty" yaml:"start_count,omitempty"`
|
||||
|
||||
StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
StdinOpen bool `json:"stdinOpen,omitempty" yaml:"stdin_open,omitempty"`
|
||||
|
||||
SystemContainer string `json:"systemContainer,omitempty" yaml:"system_container,omitempty"`
|
||||
|
||||
Token string `json:"token,omitempty" yaml:"token,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Tty bool `json:"tty,omitempty" yaml:"tty,omitempty"`
|
||||
|
||||
User string `json:"user,omitempty" yaml:"user,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
|
||||
Version string `json:"version,omitempty" yaml:"version,omitempty"`
|
||||
|
||||
VolumeDriver string `json:"volumeDriver,omitempty" yaml:"volume_driver,omitempty"`
|
||||
|
||||
WorkingDir string `json:"workingDir,omitempty" yaml:"working_dir,omitempty"`
|
||||
}
|
||||
|
||||
type ContainerCollection struct {
|
||||
Collection
|
||||
Data []Container `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ContainerClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ContainerOperations interface {
|
||||
List(opts *ListOpts) (*ContainerCollection, error)
|
||||
Create(opts *Container) (*Container, error)
|
||||
Update(existing *Container, updates interface{}) (*Container, error)
|
||||
ById(id string) (*Container, error)
|
||||
Delete(container *Container) error
|
||||
|
||||
ActionAllocate(*Container) (*Instance, error)
|
||||
|
||||
ActionConsole(*Container, *InstanceConsoleInput) (*InstanceConsole, error)
|
||||
|
||||
ActionCreate(*Container) (*Instance, error)
|
||||
|
||||
ActionDeallocate(*Container) (*Instance, error)
|
||||
|
||||
ActionError(*Container) (*Instance, error)
|
||||
|
||||
ActionExecute(*Container, *ContainerExec) (*HostAccess, error)
|
||||
|
||||
ActionLogs(*Container, *ContainerLogs) (*HostAccess, error)
|
||||
|
||||
ActionMigrate(*Container) (*Instance, error)
|
||||
|
||||
ActionProxy(*Container, *ContainerProxy) (*HostAccess, error)
|
||||
|
||||
ActionPurge(*Container) (*Instance, error)
|
||||
|
||||
ActionRemove(*Container) (*Instance, error)
|
||||
|
||||
ActionRestart(*Container) (*Instance, error)
|
||||
|
||||
ActionRestore(*Container) (*Instance, error)
|
||||
|
||||
ActionSetlabels(*Container, *SetLabelsInput) (*Container, error)
|
||||
|
||||
ActionStart(*Container) (*Instance, error)
|
||||
|
||||
ActionStop(*Container, *InstanceStop) (*Instance, error)
|
||||
|
||||
ActionUpdate(*Container) (*Instance, error)
|
||||
|
||||
ActionUpdatehealthy(*Container) (*Instance, error)
|
||||
|
||||
ActionUpdatereinitializing(*Container) (*Instance, error)
|
||||
|
||||
ActionUpdateunhealthy(*Container) (*Instance, error)
|
||||
}
|
||||
|
||||
func newContainerClient(rancherClient *RancherClient) *ContainerClient {
|
||||
return &ContainerClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ContainerClient) Create(container *Container) (*Container, error) {
|
||||
resp := &Container{}
|
||||
err := c.rancherClient.doCreate(CONTAINER_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerClient) Update(existing *Container, updates interface{}) (*Container, error) {
|
||||
resp := &Container{}
|
||||
err := c.rancherClient.doUpdate(CONTAINER_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerClient) List(opts *ListOpts) (*ContainerCollection, error) {
|
||||
resp := &ContainerCollection{}
|
||||
err := c.rancherClient.doList(CONTAINER_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerClient) ById(id string) (*Container, error) {
|
||||
resp := &Container{}
|
||||
err := c.rancherClient.doById(CONTAINER_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerClient) Delete(container *Container) error {
|
||||
return c.rancherClient.doResourceDelete(CONTAINER_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *ContainerClient) ActionAllocate(resource *Container) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(CONTAINER_TYPE, "allocate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerClient) ActionConsole(resource *Container, input *InstanceConsoleInput) (*InstanceConsole, error) {
|
||||
|
||||
resp := &InstanceConsole{}
|
||||
|
||||
err := c.rancherClient.doAction(CONTAINER_TYPE, "console", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerClient) ActionCreate(resource *Container) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(CONTAINER_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerClient) ActionDeallocate(resource *Container) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(CONTAINER_TYPE, "deallocate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerClient) ActionError(resource *Container) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(CONTAINER_TYPE, "error", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerClient) ActionExecute(resource *Container, input *ContainerExec) (*HostAccess, error) {
|
||||
|
||||
resp := &HostAccess{}
|
||||
|
||||
err := c.rancherClient.doAction(CONTAINER_TYPE, "execute", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerClient) ActionLogs(resource *Container, input *ContainerLogs) (*HostAccess, error) {
|
||||
|
||||
resp := &HostAccess{}
|
||||
|
||||
err := c.rancherClient.doAction(CONTAINER_TYPE, "logs", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerClient) ActionMigrate(resource *Container) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(CONTAINER_TYPE, "migrate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerClient) ActionProxy(resource *Container, input *ContainerProxy) (*HostAccess, error) {
|
||||
|
||||
resp := &HostAccess{}
|
||||
|
||||
err := c.rancherClient.doAction(CONTAINER_TYPE, "proxy", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerClient) ActionPurge(resource *Container) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(CONTAINER_TYPE, "purge", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerClient) ActionRemove(resource *Container) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(CONTAINER_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerClient) ActionRestart(resource *Container) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(CONTAINER_TYPE, "restart", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerClient) ActionRestore(resource *Container) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(CONTAINER_TYPE, "restore", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerClient) ActionSetlabels(resource *Container, input *SetLabelsInput) (*Container, error) {
|
||||
|
||||
resp := &Container{}
|
||||
|
||||
err := c.rancherClient.doAction(CONTAINER_TYPE, "setlabels", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerClient) ActionStart(resource *Container) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(CONTAINER_TYPE, "start", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerClient) ActionStop(resource *Container, input *InstanceStop) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(CONTAINER_TYPE, "stop", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerClient) ActionUpdate(resource *Container) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(CONTAINER_TYPE, "update", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerClient) ActionUpdatehealthy(resource *Container) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(CONTAINER_TYPE, "updatehealthy", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerClient) ActionUpdatereinitializing(resource *Container) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(CONTAINER_TYPE, "updatereinitializing", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerClient) ActionUpdateunhealthy(resource *Container) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(CONTAINER_TYPE, "updateunhealthy", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
117
vendor/github.com/rancher/go-rancher/client/generated_container_event.go
generated
vendored
117
vendor/github.com/rancher/go-rancher/client/generated_container_event.go
generated
vendored
@ -1,117 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
CONTAINER_EVENT_TYPE = "containerEvent"
|
||||
)
|
||||
|
||||
type ContainerEvent struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
DockerInspect interface{} `json:"dockerInspect,omitempty" yaml:"docker_inspect,omitempty"`
|
||||
|
||||
ExternalFrom string `json:"externalFrom,omitempty" yaml:"external_from,omitempty"`
|
||||
|
||||
ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
|
||||
|
||||
ExternalStatus string `json:"externalStatus,omitempty" yaml:"external_status,omitempty"`
|
||||
|
||||
ExternalTimestamp int64 `json:"externalTimestamp,omitempty" yaml:"external_timestamp,omitempty"`
|
||||
|
||||
HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
ReportedHostUuid string `json:"reportedHostUuid,omitempty" yaml:"reported_host_uuid,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
}
|
||||
|
||||
type ContainerEventCollection struct {
|
||||
Collection
|
||||
Data []ContainerEvent `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ContainerEventClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ContainerEventOperations interface {
|
||||
List(opts *ListOpts) (*ContainerEventCollection, error)
|
||||
Create(opts *ContainerEvent) (*ContainerEvent, error)
|
||||
Update(existing *ContainerEvent, updates interface{}) (*ContainerEvent, error)
|
||||
ById(id string) (*ContainerEvent, error)
|
||||
Delete(container *ContainerEvent) error
|
||||
|
||||
ActionCreate(*ContainerEvent) (*ContainerEvent, error)
|
||||
|
||||
ActionRemove(*ContainerEvent) (*ContainerEvent, error)
|
||||
}
|
||||
|
||||
func newContainerEventClient(rancherClient *RancherClient) *ContainerEventClient {
|
||||
return &ContainerEventClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ContainerEventClient) Create(container *ContainerEvent) (*ContainerEvent, error) {
|
||||
resp := &ContainerEvent{}
|
||||
err := c.rancherClient.doCreate(CONTAINER_EVENT_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerEventClient) Update(existing *ContainerEvent, updates interface{}) (*ContainerEvent, error) {
|
||||
resp := &ContainerEvent{}
|
||||
err := c.rancherClient.doUpdate(CONTAINER_EVENT_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerEventClient) List(opts *ListOpts) (*ContainerEventCollection, error) {
|
||||
resp := &ContainerEventCollection{}
|
||||
err := c.rancherClient.doList(CONTAINER_EVENT_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerEventClient) ById(id string) (*ContainerEvent, error) {
|
||||
resp := &ContainerEvent{}
|
||||
err := c.rancherClient.doById(CONTAINER_EVENT_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerEventClient) Delete(container *ContainerEvent) error {
|
||||
return c.rancherClient.doResourceDelete(CONTAINER_EVENT_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *ContainerEventClient) ActionCreate(resource *ContainerEvent) (*ContainerEvent, error) {
|
||||
|
||||
resp := &ContainerEvent{}
|
||||
|
||||
err := c.rancherClient.doAction(CONTAINER_EVENT_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerEventClient) ActionRemove(resource *ContainerEvent) (*ContainerEvent, error) {
|
||||
|
||||
resp := &ContainerEvent{}
|
||||
|
||||
err := c.rancherClient.doAction(CONTAINER_EVENT_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
73
vendor/github.com/rancher/go-rancher/client/generated_container_exec.go
generated
vendored
73
vendor/github.com/rancher/go-rancher/client/generated_container_exec.go
generated
vendored
@ -1,73 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
CONTAINER_EXEC_TYPE = "containerExec"
|
||||
)
|
||||
|
||||
type ContainerExec struct {
|
||||
Resource
|
||||
|
||||
AttachStdin bool `json:"attachStdin,omitempty" yaml:"attach_stdin,omitempty"`
|
||||
|
||||
AttachStdout bool `json:"attachStdout,omitempty" yaml:"attach_stdout,omitempty"`
|
||||
|
||||
Command []string `json:"command,omitempty" yaml:"command,omitempty"`
|
||||
|
||||
Tty bool `json:"tty,omitempty" yaml:"tty,omitempty"`
|
||||
}
|
||||
|
||||
type ContainerExecCollection struct {
|
||||
Collection
|
||||
Data []ContainerExec `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ContainerExecClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ContainerExecOperations interface {
|
||||
List(opts *ListOpts) (*ContainerExecCollection, error)
|
||||
Create(opts *ContainerExec) (*ContainerExec, error)
|
||||
Update(existing *ContainerExec, updates interface{}) (*ContainerExec, error)
|
||||
ById(id string) (*ContainerExec, error)
|
||||
Delete(container *ContainerExec) error
|
||||
}
|
||||
|
||||
func newContainerExecClient(rancherClient *RancherClient) *ContainerExecClient {
|
||||
return &ContainerExecClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ContainerExecClient) Create(container *ContainerExec) (*ContainerExec, error) {
|
||||
resp := &ContainerExec{}
|
||||
err := c.rancherClient.doCreate(CONTAINER_EXEC_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerExecClient) Update(existing *ContainerExec, updates interface{}) (*ContainerExec, error) {
|
||||
resp := &ContainerExec{}
|
||||
err := c.rancherClient.doUpdate(CONTAINER_EXEC_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerExecClient) List(opts *ListOpts) (*ContainerExecCollection, error) {
|
||||
resp := &ContainerExecCollection{}
|
||||
err := c.rancherClient.doList(CONTAINER_EXEC_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerExecClient) ById(id string) (*ContainerExec, error) {
|
||||
resp := &ContainerExec{}
|
||||
err := c.rancherClient.doById(CONTAINER_EXEC_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerExecClient) Delete(container *ContainerExec) error {
|
||||
return c.rancherClient.doResourceDelete(CONTAINER_EXEC_TYPE, &container.Resource)
|
||||
}
|
69
vendor/github.com/rancher/go-rancher/client/generated_container_logs.go
generated
vendored
69
vendor/github.com/rancher/go-rancher/client/generated_container_logs.go
generated
vendored
@ -1,69 +0,0 @@
|
||||
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"`
|
||||
}
|
||||
|
||||
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)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
69
vendor/github.com/rancher/go-rancher/client/generated_container_proxy.go
generated
vendored
69
vendor/github.com/rancher/go-rancher/client/generated_container_proxy.go
generated
vendored
@ -1,69 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
CONTAINER_PROXY_TYPE = "containerProxy"
|
||||
)
|
||||
|
||||
type ContainerProxy struct {
|
||||
Resource
|
||||
|
||||
Port int64 `json:"port,omitempty" yaml:"port,omitempty"`
|
||||
|
||||
Scheme string `json:"scheme,omitempty" yaml:"scheme,omitempty"`
|
||||
}
|
||||
|
||||
type ContainerProxyCollection struct {
|
||||
Collection
|
||||
Data []ContainerProxy `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ContainerProxyClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ContainerProxyOperations interface {
|
||||
List(opts *ListOpts) (*ContainerProxyCollection, error)
|
||||
Create(opts *ContainerProxy) (*ContainerProxy, error)
|
||||
Update(existing *ContainerProxy, updates interface{}) (*ContainerProxy, error)
|
||||
ById(id string) (*ContainerProxy, error)
|
||||
Delete(container *ContainerProxy) error
|
||||
}
|
||||
|
||||
func newContainerProxyClient(rancherClient *RancherClient) *ContainerProxyClient {
|
||||
return &ContainerProxyClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ContainerProxyClient) Create(container *ContainerProxy) (*ContainerProxy, error) {
|
||||
resp := &ContainerProxy{}
|
||||
err := c.rancherClient.doCreate(CONTAINER_PROXY_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerProxyClient) Update(existing *ContainerProxy, updates interface{}) (*ContainerProxy, error) {
|
||||
resp := &ContainerProxy{}
|
||||
err := c.rancherClient.doUpdate(CONTAINER_PROXY_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerProxyClient) List(opts *ListOpts) (*ContainerProxyCollection, error) {
|
||||
resp := &ContainerProxyCollection{}
|
||||
err := c.rancherClient.doList(CONTAINER_PROXY_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerProxyClient) ById(id string) (*ContainerProxy, error) {
|
||||
resp := &ContainerProxy{}
|
||||
err := c.rancherClient.doById(CONTAINER_PROXY_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ContainerProxyClient) Delete(container *ContainerProxy) error {
|
||||
return c.rancherClient.doResourceDelete(CONTAINER_PROXY_TYPE, &container.Resource)
|
||||
}
|
161
vendor/github.com/rancher/go-rancher/client/generated_credential.go
generated
vendored
161
vendor/github.com/rancher/go-rancher/client/generated_credential.go
generated
vendored
@ -1,161 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
CREDENTIAL_TYPE = "credential"
|
||||
)
|
||||
|
||||
type Credential struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
PublicValue string `json:"publicValue,omitempty" yaml:"public_value,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
SecretValue string `json:"secretValue,omitempty" yaml:"secret_value,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type CredentialCollection struct {
|
||||
Collection
|
||||
Data []Credential `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type CredentialClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type CredentialOperations interface {
|
||||
List(opts *ListOpts) (*CredentialCollection, error)
|
||||
Create(opts *Credential) (*Credential, error)
|
||||
Update(existing *Credential, updates interface{}) (*Credential, error)
|
||||
ById(id string) (*Credential, error)
|
||||
Delete(container *Credential) error
|
||||
|
||||
ActionActivate(*Credential) (*Credential, error)
|
||||
|
||||
ActionCreate(*Credential) (*Credential, error)
|
||||
|
||||
ActionDeactivate(*Credential) (*Credential, error)
|
||||
|
||||
ActionPurge(*Credential) (*Credential, error)
|
||||
|
||||
ActionRemove(*Credential) (*Credential, error)
|
||||
|
||||
ActionUpdate(*Credential) (*Credential, error)
|
||||
}
|
||||
|
||||
func newCredentialClient(rancherClient *RancherClient) *CredentialClient {
|
||||
return &CredentialClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *CredentialClient) Create(container *Credential) (*Credential, error) {
|
||||
resp := &Credential{}
|
||||
err := c.rancherClient.doCreate(CREDENTIAL_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *CredentialClient) Update(existing *Credential, updates interface{}) (*Credential, error) {
|
||||
resp := &Credential{}
|
||||
err := c.rancherClient.doUpdate(CREDENTIAL_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *CredentialClient) List(opts *ListOpts) (*CredentialCollection, error) {
|
||||
resp := &CredentialCollection{}
|
||||
err := c.rancherClient.doList(CREDENTIAL_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *CredentialClient) ById(id string) (*Credential, error) {
|
||||
resp := &Credential{}
|
||||
err := c.rancherClient.doById(CREDENTIAL_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *CredentialClient) Delete(container *Credential) error {
|
||||
return c.rancherClient.doResourceDelete(CREDENTIAL_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *CredentialClient) ActionActivate(resource *Credential) (*Credential, error) {
|
||||
|
||||
resp := &Credential{}
|
||||
|
||||
err := c.rancherClient.doAction(CREDENTIAL_TYPE, "activate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *CredentialClient) ActionCreate(resource *Credential) (*Credential, error) {
|
||||
|
||||
resp := &Credential{}
|
||||
|
||||
err := c.rancherClient.doAction(CREDENTIAL_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *CredentialClient) ActionDeactivate(resource *Credential) (*Credential, error) {
|
||||
|
||||
resp := &Credential{}
|
||||
|
||||
err := c.rancherClient.doAction(CREDENTIAL_TYPE, "deactivate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *CredentialClient) ActionPurge(resource *Credential) (*Credential, error) {
|
||||
|
||||
resp := &Credential{}
|
||||
|
||||
err := c.rancherClient.doAction(CREDENTIAL_TYPE, "purge", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *CredentialClient) ActionRemove(resource *Credential) (*Credential, error) {
|
||||
|
||||
resp := &Credential{}
|
||||
|
||||
err := c.rancherClient.doAction(CREDENTIAL_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *CredentialClient) ActionUpdate(resource *Credential) (*Credential, error) {
|
||||
|
||||
resp := &Credential{}
|
||||
|
||||
err := c.rancherClient.doAction(CREDENTIAL_TYPE, "update", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
85
vendor/github.com/rancher/go-rancher/client/generated_databasechangelog.go
generated
vendored
85
vendor/github.com/rancher/go-rancher/client/generated_databasechangelog.go
generated
vendored
@ -1,85 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
DATABASECHANGELOG_TYPE = "databasechangelog"
|
||||
)
|
||||
|
||||
type Databasechangelog struct {
|
||||
Resource
|
||||
|
||||
Author string `json:"author,omitempty" yaml:"author,omitempty"`
|
||||
|
||||
Comments string `json:"comments,omitempty" yaml:"comments,omitempty"`
|
||||
|
||||
Dateexecuted string `json:"dateexecuted,omitempty" yaml:"dateexecuted,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
Exectype string `json:"exectype,omitempty" yaml:"exectype,omitempty"`
|
||||
|
||||
Filename string `json:"filename,omitempty" yaml:"filename,omitempty"`
|
||||
|
||||
Liquibase string `json:"liquibase,omitempty" yaml:"liquibase,omitempty"`
|
||||
|
||||
Md5sum string `json:"md5sum,omitempty" yaml:"md5sum,omitempty"`
|
||||
|
||||
Orderexecuted int64 `json:"orderexecuted,omitempty" yaml:"orderexecuted,omitempty"`
|
||||
|
||||
Tag string `json:"tag,omitempty" yaml:"tag,omitempty"`
|
||||
}
|
||||
|
||||
type DatabasechangelogCollection struct {
|
||||
Collection
|
||||
Data []Databasechangelog `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type DatabasechangelogClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type DatabasechangelogOperations interface {
|
||||
List(opts *ListOpts) (*DatabasechangelogCollection, error)
|
||||
Create(opts *Databasechangelog) (*Databasechangelog, error)
|
||||
Update(existing *Databasechangelog, updates interface{}) (*Databasechangelog, error)
|
||||
ById(id string) (*Databasechangelog, error)
|
||||
Delete(container *Databasechangelog) error
|
||||
}
|
||||
|
||||
func newDatabasechangelogClient(rancherClient *RancherClient) *DatabasechangelogClient {
|
||||
return &DatabasechangelogClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *DatabasechangelogClient) Create(container *Databasechangelog) (*Databasechangelog, error) {
|
||||
resp := &Databasechangelog{}
|
||||
err := c.rancherClient.doCreate(DATABASECHANGELOG_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DatabasechangelogClient) Update(existing *Databasechangelog, updates interface{}) (*Databasechangelog, error) {
|
||||
resp := &Databasechangelog{}
|
||||
err := c.rancherClient.doUpdate(DATABASECHANGELOG_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DatabasechangelogClient) List(opts *ListOpts) (*DatabasechangelogCollection, error) {
|
||||
resp := &DatabasechangelogCollection{}
|
||||
err := c.rancherClient.doList(DATABASECHANGELOG_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DatabasechangelogClient) ById(id string) (*Databasechangelog, error) {
|
||||
resp := &Databasechangelog{}
|
||||
err := c.rancherClient.doById(DATABASECHANGELOG_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DatabasechangelogClient) Delete(container *Databasechangelog) error {
|
||||
return c.rancherClient.doResourceDelete(DATABASECHANGELOG_TYPE, &container.Resource)
|
||||
}
|
71
vendor/github.com/rancher/go-rancher/client/generated_databasechangeloglock.go
generated
vendored
71
vendor/github.com/rancher/go-rancher/client/generated_databasechangeloglock.go
generated
vendored
@ -1,71 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
DATABASECHANGELOGLOCK_TYPE = "databasechangeloglock"
|
||||
)
|
||||
|
||||
type Databasechangeloglock struct {
|
||||
Resource
|
||||
|
||||
Locked bool `json:"locked,omitempty" yaml:"locked,omitempty"`
|
||||
|
||||
Lockedby string `json:"lockedby,omitempty" yaml:"lockedby,omitempty"`
|
||||
|
||||
Lockgranted string `json:"lockgranted,omitempty" yaml:"lockgranted,omitempty"`
|
||||
}
|
||||
|
||||
type DatabasechangeloglockCollection struct {
|
||||
Collection
|
||||
Data []Databasechangeloglock `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type DatabasechangeloglockClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type DatabasechangeloglockOperations interface {
|
||||
List(opts *ListOpts) (*DatabasechangeloglockCollection, error)
|
||||
Create(opts *Databasechangeloglock) (*Databasechangeloglock, error)
|
||||
Update(existing *Databasechangeloglock, updates interface{}) (*Databasechangeloglock, error)
|
||||
ById(id string) (*Databasechangeloglock, error)
|
||||
Delete(container *Databasechangeloglock) error
|
||||
}
|
||||
|
||||
func newDatabasechangeloglockClient(rancherClient *RancherClient) *DatabasechangeloglockClient {
|
||||
return &DatabasechangeloglockClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *DatabasechangeloglockClient) Create(container *Databasechangeloglock) (*Databasechangeloglock, error) {
|
||||
resp := &Databasechangeloglock{}
|
||||
err := c.rancherClient.doCreate(DATABASECHANGELOGLOCK_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DatabasechangeloglockClient) Update(existing *Databasechangeloglock, updates interface{}) (*Databasechangeloglock, error) {
|
||||
resp := &Databasechangeloglock{}
|
||||
err := c.rancherClient.doUpdate(DATABASECHANGELOGLOCK_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DatabasechangeloglockClient) List(opts *ListOpts) (*DatabasechangeloglockCollection, error) {
|
||||
resp := &DatabasechangeloglockCollection{}
|
||||
err := c.rancherClient.doList(DATABASECHANGELOGLOCK_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DatabasechangeloglockClient) ById(id string) (*Databasechangeloglock, error) {
|
||||
resp := &Databasechangeloglock{}
|
||||
err := c.rancherClient.doById(DATABASECHANGELOGLOCK_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DatabasechangeloglockClient) Delete(container *Databasechangeloglock) error {
|
||||
return c.rancherClient.doResourceDelete(DATABASECHANGELOGLOCK_TYPE, &container.Resource)
|
||||
}
|
87
vendor/github.com/rancher/go-rancher/client/generated_digitalocean_config.go
generated
vendored
87
vendor/github.com/rancher/go-rancher/client/generated_digitalocean_config.go
generated
vendored
@ -1,87 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
DIGITALOCEAN_CONFIG_TYPE = "digitaloceanConfig"
|
||||
)
|
||||
|
||||
type DigitaloceanConfig struct {
|
||||
Resource
|
||||
|
||||
AccessToken string `json:"accessToken,omitempty" yaml:"access_token,omitempty"`
|
||||
|
||||
Backups bool `json:"backups,omitempty" yaml:"backups,omitempty"`
|
||||
|
||||
Image string `json:"image,omitempty" yaml:"image,omitempty"`
|
||||
|
||||
Ipv6 bool `json:"ipv6,omitempty" yaml:"ipv6,omitempty"`
|
||||
|
||||
PrivateNetworking bool `json:"privateNetworking,omitempty" yaml:"private_networking,omitempty"`
|
||||
|
||||
Region string `json:"region,omitempty" yaml:"region,omitempty"`
|
||||
|
||||
Size string `json:"size,omitempty" yaml:"size,omitempty"`
|
||||
|
||||
SshKeyFingerprint string `json:"sshKeyFingerprint,omitempty" yaml:"ssh_key_fingerprint,omitempty"`
|
||||
|
||||
SshPort string `json:"sshPort,omitempty" yaml:"ssh_port,omitempty"`
|
||||
|
||||
SshUser string `json:"sshUser,omitempty" yaml:"ssh_user,omitempty"`
|
||||
|
||||
Userdata string `json:"userdata,omitempty" yaml:"userdata,omitempty"`
|
||||
}
|
||||
|
||||
type DigitaloceanConfigCollection struct {
|
||||
Collection
|
||||
Data []DigitaloceanConfig `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type DigitaloceanConfigClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type DigitaloceanConfigOperations interface {
|
||||
List(opts *ListOpts) (*DigitaloceanConfigCollection, error)
|
||||
Create(opts *DigitaloceanConfig) (*DigitaloceanConfig, error)
|
||||
Update(existing *DigitaloceanConfig, updates interface{}) (*DigitaloceanConfig, error)
|
||||
ById(id string) (*DigitaloceanConfig, error)
|
||||
Delete(container *DigitaloceanConfig) error
|
||||
}
|
||||
|
||||
func newDigitaloceanConfigClient(rancherClient *RancherClient) *DigitaloceanConfigClient {
|
||||
return &DigitaloceanConfigClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *DigitaloceanConfigClient) Create(container *DigitaloceanConfig) (*DigitaloceanConfig, error) {
|
||||
resp := &DigitaloceanConfig{}
|
||||
err := c.rancherClient.doCreate(DIGITALOCEAN_CONFIG_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DigitaloceanConfigClient) Update(existing *DigitaloceanConfig, updates interface{}) (*DigitaloceanConfig, error) {
|
||||
resp := &DigitaloceanConfig{}
|
||||
err := c.rancherClient.doUpdate(DIGITALOCEAN_CONFIG_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DigitaloceanConfigClient) List(opts *ListOpts) (*DigitaloceanConfigCollection, error) {
|
||||
resp := &DigitaloceanConfigCollection{}
|
||||
err := c.rancherClient.doList(DIGITALOCEAN_CONFIG_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DigitaloceanConfigClient) ById(id string) (*DigitaloceanConfig, error) {
|
||||
resp := &DigitaloceanConfig{}
|
||||
err := c.rancherClient.doById(DIGITALOCEAN_CONFIG_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DigitaloceanConfigClient) Delete(container *DigitaloceanConfig) error {
|
||||
return c.rancherClient.doResourceDelete(DIGITALOCEAN_CONFIG_TYPE, &container.Resource)
|
||||
}
|
267
vendor/github.com/rancher/go-rancher/client/generated_dns_service.go
generated
vendored
267
vendor/github.com/rancher/go-rancher/client/generated_dns_service.go
generated
vendored
@ -1,267 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
DNS_SERVICE_TYPE = "dnsService"
|
||||
)
|
||||
|
||||
type DnsService struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
AssignServiceIpAddress bool `json:"assignServiceIpAddress,omitempty" yaml:"assign_service_ip_address,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
EnvironmentId string `json:"environmentId,omitempty" yaml:"environment_id,omitempty"`
|
||||
|
||||
ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
|
||||
|
||||
Fqdn string `json:"fqdn,omitempty" yaml:"fqdn,omitempty"`
|
||||
|
||||
HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
LaunchConfig *LaunchConfig `json:"launchConfig,omitempty" yaml:"launch_config,omitempty"`
|
||||
|
||||
Metadata map[string]interface{} `json:"metadata,omitempty" yaml:"metadata,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
RetainIp bool `json:"retainIp,omitempty" yaml:"retain_ip,omitempty"`
|
||||
|
||||
SelectorLink string `json:"selectorLink,omitempty" yaml:"selector_link,omitempty"`
|
||||
|
||||
StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Upgrade *ServiceUpgrade `json:"upgrade,omitempty" yaml:"upgrade,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type DnsServiceCollection struct {
|
||||
Collection
|
||||
Data []DnsService `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type DnsServiceClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type DnsServiceOperations interface {
|
||||
List(opts *ListOpts) (*DnsServiceCollection, error)
|
||||
Create(opts *DnsService) (*DnsService, error)
|
||||
Update(existing *DnsService, updates interface{}) (*DnsService, error)
|
||||
ById(id string) (*DnsService, error)
|
||||
Delete(container *DnsService) error
|
||||
|
||||
ActionActivate(*DnsService) (*Service, error)
|
||||
|
||||
ActionAddservicelink(*DnsService, *AddRemoveServiceLinkInput) (*Service, error)
|
||||
|
||||
ActionCancelrollback(*DnsService) (*Service, error)
|
||||
|
||||
ActionCancelupgrade(*DnsService) (*Service, error)
|
||||
|
||||
ActionCreate(*DnsService) (*Service, error)
|
||||
|
||||
ActionDeactivate(*DnsService) (*Service, error)
|
||||
|
||||
ActionFinishupgrade(*DnsService) (*Service, error)
|
||||
|
||||
ActionRemove(*DnsService) (*Service, error)
|
||||
|
||||
ActionRemoveservicelink(*DnsService, *AddRemoveServiceLinkInput) (*Service, error)
|
||||
|
||||
ActionRestart(*DnsService, *ServiceRestart) (*Service, error)
|
||||
|
||||
ActionRollback(*DnsService) (*Service, error)
|
||||
|
||||
ActionSetservicelinks(*DnsService, *SetServiceLinksInput) (*Service, error)
|
||||
|
||||
ActionUpdate(*DnsService) (*Service, error)
|
||||
|
||||
ActionUpgrade(*DnsService, *ServiceUpgrade) (*Service, error)
|
||||
}
|
||||
|
||||
func newDnsServiceClient(rancherClient *RancherClient) *DnsServiceClient {
|
||||
return &DnsServiceClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *DnsServiceClient) Create(container *DnsService) (*DnsService, error) {
|
||||
resp := &DnsService{}
|
||||
err := c.rancherClient.doCreate(DNS_SERVICE_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DnsServiceClient) Update(existing *DnsService, updates interface{}) (*DnsService, error) {
|
||||
resp := &DnsService{}
|
||||
err := c.rancherClient.doUpdate(DNS_SERVICE_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DnsServiceClient) List(opts *ListOpts) (*DnsServiceCollection, error) {
|
||||
resp := &DnsServiceCollection{}
|
||||
err := c.rancherClient.doList(DNS_SERVICE_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DnsServiceClient) ById(id string) (*DnsService, error) {
|
||||
resp := &DnsService{}
|
||||
err := c.rancherClient.doById(DNS_SERVICE_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DnsServiceClient) Delete(container *DnsService) error {
|
||||
return c.rancherClient.doResourceDelete(DNS_SERVICE_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *DnsServiceClient) ActionActivate(resource *DnsService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "activate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DnsServiceClient) ActionAddservicelink(resource *DnsService, input *AddRemoveServiceLinkInput) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "addservicelink", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DnsServiceClient) ActionCancelrollback(resource *DnsService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "cancelrollback", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DnsServiceClient) ActionCancelupgrade(resource *DnsService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "cancelupgrade", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DnsServiceClient) ActionCreate(resource *DnsService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DnsServiceClient) ActionDeactivate(resource *DnsService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "deactivate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DnsServiceClient) ActionFinishupgrade(resource *DnsService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "finishupgrade", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DnsServiceClient) ActionRemove(resource *DnsService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DnsServiceClient) ActionRemoveservicelink(resource *DnsService, input *AddRemoveServiceLinkInput) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "removeservicelink", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DnsServiceClient) ActionRestart(resource *DnsService, input *ServiceRestart) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "restart", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DnsServiceClient) ActionRollback(resource *DnsService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "rollback", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DnsServiceClient) ActionSetservicelinks(resource *DnsService, input *SetServiceLinksInput) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "setservicelinks", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DnsServiceClient) ActionUpdate(resource *DnsService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "update", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DnsServiceClient) ActionUpgrade(resource *DnsService, input *ServiceUpgrade) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "upgrade", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
77
vendor/github.com/rancher/go-rancher/client/generated_docker_build.go
generated
vendored
77
vendor/github.com/rancher/go-rancher/client/generated_docker_build.go
generated
vendored
@ -1,77 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
DOCKER_BUILD_TYPE = "dockerBuild"
|
||||
)
|
||||
|
||||
type DockerBuild struct {
|
||||
Resource
|
||||
|
||||
Context string `json:"context,omitempty" yaml:"context,omitempty"`
|
||||
|
||||
Dockerfile string `json:"dockerfile,omitempty" yaml:"dockerfile,omitempty"`
|
||||
|
||||
Forcerm bool `json:"forcerm,omitempty" yaml:"forcerm,omitempty"`
|
||||
|
||||
Nocache bool `json:"nocache,omitempty" yaml:"nocache,omitempty"`
|
||||
|
||||
Remote string `json:"remote,omitempty" yaml:"remote,omitempty"`
|
||||
|
||||
Rm bool `json:"rm,omitempty" yaml:"rm,omitempty"`
|
||||
}
|
||||
|
||||
type DockerBuildCollection struct {
|
||||
Collection
|
||||
Data []DockerBuild `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type DockerBuildClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type DockerBuildOperations interface {
|
||||
List(opts *ListOpts) (*DockerBuildCollection, error)
|
||||
Create(opts *DockerBuild) (*DockerBuild, error)
|
||||
Update(existing *DockerBuild, updates interface{}) (*DockerBuild, error)
|
||||
ById(id string) (*DockerBuild, error)
|
||||
Delete(container *DockerBuild) error
|
||||
}
|
||||
|
||||
func newDockerBuildClient(rancherClient *RancherClient) *DockerBuildClient {
|
||||
return &DockerBuildClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *DockerBuildClient) Create(container *DockerBuild) (*DockerBuild, error) {
|
||||
resp := &DockerBuild{}
|
||||
err := c.rancherClient.doCreate(DOCKER_BUILD_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DockerBuildClient) Update(existing *DockerBuild, updates interface{}) (*DockerBuild, error) {
|
||||
resp := &DockerBuild{}
|
||||
err := c.rancherClient.doUpdate(DOCKER_BUILD_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DockerBuildClient) List(opts *ListOpts) (*DockerBuildCollection, error) {
|
||||
resp := &DockerBuildCollection{}
|
||||
err := c.rancherClient.doList(DOCKER_BUILD_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DockerBuildClient) ById(id string) (*DockerBuild, error) {
|
||||
resp := &DockerBuild{}
|
||||
err := c.rancherClient.doById(DOCKER_BUILD_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DockerBuildClient) Delete(container *DockerBuild) error {
|
||||
return c.rancherClient.doResourceDelete(DOCKER_BUILD_TYPE, &container.Resource)
|
||||
}
|
117
vendor/github.com/rancher/go-rancher/client/generated_dynamic_schema.go
generated
vendored
117
vendor/github.com/rancher/go-rancher/client/generated_dynamic_schema.go
generated
vendored
@ -1,117 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
DYNAMIC_SCHEMA_TYPE = "dynamicSchema"
|
||||
)
|
||||
|
||||
type DynamicSchema struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
Definition string `json:"definition,omitempty" yaml:"definition,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
Parent string `json:"parent,omitempty" yaml:"parent,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
Roles []string `json:"roles,omitempty" yaml:"roles,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type DynamicSchemaCollection struct {
|
||||
Collection
|
||||
Data []DynamicSchema `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type DynamicSchemaClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type DynamicSchemaOperations interface {
|
||||
List(opts *ListOpts) (*DynamicSchemaCollection, error)
|
||||
Create(opts *DynamicSchema) (*DynamicSchema, error)
|
||||
Update(existing *DynamicSchema, updates interface{}) (*DynamicSchema, error)
|
||||
ById(id string) (*DynamicSchema, error)
|
||||
Delete(container *DynamicSchema) error
|
||||
|
||||
ActionCreate(*DynamicSchema) (*DynamicSchema, error)
|
||||
|
||||
ActionRemove(*DynamicSchema) (*DynamicSchema, error)
|
||||
}
|
||||
|
||||
func newDynamicSchemaClient(rancherClient *RancherClient) *DynamicSchemaClient {
|
||||
return &DynamicSchemaClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *DynamicSchemaClient) Create(container *DynamicSchema) (*DynamicSchema, error) {
|
||||
resp := &DynamicSchema{}
|
||||
err := c.rancherClient.doCreate(DYNAMIC_SCHEMA_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DynamicSchemaClient) Update(existing *DynamicSchema, updates interface{}) (*DynamicSchema, error) {
|
||||
resp := &DynamicSchema{}
|
||||
err := c.rancherClient.doUpdate(DYNAMIC_SCHEMA_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DynamicSchemaClient) List(opts *ListOpts) (*DynamicSchemaCollection, error) {
|
||||
resp := &DynamicSchemaCollection{}
|
||||
err := c.rancherClient.doList(DYNAMIC_SCHEMA_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DynamicSchemaClient) ById(id string) (*DynamicSchema, error) {
|
||||
resp := &DynamicSchema{}
|
||||
err := c.rancherClient.doById(DYNAMIC_SCHEMA_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DynamicSchemaClient) Delete(container *DynamicSchema) error {
|
||||
return c.rancherClient.doResourceDelete(DYNAMIC_SCHEMA_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *DynamicSchemaClient) ActionCreate(resource *DynamicSchema) (*DynamicSchema, error) {
|
||||
|
||||
resp := &DynamicSchema{}
|
||||
|
||||
err := c.rancherClient.doAction(DYNAMIC_SCHEMA_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *DynamicSchemaClient) ActionRemove(resource *DynamicSchema) (*DynamicSchema, error) {
|
||||
|
||||
resp := &DynamicSchema{}
|
||||
|
||||
err := c.rancherClient.doAction(DYNAMIC_SCHEMA_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
252
vendor/github.com/rancher/go-rancher/client/generated_environment.go
generated
vendored
252
vendor/github.com/rancher/go-rancher/client/generated_environment.go
generated
vendored
@ -1,252 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
ENVIRONMENT_TYPE = "environment"
|
||||
)
|
||||
|
||||
type Environment struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
DockerCompose string `json:"dockerCompose,omitempty" yaml:"docker_compose,omitempty"`
|
||||
|
||||
Environment map[string]interface{} `json:"environment,omitempty" yaml:"environment,omitempty"`
|
||||
|
||||
ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
|
||||
|
||||
HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
Outputs map[string]interface{} `json:"outputs,omitempty" yaml:"outputs,omitempty"`
|
||||
|
||||
PreviousEnvironment map[string]interface{} `json:"previousEnvironment,omitempty" yaml:"previous_environment,omitempty"`
|
||||
|
||||
PreviousExternalId string `json:"previousExternalId,omitempty" yaml:"previous_external_id,omitempty"`
|
||||
|
||||
RancherCompose string `json:"rancherCompose,omitempty" yaml:"rancher_compose,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type EnvironmentCollection struct {
|
||||
Collection
|
||||
Data []Environment `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type EnvironmentClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type EnvironmentOperations interface {
|
||||
List(opts *ListOpts) (*EnvironmentCollection, error)
|
||||
Create(opts *Environment) (*Environment, error)
|
||||
Update(existing *Environment, updates interface{}) (*Environment, error)
|
||||
ById(id string) (*Environment, error)
|
||||
Delete(container *Environment) error
|
||||
|
||||
ActionActivateservices(*Environment) (*Environment, error)
|
||||
|
||||
ActionAddoutputs(*Environment, *AddOutputsInput) (*Environment, error)
|
||||
|
||||
ActionCancelrollback(*Environment) (*Environment, error)
|
||||
|
||||
ActionCancelupgrade(*Environment) (*Environment, error)
|
||||
|
||||
ActionCreate(*Environment) (*Environment, error)
|
||||
|
||||
ActionDeactivateservices(*Environment) (*Environment, error)
|
||||
|
||||
ActionError(*Environment) (*Environment, error)
|
||||
|
||||
ActionExportconfig(*Environment, *ComposeConfigInput) (*ComposeConfig, error)
|
||||
|
||||
ActionFinishupgrade(*Environment) (*Environment, error)
|
||||
|
||||
ActionRemove(*Environment) (*Environment, error)
|
||||
|
||||
ActionRollback(*Environment) (*Environment, error)
|
||||
|
||||
ActionUpdate(*Environment) (*Environment, error)
|
||||
|
||||
ActionUpgrade(*Environment, *EnvironmentUpgrade) (*Environment, error)
|
||||
}
|
||||
|
||||
func newEnvironmentClient(rancherClient *RancherClient) *EnvironmentClient {
|
||||
return &EnvironmentClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *EnvironmentClient) Create(container *Environment) (*Environment, error) {
|
||||
resp := &Environment{}
|
||||
err := c.rancherClient.doCreate(ENVIRONMENT_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *EnvironmentClient) Update(existing *Environment, updates interface{}) (*Environment, error) {
|
||||
resp := &Environment{}
|
||||
err := c.rancherClient.doUpdate(ENVIRONMENT_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *EnvironmentClient) List(opts *ListOpts) (*EnvironmentCollection, error) {
|
||||
resp := &EnvironmentCollection{}
|
||||
err := c.rancherClient.doList(ENVIRONMENT_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *EnvironmentClient) ById(id string) (*Environment, error) {
|
||||
resp := &Environment{}
|
||||
err := c.rancherClient.doById(ENVIRONMENT_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *EnvironmentClient) Delete(container *Environment) error {
|
||||
return c.rancherClient.doResourceDelete(ENVIRONMENT_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *EnvironmentClient) ActionActivateservices(resource *Environment) (*Environment, error) {
|
||||
|
||||
resp := &Environment{}
|
||||
|
||||
err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "activateservices", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *EnvironmentClient) ActionAddoutputs(resource *Environment, input *AddOutputsInput) (*Environment, error) {
|
||||
|
||||
resp := &Environment{}
|
||||
|
||||
err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "addoutputs", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *EnvironmentClient) ActionCancelrollback(resource *Environment) (*Environment, error) {
|
||||
|
||||
resp := &Environment{}
|
||||
|
||||
err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "cancelrollback", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *EnvironmentClient) ActionCancelupgrade(resource *Environment) (*Environment, error) {
|
||||
|
||||
resp := &Environment{}
|
||||
|
||||
err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "cancelupgrade", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *EnvironmentClient) ActionCreate(resource *Environment) (*Environment, error) {
|
||||
|
||||
resp := &Environment{}
|
||||
|
||||
err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *EnvironmentClient) ActionDeactivateservices(resource *Environment) (*Environment, error) {
|
||||
|
||||
resp := &Environment{}
|
||||
|
||||
err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "deactivateservices", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *EnvironmentClient) ActionError(resource *Environment) (*Environment, error) {
|
||||
|
||||
resp := &Environment{}
|
||||
|
||||
err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "error", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *EnvironmentClient) ActionExportconfig(resource *Environment, input *ComposeConfigInput) (*ComposeConfig, error) {
|
||||
|
||||
resp := &ComposeConfig{}
|
||||
|
||||
err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "exportconfig", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *EnvironmentClient) ActionFinishupgrade(resource *Environment) (*Environment, error) {
|
||||
|
||||
resp := &Environment{}
|
||||
|
||||
err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "finishupgrade", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *EnvironmentClient) ActionRemove(resource *Environment) (*Environment, error) {
|
||||
|
||||
resp := &Environment{}
|
||||
|
||||
err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *EnvironmentClient) ActionRollback(resource *Environment) (*Environment, error) {
|
||||
|
||||
resp := &Environment{}
|
||||
|
||||
err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "rollback", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *EnvironmentClient) ActionUpdate(resource *Environment) (*Environment, error) {
|
||||
|
||||
resp := &Environment{}
|
||||
|
||||
err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "update", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *EnvironmentClient) ActionUpgrade(resource *Environment, input *EnvironmentUpgrade) (*Environment, error) {
|
||||
|
||||
resp := &Environment{}
|
||||
|
||||
err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "upgrade", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
73
vendor/github.com/rancher/go-rancher/client/generated_environment_upgrade.go
generated
vendored
73
vendor/github.com/rancher/go-rancher/client/generated_environment_upgrade.go
generated
vendored
@ -1,73 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
ENVIRONMENT_UPGRADE_TYPE = "environmentUpgrade"
|
||||
)
|
||||
|
||||
type EnvironmentUpgrade struct {
|
||||
Resource
|
||||
|
||||
DockerCompose string `json:"dockerCompose,omitempty" yaml:"docker_compose,omitempty"`
|
||||
|
||||
Environment map[string]interface{} `json:"environment,omitempty" yaml:"environment,omitempty"`
|
||||
|
||||
ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
|
||||
|
||||
RancherCompose string `json:"rancherCompose,omitempty" yaml:"rancher_compose,omitempty"`
|
||||
}
|
||||
|
||||
type EnvironmentUpgradeCollection struct {
|
||||
Collection
|
||||
Data []EnvironmentUpgrade `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type EnvironmentUpgradeClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type EnvironmentUpgradeOperations interface {
|
||||
List(opts *ListOpts) (*EnvironmentUpgradeCollection, error)
|
||||
Create(opts *EnvironmentUpgrade) (*EnvironmentUpgrade, error)
|
||||
Update(existing *EnvironmentUpgrade, updates interface{}) (*EnvironmentUpgrade, error)
|
||||
ById(id string) (*EnvironmentUpgrade, error)
|
||||
Delete(container *EnvironmentUpgrade) error
|
||||
}
|
||||
|
||||
func newEnvironmentUpgradeClient(rancherClient *RancherClient) *EnvironmentUpgradeClient {
|
||||
return &EnvironmentUpgradeClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *EnvironmentUpgradeClient) Create(container *EnvironmentUpgrade) (*EnvironmentUpgrade, error) {
|
||||
resp := &EnvironmentUpgrade{}
|
||||
err := c.rancherClient.doCreate(ENVIRONMENT_UPGRADE_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *EnvironmentUpgradeClient) Update(existing *EnvironmentUpgrade, updates interface{}) (*EnvironmentUpgrade, error) {
|
||||
resp := &EnvironmentUpgrade{}
|
||||
err := c.rancherClient.doUpdate(ENVIRONMENT_UPGRADE_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *EnvironmentUpgradeClient) List(opts *ListOpts) (*EnvironmentUpgradeCollection, error) {
|
||||
resp := &EnvironmentUpgradeCollection{}
|
||||
err := c.rancherClient.doList(ENVIRONMENT_UPGRADE_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *EnvironmentUpgradeClient) ById(id string) (*EnvironmentUpgrade, error) {
|
||||
resp := &EnvironmentUpgrade{}
|
||||
err := c.rancherClient.doById(ENVIRONMENT_UPGRADE_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *EnvironmentUpgradeClient) Delete(container *EnvironmentUpgrade) error {
|
||||
return c.rancherClient.doResourceDelete(ENVIRONMENT_UPGRADE_TYPE, &container.Resource)
|
||||
}
|
71
vendor/github.com/rancher/go-rancher/client/generated_extension_implementation.go
generated
vendored
71
vendor/github.com/rancher/go-rancher/client/generated_extension_implementation.go
generated
vendored
@ -1,71 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
EXTENSION_IMPLEMENTATION_TYPE = "extensionImplementation"
|
||||
)
|
||||
|
||||
type ExtensionImplementation struct {
|
||||
Resource
|
||||
|
||||
ClassName string `json:"className,omitempty" yaml:"class_name,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
Properties map[string]interface{} `json:"properties,omitempty" yaml:"properties,omitempty"`
|
||||
}
|
||||
|
||||
type ExtensionImplementationCollection struct {
|
||||
Collection
|
||||
Data []ExtensionImplementation `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ExtensionImplementationClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ExtensionImplementationOperations interface {
|
||||
List(opts *ListOpts) (*ExtensionImplementationCollection, error)
|
||||
Create(opts *ExtensionImplementation) (*ExtensionImplementation, error)
|
||||
Update(existing *ExtensionImplementation, updates interface{}) (*ExtensionImplementation, error)
|
||||
ById(id string) (*ExtensionImplementation, error)
|
||||
Delete(container *ExtensionImplementation) error
|
||||
}
|
||||
|
||||
func newExtensionImplementationClient(rancherClient *RancherClient) *ExtensionImplementationClient {
|
||||
return &ExtensionImplementationClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ExtensionImplementationClient) Create(container *ExtensionImplementation) (*ExtensionImplementation, error) {
|
||||
resp := &ExtensionImplementation{}
|
||||
err := c.rancherClient.doCreate(EXTENSION_IMPLEMENTATION_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExtensionImplementationClient) Update(existing *ExtensionImplementation, updates interface{}) (*ExtensionImplementation, error) {
|
||||
resp := &ExtensionImplementation{}
|
||||
err := c.rancherClient.doUpdate(EXTENSION_IMPLEMENTATION_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExtensionImplementationClient) List(opts *ListOpts) (*ExtensionImplementationCollection, error) {
|
||||
resp := &ExtensionImplementationCollection{}
|
||||
err := c.rancherClient.doList(EXTENSION_IMPLEMENTATION_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExtensionImplementationClient) ById(id string) (*ExtensionImplementation, error) {
|
||||
resp := &ExtensionImplementation{}
|
||||
err := c.rancherClient.doById(EXTENSION_IMPLEMENTATION_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExtensionImplementationClient) Delete(container *ExtensionImplementation) error {
|
||||
return c.rancherClient.doResourceDelete(EXTENSION_IMPLEMENTATION_TYPE, &container.Resource)
|
||||
}
|
75
vendor/github.com/rancher/go-rancher/client/generated_extension_point.go
generated
vendored
75
vendor/github.com/rancher/go-rancher/client/generated_extension_point.go
generated
vendored
@ -1,75 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
EXTENSION_POINT_TYPE = "extensionPoint"
|
||||
)
|
||||
|
||||
type ExtensionPoint struct {
|
||||
Resource
|
||||
|
||||
ExcludeSetting string `json:"excludeSetting,omitempty" yaml:"exclude_setting,omitempty"`
|
||||
|
||||
Implementations []interface{} `json:"implementations,omitempty" yaml:"implementations,omitempty"`
|
||||
|
||||
IncludeSetting string `json:"includeSetting,omitempty" yaml:"include_setting,omitempty"`
|
||||
|
||||
ListSetting string `json:"listSetting,omitempty" yaml:"list_setting,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
}
|
||||
|
||||
type ExtensionPointCollection struct {
|
||||
Collection
|
||||
Data []ExtensionPoint `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ExtensionPointClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ExtensionPointOperations interface {
|
||||
List(opts *ListOpts) (*ExtensionPointCollection, error)
|
||||
Create(opts *ExtensionPoint) (*ExtensionPoint, error)
|
||||
Update(existing *ExtensionPoint, updates interface{}) (*ExtensionPoint, error)
|
||||
ById(id string) (*ExtensionPoint, error)
|
||||
Delete(container *ExtensionPoint) error
|
||||
}
|
||||
|
||||
func newExtensionPointClient(rancherClient *RancherClient) *ExtensionPointClient {
|
||||
return &ExtensionPointClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ExtensionPointClient) Create(container *ExtensionPoint) (*ExtensionPoint, error) {
|
||||
resp := &ExtensionPoint{}
|
||||
err := c.rancherClient.doCreate(EXTENSION_POINT_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExtensionPointClient) Update(existing *ExtensionPoint, updates interface{}) (*ExtensionPoint, error) {
|
||||
resp := &ExtensionPoint{}
|
||||
err := c.rancherClient.doUpdate(EXTENSION_POINT_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExtensionPointClient) List(opts *ListOpts) (*ExtensionPointCollection, error) {
|
||||
resp := &ExtensionPointCollection{}
|
||||
err := c.rancherClient.doList(EXTENSION_POINT_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExtensionPointClient) ById(id string) (*ExtensionPoint, error) {
|
||||
resp := &ExtensionPoint{}
|
||||
err := c.rancherClient.doById(EXTENSION_POINT_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExtensionPointClient) Delete(container *ExtensionPoint) error {
|
||||
return c.rancherClient.doResourceDelete(EXTENSION_POINT_TYPE, &container.Resource)
|
||||
}
|
117
vendor/github.com/rancher/go-rancher/client/generated_external_dns_event.go
generated
vendored
117
vendor/github.com/rancher/go-rancher/client/generated_external_dns_event.go
generated
vendored
@ -1,117 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
EXTERNAL_DNS_EVENT_TYPE = "externalDnsEvent"
|
||||
)
|
||||
|
||||
type ExternalDnsEvent struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
EventType string `json:"eventType,omitempty" yaml:"event_type,omitempty"`
|
||||
|
||||
ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
|
||||
|
||||
Fqdn string `json:"fqdn,omitempty" yaml:"fqdn,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
ReportedAccountId string `json:"reportedAccountId,omitempty" yaml:"reported_account_id,omitempty"`
|
||||
|
||||
ServiceName string `json:"serviceName,omitempty" yaml:"service_name,omitempty"`
|
||||
|
||||
StackName string `json:"stackName,omitempty" yaml:"stack_name,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type ExternalDnsEventCollection struct {
|
||||
Collection
|
||||
Data []ExternalDnsEvent `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ExternalDnsEventClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ExternalDnsEventOperations interface {
|
||||
List(opts *ListOpts) (*ExternalDnsEventCollection, error)
|
||||
Create(opts *ExternalDnsEvent) (*ExternalDnsEvent, error)
|
||||
Update(existing *ExternalDnsEvent, updates interface{}) (*ExternalDnsEvent, error)
|
||||
ById(id string) (*ExternalDnsEvent, error)
|
||||
Delete(container *ExternalDnsEvent) error
|
||||
|
||||
ActionCreate(*ExternalDnsEvent) (*ExternalEvent, error)
|
||||
|
||||
ActionRemove(*ExternalDnsEvent) (*ExternalEvent, error)
|
||||
}
|
||||
|
||||
func newExternalDnsEventClient(rancherClient *RancherClient) *ExternalDnsEventClient {
|
||||
return &ExternalDnsEventClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ExternalDnsEventClient) Create(container *ExternalDnsEvent) (*ExternalDnsEvent, error) {
|
||||
resp := &ExternalDnsEvent{}
|
||||
err := c.rancherClient.doCreate(EXTERNAL_DNS_EVENT_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalDnsEventClient) Update(existing *ExternalDnsEvent, updates interface{}) (*ExternalDnsEvent, error) {
|
||||
resp := &ExternalDnsEvent{}
|
||||
err := c.rancherClient.doUpdate(EXTERNAL_DNS_EVENT_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalDnsEventClient) List(opts *ListOpts) (*ExternalDnsEventCollection, error) {
|
||||
resp := &ExternalDnsEventCollection{}
|
||||
err := c.rancherClient.doList(EXTERNAL_DNS_EVENT_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalDnsEventClient) ById(id string) (*ExternalDnsEvent, error) {
|
||||
resp := &ExternalDnsEvent{}
|
||||
err := c.rancherClient.doById(EXTERNAL_DNS_EVENT_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalDnsEventClient) Delete(container *ExternalDnsEvent) error {
|
||||
return c.rancherClient.doResourceDelete(EXTERNAL_DNS_EVENT_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *ExternalDnsEventClient) ActionCreate(resource *ExternalDnsEvent) (*ExternalEvent, error) {
|
||||
|
||||
resp := &ExternalEvent{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_DNS_EVENT_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalDnsEventClient) ActionRemove(resource *ExternalDnsEvent) (*ExternalEvent, error) {
|
||||
|
||||
resp := &ExternalEvent{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_DNS_EVENT_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
111
vendor/github.com/rancher/go-rancher/client/generated_external_event.go
generated
vendored
111
vendor/github.com/rancher/go-rancher/client/generated_external_event.go
generated
vendored
@ -1,111 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
EXTERNAL_EVENT_TYPE = "externalEvent"
|
||||
)
|
||||
|
||||
type ExternalEvent struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
EventType string `json:"eventType,omitempty" yaml:"event_type,omitempty"`
|
||||
|
||||
ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
ReportedAccountId string `json:"reportedAccountId,omitempty" yaml:"reported_account_id,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type ExternalEventCollection struct {
|
||||
Collection
|
||||
Data []ExternalEvent `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ExternalEventClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ExternalEventOperations interface {
|
||||
List(opts *ListOpts) (*ExternalEventCollection, error)
|
||||
Create(opts *ExternalEvent) (*ExternalEvent, error)
|
||||
Update(existing *ExternalEvent, updates interface{}) (*ExternalEvent, error)
|
||||
ById(id string) (*ExternalEvent, error)
|
||||
Delete(container *ExternalEvent) error
|
||||
|
||||
ActionCreate(*ExternalEvent) (*ExternalEvent, error)
|
||||
|
||||
ActionRemove(*ExternalEvent) (*ExternalEvent, error)
|
||||
}
|
||||
|
||||
func newExternalEventClient(rancherClient *RancherClient) *ExternalEventClient {
|
||||
return &ExternalEventClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ExternalEventClient) Create(container *ExternalEvent) (*ExternalEvent, error) {
|
||||
resp := &ExternalEvent{}
|
||||
err := c.rancherClient.doCreate(EXTERNAL_EVENT_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalEventClient) Update(existing *ExternalEvent, updates interface{}) (*ExternalEvent, error) {
|
||||
resp := &ExternalEvent{}
|
||||
err := c.rancherClient.doUpdate(EXTERNAL_EVENT_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalEventClient) List(opts *ListOpts) (*ExternalEventCollection, error) {
|
||||
resp := &ExternalEventCollection{}
|
||||
err := c.rancherClient.doList(EXTERNAL_EVENT_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalEventClient) ById(id string) (*ExternalEvent, error) {
|
||||
resp := &ExternalEvent{}
|
||||
err := c.rancherClient.doById(EXTERNAL_EVENT_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalEventClient) Delete(container *ExternalEvent) error {
|
||||
return c.rancherClient.doResourceDelete(EXTERNAL_EVENT_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *ExternalEventClient) ActionCreate(resource *ExternalEvent) (*ExternalEvent, error) {
|
||||
|
||||
resp := &ExternalEvent{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_EVENT_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalEventClient) ActionRemove(resource *ExternalEvent) (*ExternalEvent, error) {
|
||||
|
||||
resp := &ExternalEvent{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_EVENT_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
174
vendor/github.com/rancher/go-rancher/client/generated_external_handler.go
generated
vendored
174
vendor/github.com/rancher/go-rancher/client/generated_external_handler.go
generated
vendored
@ -1,174 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
EXTERNAL_HANDLER_TYPE = "externalHandler"
|
||||
)
|
||||
|
||||
type ExternalHandler struct {
|
||||
Resource
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
Priority int64 `json:"priority,omitempty" yaml:"priority,omitempty"`
|
||||
|
||||
ProcessConfigs []interface{} `json:"processConfigs,omitempty" yaml:"process_configs,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
Retries int64 `json:"retries,omitempty" yaml:"retries,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
TimeoutMillis int64 `json:"timeoutMillis,omitempty" yaml:"timeout_millis,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type ExternalHandlerCollection struct {
|
||||
Collection
|
||||
Data []ExternalHandler `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ExternalHandlerClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ExternalHandlerOperations interface {
|
||||
List(opts *ListOpts) (*ExternalHandlerCollection, error)
|
||||
Create(opts *ExternalHandler) (*ExternalHandler, error)
|
||||
Update(existing *ExternalHandler, updates interface{}) (*ExternalHandler, error)
|
||||
ById(id string) (*ExternalHandler, error)
|
||||
Delete(container *ExternalHandler) error
|
||||
|
||||
ActionActivate(*ExternalHandler) (*ExternalHandler, error)
|
||||
|
||||
ActionCreate(*ExternalHandler) (*ExternalHandler, error)
|
||||
|
||||
ActionDeactivate(*ExternalHandler) (*ExternalHandler, error)
|
||||
|
||||
ActionPurge(*ExternalHandler) (*ExternalHandler, error)
|
||||
|
||||
ActionRemove(*ExternalHandler) (*ExternalHandler, error)
|
||||
|
||||
ActionRestore(*ExternalHandler) (*ExternalHandler, error)
|
||||
|
||||
ActionUpdate(*ExternalHandler) (*ExternalHandler, error)
|
||||
}
|
||||
|
||||
func newExternalHandlerClient(rancherClient *RancherClient) *ExternalHandlerClient {
|
||||
return &ExternalHandlerClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerClient) Create(container *ExternalHandler) (*ExternalHandler, error) {
|
||||
resp := &ExternalHandler{}
|
||||
err := c.rancherClient.doCreate(EXTERNAL_HANDLER_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerClient) Update(existing *ExternalHandler, updates interface{}) (*ExternalHandler, error) {
|
||||
resp := &ExternalHandler{}
|
||||
err := c.rancherClient.doUpdate(EXTERNAL_HANDLER_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerClient) List(opts *ListOpts) (*ExternalHandlerCollection, error) {
|
||||
resp := &ExternalHandlerCollection{}
|
||||
err := c.rancherClient.doList(EXTERNAL_HANDLER_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerClient) ById(id string) (*ExternalHandler, error) {
|
||||
resp := &ExternalHandler{}
|
||||
err := c.rancherClient.doById(EXTERNAL_HANDLER_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerClient) Delete(container *ExternalHandler) error {
|
||||
return c.rancherClient.doResourceDelete(EXTERNAL_HANDLER_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerClient) ActionActivate(resource *ExternalHandler) (*ExternalHandler, error) {
|
||||
|
||||
resp := &ExternalHandler{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_HANDLER_TYPE, "activate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerClient) ActionCreate(resource *ExternalHandler) (*ExternalHandler, error) {
|
||||
|
||||
resp := &ExternalHandler{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_HANDLER_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerClient) ActionDeactivate(resource *ExternalHandler) (*ExternalHandler, error) {
|
||||
|
||||
resp := &ExternalHandler{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_HANDLER_TYPE, "deactivate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerClient) ActionPurge(resource *ExternalHandler) (*ExternalHandler, error) {
|
||||
|
||||
resp := &ExternalHandler{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_HANDLER_TYPE, "purge", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerClient) ActionRemove(resource *ExternalHandler) (*ExternalHandler, error) {
|
||||
|
||||
resp := &ExternalHandler{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_HANDLER_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerClient) ActionRestore(resource *ExternalHandler) (*ExternalHandler, error) {
|
||||
|
||||
resp := &ExternalHandler{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_HANDLER_TYPE, "restore", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerClient) ActionUpdate(resource *ExternalHandler) (*ExternalHandler, error) {
|
||||
|
||||
resp := &ExternalHandler{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_HANDLER_TYPE, "update", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
@ -1,172 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE = "externalHandlerExternalHandlerProcessMap"
|
||||
)
|
||||
|
||||
type ExternalHandlerExternalHandlerProcessMap struct {
|
||||
Resource
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
ExternalHandlerId string `json:"externalHandlerId,omitempty" yaml:"external_handler_id,omitempty"`
|
||||
|
||||
ExternalHandlerProcessId string `json:"externalHandlerProcessId,omitempty" yaml:"external_handler_process_id,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
OnError string `json:"onError,omitempty" yaml:"on_error,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type ExternalHandlerExternalHandlerProcessMapCollection struct {
|
||||
Collection
|
||||
Data []ExternalHandlerExternalHandlerProcessMap `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ExternalHandlerExternalHandlerProcessMapClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ExternalHandlerExternalHandlerProcessMapOperations interface {
|
||||
List(opts *ListOpts) (*ExternalHandlerExternalHandlerProcessMapCollection, error)
|
||||
Create(opts *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error)
|
||||
Update(existing *ExternalHandlerExternalHandlerProcessMap, updates interface{}) (*ExternalHandlerExternalHandlerProcessMap, error)
|
||||
ById(id string) (*ExternalHandlerExternalHandlerProcessMap, error)
|
||||
Delete(container *ExternalHandlerExternalHandlerProcessMap) error
|
||||
|
||||
ActionActivate(*ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error)
|
||||
|
||||
ActionCreate(*ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error)
|
||||
|
||||
ActionDeactivate(*ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error)
|
||||
|
||||
ActionPurge(*ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error)
|
||||
|
||||
ActionRemove(*ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error)
|
||||
|
||||
ActionRestore(*ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error)
|
||||
|
||||
ActionUpdate(*ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error)
|
||||
}
|
||||
|
||||
func newExternalHandlerExternalHandlerProcessMapClient(rancherClient *RancherClient) *ExternalHandlerExternalHandlerProcessMapClient {
|
||||
return &ExternalHandlerExternalHandlerProcessMapClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerExternalHandlerProcessMapClient) Create(container *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) {
|
||||
resp := &ExternalHandlerExternalHandlerProcessMap{}
|
||||
err := c.rancherClient.doCreate(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerExternalHandlerProcessMapClient) Update(existing *ExternalHandlerExternalHandlerProcessMap, updates interface{}) (*ExternalHandlerExternalHandlerProcessMap, error) {
|
||||
resp := &ExternalHandlerExternalHandlerProcessMap{}
|
||||
err := c.rancherClient.doUpdate(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerExternalHandlerProcessMapClient) List(opts *ListOpts) (*ExternalHandlerExternalHandlerProcessMapCollection, error) {
|
||||
resp := &ExternalHandlerExternalHandlerProcessMapCollection{}
|
||||
err := c.rancherClient.doList(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerExternalHandlerProcessMapClient) ById(id string) (*ExternalHandlerExternalHandlerProcessMap, error) {
|
||||
resp := &ExternalHandlerExternalHandlerProcessMap{}
|
||||
err := c.rancherClient.doById(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerExternalHandlerProcessMapClient) Delete(container *ExternalHandlerExternalHandlerProcessMap) error {
|
||||
return c.rancherClient.doResourceDelete(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerExternalHandlerProcessMapClient) ActionActivate(resource *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) {
|
||||
|
||||
resp := &ExternalHandlerExternalHandlerProcessMap{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, "activate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerExternalHandlerProcessMapClient) ActionCreate(resource *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) {
|
||||
|
||||
resp := &ExternalHandlerExternalHandlerProcessMap{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerExternalHandlerProcessMapClient) ActionDeactivate(resource *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) {
|
||||
|
||||
resp := &ExternalHandlerExternalHandlerProcessMap{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, "deactivate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerExternalHandlerProcessMapClient) ActionPurge(resource *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) {
|
||||
|
||||
resp := &ExternalHandlerExternalHandlerProcessMap{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, "purge", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerExternalHandlerProcessMapClient) ActionRemove(resource *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) {
|
||||
|
||||
resp := &ExternalHandlerExternalHandlerProcessMap{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerExternalHandlerProcessMapClient) ActionRestore(resource *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) {
|
||||
|
||||
resp := &ExternalHandlerExternalHandlerProcessMap{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, "restore", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerExternalHandlerProcessMapClient) ActionUpdate(resource *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) {
|
||||
|
||||
resp := &ExternalHandlerExternalHandlerProcessMap{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, "update", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
166
vendor/github.com/rancher/go-rancher/client/generated_external_handler_process.go
generated
vendored
166
vendor/github.com/rancher/go-rancher/client/generated_external_handler_process.go
generated
vendored
@ -1,166 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
EXTERNAL_HANDLER_PROCESS_TYPE = "externalHandlerProcess"
|
||||
)
|
||||
|
||||
type ExternalHandlerProcess struct {
|
||||
Resource
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type ExternalHandlerProcessCollection struct {
|
||||
Collection
|
||||
Data []ExternalHandlerProcess `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ExternalHandlerProcessClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ExternalHandlerProcessOperations interface {
|
||||
List(opts *ListOpts) (*ExternalHandlerProcessCollection, error)
|
||||
Create(opts *ExternalHandlerProcess) (*ExternalHandlerProcess, error)
|
||||
Update(existing *ExternalHandlerProcess, updates interface{}) (*ExternalHandlerProcess, error)
|
||||
ById(id string) (*ExternalHandlerProcess, error)
|
||||
Delete(container *ExternalHandlerProcess) error
|
||||
|
||||
ActionActivate(*ExternalHandlerProcess) (*ExternalHandlerProcess, error)
|
||||
|
||||
ActionCreate(*ExternalHandlerProcess) (*ExternalHandlerProcess, error)
|
||||
|
||||
ActionDeactivate(*ExternalHandlerProcess) (*ExternalHandlerProcess, error)
|
||||
|
||||
ActionPurge(*ExternalHandlerProcess) (*ExternalHandlerProcess, error)
|
||||
|
||||
ActionRemove(*ExternalHandlerProcess) (*ExternalHandlerProcess, error)
|
||||
|
||||
ActionRestore(*ExternalHandlerProcess) (*ExternalHandlerProcess, error)
|
||||
|
||||
ActionUpdate(*ExternalHandlerProcess) (*ExternalHandlerProcess, error)
|
||||
}
|
||||
|
||||
func newExternalHandlerProcessClient(rancherClient *RancherClient) *ExternalHandlerProcessClient {
|
||||
return &ExternalHandlerProcessClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerProcessClient) Create(container *ExternalHandlerProcess) (*ExternalHandlerProcess, error) {
|
||||
resp := &ExternalHandlerProcess{}
|
||||
err := c.rancherClient.doCreate(EXTERNAL_HANDLER_PROCESS_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerProcessClient) Update(existing *ExternalHandlerProcess, updates interface{}) (*ExternalHandlerProcess, error) {
|
||||
resp := &ExternalHandlerProcess{}
|
||||
err := c.rancherClient.doUpdate(EXTERNAL_HANDLER_PROCESS_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerProcessClient) List(opts *ListOpts) (*ExternalHandlerProcessCollection, error) {
|
||||
resp := &ExternalHandlerProcessCollection{}
|
||||
err := c.rancherClient.doList(EXTERNAL_HANDLER_PROCESS_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerProcessClient) ById(id string) (*ExternalHandlerProcess, error) {
|
||||
resp := &ExternalHandlerProcess{}
|
||||
err := c.rancherClient.doById(EXTERNAL_HANDLER_PROCESS_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerProcessClient) Delete(container *ExternalHandlerProcess) error {
|
||||
return c.rancherClient.doResourceDelete(EXTERNAL_HANDLER_PROCESS_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerProcessClient) ActionActivate(resource *ExternalHandlerProcess) (*ExternalHandlerProcess, error) {
|
||||
|
||||
resp := &ExternalHandlerProcess{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_HANDLER_PROCESS_TYPE, "activate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerProcessClient) ActionCreate(resource *ExternalHandlerProcess) (*ExternalHandlerProcess, error) {
|
||||
|
||||
resp := &ExternalHandlerProcess{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_HANDLER_PROCESS_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerProcessClient) ActionDeactivate(resource *ExternalHandlerProcess) (*ExternalHandlerProcess, error) {
|
||||
|
||||
resp := &ExternalHandlerProcess{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_HANDLER_PROCESS_TYPE, "deactivate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerProcessClient) ActionPurge(resource *ExternalHandlerProcess) (*ExternalHandlerProcess, error) {
|
||||
|
||||
resp := &ExternalHandlerProcess{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_HANDLER_PROCESS_TYPE, "purge", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerProcessClient) ActionRemove(resource *ExternalHandlerProcess) (*ExternalHandlerProcess, error) {
|
||||
|
||||
resp := &ExternalHandlerProcess{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_HANDLER_PROCESS_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerProcessClient) ActionRestore(resource *ExternalHandlerProcess) (*ExternalHandlerProcess, error) {
|
||||
|
||||
resp := &ExternalHandlerProcess{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_HANDLER_PROCESS_TYPE, "restore", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerProcessClient) ActionUpdate(resource *ExternalHandlerProcess) (*ExternalHandlerProcess, error) {
|
||||
|
||||
resp := &ExternalHandlerProcess{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_HANDLER_PROCESS_TYPE, "update", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
69
vendor/github.com/rancher/go-rancher/client/generated_external_handler_process_config.go
generated
vendored
69
vendor/github.com/rancher/go-rancher/client/generated_external_handler_process_config.go
generated
vendored
@ -1,69 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
EXTERNAL_HANDLER_PROCESS_CONFIG_TYPE = "externalHandlerProcessConfig"
|
||||
)
|
||||
|
||||
type ExternalHandlerProcessConfig struct {
|
||||
Resource
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
OnError string `json:"onError,omitempty" yaml:"on_error,omitempty"`
|
||||
}
|
||||
|
||||
type ExternalHandlerProcessConfigCollection struct {
|
||||
Collection
|
||||
Data []ExternalHandlerProcessConfig `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ExternalHandlerProcessConfigClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ExternalHandlerProcessConfigOperations interface {
|
||||
List(opts *ListOpts) (*ExternalHandlerProcessConfigCollection, error)
|
||||
Create(opts *ExternalHandlerProcessConfig) (*ExternalHandlerProcessConfig, error)
|
||||
Update(existing *ExternalHandlerProcessConfig, updates interface{}) (*ExternalHandlerProcessConfig, error)
|
||||
ById(id string) (*ExternalHandlerProcessConfig, error)
|
||||
Delete(container *ExternalHandlerProcessConfig) error
|
||||
}
|
||||
|
||||
func newExternalHandlerProcessConfigClient(rancherClient *RancherClient) *ExternalHandlerProcessConfigClient {
|
||||
return &ExternalHandlerProcessConfigClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerProcessConfigClient) Create(container *ExternalHandlerProcessConfig) (*ExternalHandlerProcessConfig, error) {
|
||||
resp := &ExternalHandlerProcessConfig{}
|
||||
err := c.rancherClient.doCreate(EXTERNAL_HANDLER_PROCESS_CONFIG_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerProcessConfigClient) Update(existing *ExternalHandlerProcessConfig, updates interface{}) (*ExternalHandlerProcessConfig, error) {
|
||||
resp := &ExternalHandlerProcessConfig{}
|
||||
err := c.rancherClient.doUpdate(EXTERNAL_HANDLER_PROCESS_CONFIG_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerProcessConfigClient) List(opts *ListOpts) (*ExternalHandlerProcessConfigCollection, error) {
|
||||
resp := &ExternalHandlerProcessConfigCollection{}
|
||||
err := c.rancherClient.doList(EXTERNAL_HANDLER_PROCESS_CONFIG_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerProcessConfigClient) ById(id string) (*ExternalHandlerProcessConfig, error) {
|
||||
resp := &ExternalHandlerProcessConfig{}
|
||||
err := c.rancherClient.doById(EXTERNAL_HANDLER_PROCESS_CONFIG_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHandlerProcessConfigClient) Delete(container *ExternalHandlerProcessConfig) error {
|
||||
return c.rancherClient.doResourceDelete(EXTERNAL_HANDLER_PROCESS_CONFIG_TYPE, &container.Resource)
|
||||
}
|
117
vendor/github.com/rancher/go-rancher/client/generated_external_host_event.go
generated
vendored
117
vendor/github.com/rancher/go-rancher/client/generated_external_host_event.go
generated
vendored
@ -1,117 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
EXTERNAL_HOST_EVENT_TYPE = "externalHostEvent"
|
||||
)
|
||||
|
||||
type ExternalHostEvent struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
DeleteHost bool `json:"deleteHost,omitempty" yaml:"delete_host,omitempty"`
|
||||
|
||||
EventType string `json:"eventType,omitempty" yaml:"event_type,omitempty"`
|
||||
|
||||
ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
|
||||
|
||||
HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"`
|
||||
|
||||
HostLabel string `json:"hostLabel,omitempty" yaml:"host_label,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
ReportedAccountId string `json:"reportedAccountId,omitempty" yaml:"reported_account_id,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type ExternalHostEventCollection struct {
|
||||
Collection
|
||||
Data []ExternalHostEvent `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ExternalHostEventClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ExternalHostEventOperations interface {
|
||||
List(opts *ListOpts) (*ExternalHostEventCollection, error)
|
||||
Create(opts *ExternalHostEvent) (*ExternalHostEvent, error)
|
||||
Update(existing *ExternalHostEvent, updates interface{}) (*ExternalHostEvent, error)
|
||||
ById(id string) (*ExternalHostEvent, error)
|
||||
Delete(container *ExternalHostEvent) error
|
||||
|
||||
ActionCreate(*ExternalHostEvent) (*ExternalEvent, error)
|
||||
|
||||
ActionRemove(*ExternalHostEvent) (*ExternalEvent, error)
|
||||
}
|
||||
|
||||
func newExternalHostEventClient(rancherClient *RancherClient) *ExternalHostEventClient {
|
||||
return &ExternalHostEventClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ExternalHostEventClient) Create(container *ExternalHostEvent) (*ExternalHostEvent, error) {
|
||||
resp := &ExternalHostEvent{}
|
||||
err := c.rancherClient.doCreate(EXTERNAL_HOST_EVENT_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHostEventClient) Update(existing *ExternalHostEvent, updates interface{}) (*ExternalHostEvent, error) {
|
||||
resp := &ExternalHostEvent{}
|
||||
err := c.rancherClient.doUpdate(EXTERNAL_HOST_EVENT_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHostEventClient) List(opts *ListOpts) (*ExternalHostEventCollection, error) {
|
||||
resp := &ExternalHostEventCollection{}
|
||||
err := c.rancherClient.doList(EXTERNAL_HOST_EVENT_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHostEventClient) ById(id string) (*ExternalHostEvent, error) {
|
||||
resp := &ExternalHostEvent{}
|
||||
err := c.rancherClient.doById(EXTERNAL_HOST_EVENT_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHostEventClient) Delete(container *ExternalHostEvent) error {
|
||||
return c.rancherClient.doResourceDelete(EXTERNAL_HOST_EVENT_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *ExternalHostEventClient) ActionCreate(resource *ExternalHostEvent) (*ExternalEvent, error) {
|
||||
|
||||
resp := &ExternalEvent{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_HOST_EVENT_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalHostEventClient) ActionRemove(resource *ExternalHostEvent) (*ExternalEvent, error) {
|
||||
|
||||
resp := &ExternalEvent{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_HOST_EVENT_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
234
vendor/github.com/rancher/go-rancher/client/generated_external_service.go
generated
vendored
234
vendor/github.com/rancher/go-rancher/client/generated_external_service.go
generated
vendored
@ -1,234 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
EXTERNAL_SERVICE_TYPE = "externalService"
|
||||
)
|
||||
|
||||
type ExternalService struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
EnvironmentId string `json:"environmentId,omitempty" yaml:"environment_id,omitempty"`
|
||||
|
||||
ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
|
||||
|
||||
ExternalIpAddresses []string `json:"externalIpAddresses,omitempty" yaml:"external_ip_addresses,omitempty"`
|
||||
|
||||
Fqdn string `json:"fqdn,omitempty" yaml:"fqdn,omitempty"`
|
||||
|
||||
HealthCheck *InstanceHealthCheck `json:"healthCheck,omitempty" yaml:"health_check,omitempty"`
|
||||
|
||||
HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"`
|
||||
|
||||
Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
LaunchConfig *LaunchConfig `json:"launchConfig,omitempty" yaml:"launch_config,omitempty"`
|
||||
|
||||
Metadata map[string]interface{} `json:"metadata,omitempty" yaml:"metadata,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Upgrade *ServiceUpgrade `json:"upgrade,omitempty" yaml:"upgrade,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type ExternalServiceCollection struct {
|
||||
Collection
|
||||
Data []ExternalService `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ExternalServiceClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ExternalServiceOperations interface {
|
||||
List(opts *ListOpts) (*ExternalServiceCollection, error)
|
||||
Create(opts *ExternalService) (*ExternalService, error)
|
||||
Update(existing *ExternalService, updates interface{}) (*ExternalService, error)
|
||||
ById(id string) (*ExternalService, error)
|
||||
Delete(container *ExternalService) error
|
||||
|
||||
ActionActivate(*ExternalService) (*Service, error)
|
||||
|
||||
ActionCancelrollback(*ExternalService) (*Service, error)
|
||||
|
||||
ActionCancelupgrade(*ExternalService) (*Service, error)
|
||||
|
||||
ActionCreate(*ExternalService) (*Service, error)
|
||||
|
||||
ActionDeactivate(*ExternalService) (*Service, error)
|
||||
|
||||
ActionFinishupgrade(*ExternalService) (*Service, error)
|
||||
|
||||
ActionRemove(*ExternalService) (*Service, error)
|
||||
|
||||
ActionRestart(*ExternalService, *ServiceRestart) (*Service, error)
|
||||
|
||||
ActionRollback(*ExternalService) (*Service, error)
|
||||
|
||||
ActionUpdate(*ExternalService) (*Service, error)
|
||||
|
||||
ActionUpgrade(*ExternalService, *ServiceUpgrade) (*Service, error)
|
||||
}
|
||||
|
||||
func newExternalServiceClient(rancherClient *RancherClient) *ExternalServiceClient {
|
||||
return &ExternalServiceClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ExternalServiceClient) Create(container *ExternalService) (*ExternalService, error) {
|
||||
resp := &ExternalService{}
|
||||
err := c.rancherClient.doCreate(EXTERNAL_SERVICE_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalServiceClient) Update(existing *ExternalService, updates interface{}) (*ExternalService, error) {
|
||||
resp := &ExternalService{}
|
||||
err := c.rancherClient.doUpdate(EXTERNAL_SERVICE_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalServiceClient) List(opts *ListOpts) (*ExternalServiceCollection, error) {
|
||||
resp := &ExternalServiceCollection{}
|
||||
err := c.rancherClient.doList(EXTERNAL_SERVICE_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalServiceClient) ById(id string) (*ExternalService, error) {
|
||||
resp := &ExternalService{}
|
||||
err := c.rancherClient.doById(EXTERNAL_SERVICE_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalServiceClient) Delete(container *ExternalService) error {
|
||||
return c.rancherClient.doResourceDelete(EXTERNAL_SERVICE_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *ExternalServiceClient) ActionActivate(resource *ExternalService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "activate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalServiceClient) ActionCancelrollback(resource *ExternalService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "cancelrollback", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalServiceClient) ActionCancelupgrade(resource *ExternalService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "cancelupgrade", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalServiceClient) ActionCreate(resource *ExternalService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalServiceClient) ActionDeactivate(resource *ExternalService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "deactivate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalServiceClient) ActionFinishupgrade(resource *ExternalService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "finishupgrade", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalServiceClient) ActionRemove(resource *ExternalService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalServiceClient) ActionRestart(resource *ExternalService, input *ServiceRestart) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "restart", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalServiceClient) ActionRollback(resource *ExternalService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "rollback", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalServiceClient) ActionUpdate(resource *ExternalService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "update", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalServiceClient) ActionUpgrade(resource *ExternalService, input *ServiceUpgrade) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "upgrade", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
115
vendor/github.com/rancher/go-rancher/client/generated_external_service_event.go
generated
vendored
115
vendor/github.com/rancher/go-rancher/client/generated_external_service_event.go
generated
vendored
@ -1,115 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
EXTERNAL_SERVICE_EVENT_TYPE = "externalServiceEvent"
|
||||
)
|
||||
|
||||
type ExternalServiceEvent struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
Environment interface{} `json:"environment,omitempty" yaml:"environment,omitempty"`
|
||||
|
||||
EventType string `json:"eventType,omitempty" yaml:"event_type,omitempty"`
|
||||
|
||||
ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
ReportedAccountId string `json:"reportedAccountId,omitempty" yaml:"reported_account_id,omitempty"`
|
||||
|
||||
Service interface{} `json:"service,omitempty" yaml:"service,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type ExternalServiceEventCollection struct {
|
||||
Collection
|
||||
Data []ExternalServiceEvent `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ExternalServiceEventClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ExternalServiceEventOperations interface {
|
||||
List(opts *ListOpts) (*ExternalServiceEventCollection, error)
|
||||
Create(opts *ExternalServiceEvent) (*ExternalServiceEvent, error)
|
||||
Update(existing *ExternalServiceEvent, updates interface{}) (*ExternalServiceEvent, error)
|
||||
ById(id string) (*ExternalServiceEvent, error)
|
||||
Delete(container *ExternalServiceEvent) error
|
||||
|
||||
ActionCreate(*ExternalServiceEvent) (*ExternalEvent, error)
|
||||
|
||||
ActionRemove(*ExternalServiceEvent) (*ExternalEvent, error)
|
||||
}
|
||||
|
||||
func newExternalServiceEventClient(rancherClient *RancherClient) *ExternalServiceEventClient {
|
||||
return &ExternalServiceEventClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ExternalServiceEventClient) Create(container *ExternalServiceEvent) (*ExternalServiceEvent, error) {
|
||||
resp := &ExternalServiceEvent{}
|
||||
err := c.rancherClient.doCreate(EXTERNAL_SERVICE_EVENT_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalServiceEventClient) Update(existing *ExternalServiceEvent, updates interface{}) (*ExternalServiceEvent, error) {
|
||||
resp := &ExternalServiceEvent{}
|
||||
err := c.rancherClient.doUpdate(EXTERNAL_SERVICE_EVENT_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalServiceEventClient) List(opts *ListOpts) (*ExternalServiceEventCollection, error) {
|
||||
resp := &ExternalServiceEventCollection{}
|
||||
err := c.rancherClient.doList(EXTERNAL_SERVICE_EVENT_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalServiceEventClient) ById(id string) (*ExternalServiceEvent, error) {
|
||||
resp := &ExternalServiceEvent{}
|
||||
err := c.rancherClient.doById(EXTERNAL_SERVICE_EVENT_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalServiceEventClient) Delete(container *ExternalServiceEvent) error {
|
||||
return c.rancherClient.doResourceDelete(EXTERNAL_SERVICE_EVENT_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *ExternalServiceEventClient) ActionCreate(resource *ExternalServiceEvent) (*ExternalEvent, error) {
|
||||
|
||||
resp := &ExternalEvent{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_SERVICE_EVENT_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalServiceEventClient) ActionRemove(resource *ExternalServiceEvent) (*ExternalEvent, error) {
|
||||
|
||||
resp := &ExternalEvent{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_SERVICE_EVENT_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
115
vendor/github.com/rancher/go-rancher/client/generated_external_storage_pool_event.go
generated
vendored
115
vendor/github.com/rancher/go-rancher/client/generated_external_storage_pool_event.go
generated
vendored
@ -1,115 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
EXTERNAL_STORAGE_POOL_EVENT_TYPE = "externalStoragePoolEvent"
|
||||
)
|
||||
|
||||
type ExternalStoragePoolEvent struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
EventType string `json:"eventType,omitempty" yaml:"event_type,omitempty"`
|
||||
|
||||
ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
|
||||
|
||||
HostUuids []string `json:"hostUuids,omitempty" yaml:"host_uuids,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
ReportedAccountId string `json:"reportedAccountId,omitempty" yaml:"reported_account_id,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
StoragePool StoragePool `json:"storagePool,omitempty" yaml:"storage_pool,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type ExternalStoragePoolEventCollection struct {
|
||||
Collection
|
||||
Data []ExternalStoragePoolEvent `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ExternalStoragePoolEventClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ExternalStoragePoolEventOperations interface {
|
||||
List(opts *ListOpts) (*ExternalStoragePoolEventCollection, error)
|
||||
Create(opts *ExternalStoragePoolEvent) (*ExternalStoragePoolEvent, error)
|
||||
Update(existing *ExternalStoragePoolEvent, updates interface{}) (*ExternalStoragePoolEvent, error)
|
||||
ById(id string) (*ExternalStoragePoolEvent, error)
|
||||
Delete(container *ExternalStoragePoolEvent) error
|
||||
|
||||
ActionCreate(*ExternalStoragePoolEvent) (*ExternalEvent, error)
|
||||
|
||||
ActionRemove(*ExternalStoragePoolEvent) (*ExternalEvent, error)
|
||||
}
|
||||
|
||||
func newExternalStoragePoolEventClient(rancherClient *RancherClient) *ExternalStoragePoolEventClient {
|
||||
return &ExternalStoragePoolEventClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ExternalStoragePoolEventClient) Create(container *ExternalStoragePoolEvent) (*ExternalStoragePoolEvent, error) {
|
||||
resp := &ExternalStoragePoolEvent{}
|
||||
err := c.rancherClient.doCreate(EXTERNAL_STORAGE_POOL_EVENT_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalStoragePoolEventClient) Update(existing *ExternalStoragePoolEvent, updates interface{}) (*ExternalStoragePoolEvent, error) {
|
||||
resp := &ExternalStoragePoolEvent{}
|
||||
err := c.rancherClient.doUpdate(EXTERNAL_STORAGE_POOL_EVENT_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalStoragePoolEventClient) List(opts *ListOpts) (*ExternalStoragePoolEventCollection, error) {
|
||||
resp := &ExternalStoragePoolEventCollection{}
|
||||
err := c.rancherClient.doList(EXTERNAL_STORAGE_POOL_EVENT_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalStoragePoolEventClient) ById(id string) (*ExternalStoragePoolEvent, error) {
|
||||
resp := &ExternalStoragePoolEvent{}
|
||||
err := c.rancherClient.doById(EXTERNAL_STORAGE_POOL_EVENT_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalStoragePoolEventClient) Delete(container *ExternalStoragePoolEvent) error {
|
||||
return c.rancherClient.doResourceDelete(EXTERNAL_STORAGE_POOL_EVENT_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *ExternalStoragePoolEventClient) ActionCreate(resource *ExternalStoragePoolEvent) (*ExternalEvent, error) {
|
||||
|
||||
resp := &ExternalEvent{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_STORAGE_POOL_EVENT_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalStoragePoolEventClient) ActionRemove(resource *ExternalStoragePoolEvent) (*ExternalEvent, error) {
|
||||
|
||||
resp := &ExternalEvent{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_STORAGE_POOL_EVENT_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
113
vendor/github.com/rancher/go-rancher/client/generated_external_volume_event.go
generated
vendored
113
vendor/github.com/rancher/go-rancher/client/generated_external_volume_event.go
generated
vendored
@ -1,113 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
EXTERNAL_VOLUME_EVENT_TYPE = "externalVolumeEvent"
|
||||
)
|
||||
|
||||
type ExternalVolumeEvent struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
EventType string `json:"eventType,omitempty" yaml:"event_type,omitempty"`
|
||||
|
||||
ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
ReportedAccountId string `json:"reportedAccountId,omitempty" yaml:"reported_account_id,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
|
||||
Volume Volume `json:"volume,omitempty" yaml:"volume,omitempty"`
|
||||
}
|
||||
|
||||
type ExternalVolumeEventCollection struct {
|
||||
Collection
|
||||
Data []ExternalVolumeEvent `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ExternalVolumeEventClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ExternalVolumeEventOperations interface {
|
||||
List(opts *ListOpts) (*ExternalVolumeEventCollection, error)
|
||||
Create(opts *ExternalVolumeEvent) (*ExternalVolumeEvent, error)
|
||||
Update(existing *ExternalVolumeEvent, updates interface{}) (*ExternalVolumeEvent, error)
|
||||
ById(id string) (*ExternalVolumeEvent, error)
|
||||
Delete(container *ExternalVolumeEvent) error
|
||||
|
||||
ActionCreate(*ExternalVolumeEvent) (*ExternalEvent, error)
|
||||
|
||||
ActionRemove(*ExternalVolumeEvent) (*ExternalEvent, error)
|
||||
}
|
||||
|
||||
func newExternalVolumeEventClient(rancherClient *RancherClient) *ExternalVolumeEventClient {
|
||||
return &ExternalVolumeEventClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ExternalVolumeEventClient) Create(container *ExternalVolumeEvent) (*ExternalVolumeEvent, error) {
|
||||
resp := &ExternalVolumeEvent{}
|
||||
err := c.rancherClient.doCreate(EXTERNAL_VOLUME_EVENT_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalVolumeEventClient) Update(existing *ExternalVolumeEvent, updates interface{}) (*ExternalVolumeEvent, error) {
|
||||
resp := &ExternalVolumeEvent{}
|
||||
err := c.rancherClient.doUpdate(EXTERNAL_VOLUME_EVENT_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalVolumeEventClient) List(opts *ListOpts) (*ExternalVolumeEventCollection, error) {
|
||||
resp := &ExternalVolumeEventCollection{}
|
||||
err := c.rancherClient.doList(EXTERNAL_VOLUME_EVENT_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalVolumeEventClient) ById(id string) (*ExternalVolumeEvent, error) {
|
||||
resp := &ExternalVolumeEvent{}
|
||||
err := c.rancherClient.doById(EXTERNAL_VOLUME_EVENT_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalVolumeEventClient) Delete(container *ExternalVolumeEvent) error {
|
||||
return c.rancherClient.doResourceDelete(EXTERNAL_VOLUME_EVENT_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *ExternalVolumeEventClient) ActionCreate(resource *ExternalVolumeEvent) (*ExternalEvent, error) {
|
||||
|
||||
resp := &ExternalEvent{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_VOLUME_EVENT_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ExternalVolumeEventClient) ActionRemove(resource *ExternalVolumeEvent) (*ExternalEvent, error) {
|
||||
|
||||
resp := &ExternalEvent{}
|
||||
|
||||
err := c.rancherClient.doAction(EXTERNAL_VOLUME_EVENT_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
67
vendor/github.com/rancher/go-rancher/client/generated_field_documentation.go
generated
vendored
67
vendor/github.com/rancher/go-rancher/client/generated_field_documentation.go
generated
vendored
@ -1,67 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
FIELD_DOCUMENTATION_TYPE = "fieldDocumentation"
|
||||
)
|
||||
|
||||
type FieldDocumentation struct {
|
||||
Resource
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
}
|
||||
|
||||
type FieldDocumentationCollection struct {
|
||||
Collection
|
||||
Data []FieldDocumentation `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type FieldDocumentationClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type FieldDocumentationOperations interface {
|
||||
List(opts *ListOpts) (*FieldDocumentationCollection, error)
|
||||
Create(opts *FieldDocumentation) (*FieldDocumentation, error)
|
||||
Update(existing *FieldDocumentation, updates interface{}) (*FieldDocumentation, error)
|
||||
ById(id string) (*FieldDocumentation, error)
|
||||
Delete(container *FieldDocumentation) error
|
||||
}
|
||||
|
||||
func newFieldDocumentationClient(rancherClient *RancherClient) *FieldDocumentationClient {
|
||||
return &FieldDocumentationClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *FieldDocumentationClient) Create(container *FieldDocumentation) (*FieldDocumentation, error) {
|
||||
resp := &FieldDocumentation{}
|
||||
err := c.rancherClient.doCreate(FIELD_DOCUMENTATION_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *FieldDocumentationClient) Update(existing *FieldDocumentation, updates interface{}) (*FieldDocumentation, error) {
|
||||
resp := &FieldDocumentation{}
|
||||
err := c.rancherClient.doUpdate(FIELD_DOCUMENTATION_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *FieldDocumentationClient) List(opts *ListOpts) (*FieldDocumentationCollection, error) {
|
||||
resp := &FieldDocumentationCollection{}
|
||||
err := c.rancherClient.doList(FIELD_DOCUMENTATION_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *FieldDocumentationClient) ById(id string) (*FieldDocumentation, error) {
|
||||
resp := &FieldDocumentation{}
|
||||
err := c.rancherClient.doById(FIELD_DOCUMENTATION_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *FieldDocumentationClient) Delete(container *FieldDocumentation) error {
|
||||
return c.rancherClient.doResourceDelete(FIELD_DOCUMENTATION_TYPE, &container.Resource)
|
||||
}
|
81
vendor/github.com/rancher/go-rancher/client/generated_githubconfig.go
generated
vendored
81
vendor/github.com/rancher/go-rancher/client/generated_githubconfig.go
generated
vendored
@ -1,81 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
GITHUBCONFIG_TYPE = "githubconfig"
|
||||
)
|
||||
|
||||
type Githubconfig struct {
|
||||
Resource
|
||||
|
||||
AccessMode string `json:"accessMode,omitempty" yaml:"access_mode,omitempty"`
|
||||
|
||||
AllowedIdentities []interface{} `json:"allowedIdentities,omitempty" yaml:"allowed_identities,omitempty"`
|
||||
|
||||
ClientId string `json:"clientId,omitempty" yaml:"client_id,omitempty"`
|
||||
|
||||
ClientSecret string `json:"clientSecret,omitempty" yaml:"client_secret,omitempty"`
|
||||
|
||||
Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
|
||||
|
||||
Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
Scheme string `json:"scheme,omitempty" yaml:"scheme,omitempty"`
|
||||
}
|
||||
|
||||
type GithubconfigCollection struct {
|
||||
Collection
|
||||
Data []Githubconfig `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type GithubconfigClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type GithubconfigOperations interface {
|
||||
List(opts *ListOpts) (*GithubconfigCollection, error)
|
||||
Create(opts *Githubconfig) (*Githubconfig, error)
|
||||
Update(existing *Githubconfig, updates interface{}) (*Githubconfig, error)
|
||||
ById(id string) (*Githubconfig, error)
|
||||
Delete(container *Githubconfig) error
|
||||
}
|
||||
|
||||
func newGithubconfigClient(rancherClient *RancherClient) *GithubconfigClient {
|
||||
return &GithubconfigClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *GithubconfigClient) Create(container *Githubconfig) (*Githubconfig, error) {
|
||||
resp := &Githubconfig{}
|
||||
err := c.rancherClient.doCreate(GITHUBCONFIG_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *GithubconfigClient) Update(existing *Githubconfig, updates interface{}) (*Githubconfig, error) {
|
||||
resp := &Githubconfig{}
|
||||
err := c.rancherClient.doUpdate(GITHUBCONFIG_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *GithubconfigClient) List(opts *ListOpts) (*GithubconfigCollection, error) {
|
||||
resp := &GithubconfigCollection{}
|
||||
err := c.rancherClient.doList(GITHUBCONFIG_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *GithubconfigClient) ById(id string) (*Githubconfig, error) {
|
||||
resp := &Githubconfig{}
|
||||
err := c.rancherClient.doById(GITHUBCONFIG_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *GithubconfigClient) Delete(container *Githubconfig) error {
|
||||
return c.rancherClient.doResourceDelete(GITHUBCONFIG_TYPE, &container.Resource)
|
||||
}
|
73
vendor/github.com/rancher/go-rancher/client/generated_ha_config.go
generated
vendored
73
vendor/github.com/rancher/go-rancher/client/generated_ha_config.go
generated
vendored
@ -1,73 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
HA_CONFIG_TYPE = "haConfig"
|
||||
)
|
||||
|
||||
type HaConfig struct {
|
||||
Resource
|
||||
|
||||
ClusterSize int64 `json:"clusterSize,omitempty" yaml:"cluster_size,omitempty"`
|
||||
|
||||
DbHost string `json:"dbHost,omitempty" yaml:"db_host,omitempty"`
|
||||
|
||||
DbSize int64 `json:"dbSize,omitempty" yaml:"db_size,omitempty"`
|
||||
|
||||
Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
|
||||
}
|
||||
|
||||
type HaConfigCollection struct {
|
||||
Collection
|
||||
Data []HaConfig `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type HaConfigClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type HaConfigOperations interface {
|
||||
List(opts *ListOpts) (*HaConfigCollection, error)
|
||||
Create(opts *HaConfig) (*HaConfig, error)
|
||||
Update(existing *HaConfig, updates interface{}) (*HaConfig, error)
|
||||
ById(id string) (*HaConfig, error)
|
||||
Delete(container *HaConfig) error
|
||||
}
|
||||
|
||||
func newHaConfigClient(rancherClient *RancherClient) *HaConfigClient {
|
||||
return &HaConfigClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *HaConfigClient) Create(container *HaConfig) (*HaConfig, error) {
|
||||
resp := &HaConfig{}
|
||||
err := c.rancherClient.doCreate(HA_CONFIG_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HaConfigClient) Update(existing *HaConfig, updates interface{}) (*HaConfig, error) {
|
||||
resp := &HaConfig{}
|
||||
err := c.rancherClient.doUpdate(HA_CONFIG_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HaConfigClient) List(opts *ListOpts) (*HaConfigCollection, error) {
|
||||
resp := &HaConfigCollection{}
|
||||
err := c.rancherClient.doList(HA_CONFIG_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HaConfigClient) ById(id string) (*HaConfig, error) {
|
||||
resp := &HaConfig{}
|
||||
err := c.rancherClient.doById(HA_CONFIG_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HaConfigClient) Delete(container *HaConfig) error {
|
||||
return c.rancherClient.doResourceDelete(HA_CONFIG_TYPE, &container.Resource)
|
||||
}
|
97
vendor/github.com/rancher/go-rancher/client/generated_ha_config_input.go
generated
vendored
97
vendor/github.com/rancher/go-rancher/client/generated_ha_config_input.go
generated
vendored
@ -1,97 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
HA_CONFIG_INPUT_TYPE = "haConfigInput"
|
||||
)
|
||||
|
||||
type HaConfigInput struct {
|
||||
Resource
|
||||
|
||||
Cert string `json:"cert,omitempty" yaml:"cert,omitempty"`
|
||||
|
||||
CertChain string `json:"certChain,omitempty" yaml:"cert_chain,omitempty"`
|
||||
|
||||
ClusterSize int64 `json:"clusterSize,omitempty" yaml:"cluster_size,omitempty"`
|
||||
|
||||
HostRegistrationUrl string `json:"hostRegistrationUrl,omitempty" yaml:"host_registration_url,omitempty"`
|
||||
|
||||
HttpEnabled bool `json:"httpEnabled,omitempty" yaml:"http_enabled,omitempty"`
|
||||
|
||||
HttpPort int64 `json:"httpPort,omitempty" yaml:"http_port,omitempty"`
|
||||
|
||||
HttpsPort int64 `json:"httpsPort,omitempty" yaml:"https_port,omitempty"`
|
||||
|
||||
Key string `json:"key,omitempty" yaml:"key,omitempty"`
|
||||
|
||||
PpHttpPort int64 `json:"ppHttpPort,omitempty" yaml:"pp_http_port,omitempty"`
|
||||
|
||||
PpHttpsPort int64 `json:"ppHttpsPort,omitempty" yaml:"pp_https_port,omitempty"`
|
||||
|
||||
RedisPort int64 `json:"redisPort,omitempty" yaml:"redis_port,omitempty"`
|
||||
|
||||
SwarmEnabled bool `json:"swarmEnabled,omitempty" yaml:"swarm_enabled,omitempty"`
|
||||
|
||||
SwarmPort int64 `json:"swarmPort,omitempty" yaml:"swarm_port,omitempty"`
|
||||
|
||||
ZookeeperClientPort int64 `json:"zookeeperClientPort,omitempty" yaml:"zookeeper_client_port,omitempty"`
|
||||
|
||||
ZookeeperLeaderPort int64 `json:"zookeeperLeaderPort,omitempty" yaml:"zookeeper_leader_port,omitempty"`
|
||||
|
||||
ZookeeperQuorumPort int64 `json:"zookeeperQuorumPort,omitempty" yaml:"zookeeper_quorum_port,omitempty"`
|
||||
}
|
||||
|
||||
type HaConfigInputCollection struct {
|
||||
Collection
|
||||
Data []HaConfigInput `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type HaConfigInputClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type HaConfigInputOperations interface {
|
||||
List(opts *ListOpts) (*HaConfigInputCollection, error)
|
||||
Create(opts *HaConfigInput) (*HaConfigInput, error)
|
||||
Update(existing *HaConfigInput, updates interface{}) (*HaConfigInput, error)
|
||||
ById(id string) (*HaConfigInput, error)
|
||||
Delete(container *HaConfigInput) error
|
||||
}
|
||||
|
||||
func newHaConfigInputClient(rancherClient *RancherClient) *HaConfigInputClient {
|
||||
return &HaConfigInputClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *HaConfigInputClient) Create(container *HaConfigInput) (*HaConfigInput, error) {
|
||||
resp := &HaConfigInput{}
|
||||
err := c.rancherClient.doCreate(HA_CONFIG_INPUT_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HaConfigInputClient) Update(existing *HaConfigInput, updates interface{}) (*HaConfigInput, error) {
|
||||
resp := &HaConfigInput{}
|
||||
err := c.rancherClient.doUpdate(HA_CONFIG_INPUT_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HaConfigInputClient) List(opts *ListOpts) (*HaConfigInputCollection, error) {
|
||||
resp := &HaConfigInputCollection{}
|
||||
err := c.rancherClient.doList(HA_CONFIG_INPUT_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HaConfigInputClient) ById(id string) (*HaConfigInput, error) {
|
||||
resp := &HaConfigInput{}
|
||||
err := c.rancherClient.doById(HA_CONFIG_INPUT_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HaConfigInputClient) Delete(container *HaConfigInput) error {
|
||||
return c.rancherClient.doResourceDelete(HA_CONFIG_INPUT_TYPE, &container.Resource)
|
||||
}
|
69
vendor/github.com/rancher/go-rancher/client/generated_haproxy_config.go
generated
vendored
69
vendor/github.com/rancher/go-rancher/client/generated_haproxy_config.go
generated
vendored
@ -1,69 +0,0 @@
|
||||
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"`
|
||||
}
|
||||
|
||||
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)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
119
vendor/github.com/rancher/go-rancher/client/generated_healthcheck_instance_host_map.go
generated
vendored
119
vendor/github.com/rancher/go-rancher/client/generated_healthcheck_instance_host_map.go
generated
vendored
@ -1,119 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
HEALTHCHECK_INSTANCE_HOST_MAP_TYPE = "healthcheckInstanceHostMap"
|
||||
)
|
||||
|
||||
type HealthcheckInstanceHostMap struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"`
|
||||
|
||||
HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"`
|
||||
|
||||
InstanceId string `json:"instanceId,omitempty" yaml:"instance_id,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type HealthcheckInstanceHostMapCollection struct {
|
||||
Collection
|
||||
Data []HealthcheckInstanceHostMap `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type HealthcheckInstanceHostMapClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type HealthcheckInstanceHostMapOperations interface {
|
||||
List(opts *ListOpts) (*HealthcheckInstanceHostMapCollection, error)
|
||||
Create(opts *HealthcheckInstanceHostMap) (*HealthcheckInstanceHostMap, error)
|
||||
Update(existing *HealthcheckInstanceHostMap, updates interface{}) (*HealthcheckInstanceHostMap, error)
|
||||
ById(id string) (*HealthcheckInstanceHostMap, error)
|
||||
Delete(container *HealthcheckInstanceHostMap) error
|
||||
|
||||
ActionCreate(*HealthcheckInstanceHostMap) (*HealthcheckInstanceHostMap, error)
|
||||
|
||||
ActionRemove(*HealthcheckInstanceHostMap) (*HealthcheckInstanceHostMap, error)
|
||||
}
|
||||
|
||||
func newHealthcheckInstanceHostMapClient(rancherClient *RancherClient) *HealthcheckInstanceHostMapClient {
|
||||
return &HealthcheckInstanceHostMapClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *HealthcheckInstanceHostMapClient) Create(container *HealthcheckInstanceHostMap) (*HealthcheckInstanceHostMap, error) {
|
||||
resp := &HealthcheckInstanceHostMap{}
|
||||
err := c.rancherClient.doCreate(HEALTHCHECK_INSTANCE_HOST_MAP_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HealthcheckInstanceHostMapClient) Update(existing *HealthcheckInstanceHostMap, updates interface{}) (*HealthcheckInstanceHostMap, error) {
|
||||
resp := &HealthcheckInstanceHostMap{}
|
||||
err := c.rancherClient.doUpdate(HEALTHCHECK_INSTANCE_HOST_MAP_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HealthcheckInstanceHostMapClient) List(opts *ListOpts) (*HealthcheckInstanceHostMapCollection, error) {
|
||||
resp := &HealthcheckInstanceHostMapCollection{}
|
||||
err := c.rancherClient.doList(HEALTHCHECK_INSTANCE_HOST_MAP_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HealthcheckInstanceHostMapClient) ById(id string) (*HealthcheckInstanceHostMap, error) {
|
||||
resp := &HealthcheckInstanceHostMap{}
|
||||
err := c.rancherClient.doById(HEALTHCHECK_INSTANCE_HOST_MAP_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HealthcheckInstanceHostMapClient) Delete(container *HealthcheckInstanceHostMap) error {
|
||||
return c.rancherClient.doResourceDelete(HEALTHCHECK_INSTANCE_HOST_MAP_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *HealthcheckInstanceHostMapClient) ActionCreate(resource *HealthcheckInstanceHostMap) (*HealthcheckInstanceHostMap, error) {
|
||||
|
||||
resp := &HealthcheckInstanceHostMap{}
|
||||
|
||||
err := c.rancherClient.doAction(HEALTHCHECK_INSTANCE_HOST_MAP_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HealthcheckInstanceHostMapClient) ActionRemove(resource *HealthcheckInstanceHostMap) (*HealthcheckInstanceHostMap, error) {
|
||||
|
||||
resp := &HealthcheckInstanceHostMap{}
|
||||
|
||||
err := c.rancherClient.doAction(HEALTHCHECK_INSTANCE_HOST_MAP_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
197
vendor/github.com/rancher/go-rancher/client/generated_host.go
generated
vendored
197
vendor/github.com/rancher/go-rancher/client/generated_host.go
generated
vendored
@ -1,197 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
HOST_TYPE = "host"
|
||||
)
|
||||
|
||||
type Host struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
AgentId string `json:"agentId,omitempty" yaml:"agent_id,omitempty"`
|
||||
|
||||
AgentState string `json:"agentState,omitempty" yaml:"agent_state,omitempty"`
|
||||
|
||||
ApiProxy string `json:"apiProxy,omitempty" yaml:"api_proxy,omitempty"`
|
||||
|
||||
ComputeTotal int64 `json:"computeTotal,omitempty" yaml:"compute_total,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"`
|
||||
|
||||
Info interface{} `json:"info,omitempty" yaml:"info,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
Labels map[string]interface{} `json:"labels,omitempty" yaml:"labels,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
PhysicalHostId string `json:"physicalHostId,omitempty" yaml:"physical_host_id,omitempty"`
|
||||
|
||||
PublicEndpoints []interface{} `json:"publicEndpoints,omitempty" yaml:"public_endpoints,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type HostCollection struct {
|
||||
Collection
|
||||
Data []Host `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type HostClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type HostOperations interface {
|
||||
List(opts *ListOpts) (*HostCollection, error)
|
||||
Create(opts *Host) (*Host, error)
|
||||
Update(existing *Host, updates interface{}) (*Host, error)
|
||||
ById(id string) (*Host, error)
|
||||
Delete(container *Host) error
|
||||
|
||||
ActionActivate(*Host) (*Host, error)
|
||||
|
||||
ActionCreate(*Host) (*Host, error)
|
||||
|
||||
ActionDeactivate(*Host) (*Host, error)
|
||||
|
||||
ActionDockersocket(*Host) (*HostAccess, error)
|
||||
|
||||
ActionPurge(*Host) (*Host, error)
|
||||
|
||||
ActionRemove(*Host) (*Host, error)
|
||||
|
||||
ActionRestore(*Host) (*Host, error)
|
||||
|
||||
ActionUpdate(*Host) (*Host, error)
|
||||
}
|
||||
|
||||
func newHostClient(rancherClient *RancherClient) *HostClient {
|
||||
return &HostClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *HostClient) Create(container *Host) (*Host, error) {
|
||||
resp := &Host{}
|
||||
err := c.rancherClient.doCreate(HOST_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HostClient) Update(existing *Host, updates interface{}) (*Host, error) {
|
||||
resp := &Host{}
|
||||
err := c.rancherClient.doUpdate(HOST_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HostClient) List(opts *ListOpts) (*HostCollection, error) {
|
||||
resp := &HostCollection{}
|
||||
err := c.rancherClient.doList(HOST_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HostClient) ById(id string) (*Host, error) {
|
||||
resp := &Host{}
|
||||
err := c.rancherClient.doById(HOST_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HostClient) Delete(container *Host) error {
|
||||
return c.rancherClient.doResourceDelete(HOST_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *HostClient) ActionActivate(resource *Host) (*Host, error) {
|
||||
|
||||
resp := &Host{}
|
||||
|
||||
err := c.rancherClient.doAction(HOST_TYPE, "activate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HostClient) ActionCreate(resource *Host) (*Host, error) {
|
||||
|
||||
resp := &Host{}
|
||||
|
||||
err := c.rancherClient.doAction(HOST_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HostClient) ActionDeactivate(resource *Host) (*Host, error) {
|
||||
|
||||
resp := &Host{}
|
||||
|
||||
err := c.rancherClient.doAction(HOST_TYPE, "deactivate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HostClient) ActionDockersocket(resource *Host) (*HostAccess, error) {
|
||||
|
||||
resp := &HostAccess{}
|
||||
|
||||
err := c.rancherClient.doAction(HOST_TYPE, "dockersocket", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HostClient) ActionPurge(resource *Host) (*Host, error) {
|
||||
|
||||
resp := &Host{}
|
||||
|
||||
err := c.rancherClient.doAction(HOST_TYPE, "purge", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HostClient) ActionRemove(resource *Host) (*Host, error) {
|
||||
|
||||
resp := &Host{}
|
||||
|
||||
err := c.rancherClient.doAction(HOST_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HostClient) ActionRestore(resource *Host) (*Host, error) {
|
||||
|
||||
resp := &Host{}
|
||||
|
||||
err := c.rancherClient.doAction(HOST_TYPE, "restore", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HostClient) ActionUpdate(resource *Host) (*Host, error) {
|
||||
|
||||
resp := &Host{}
|
||||
|
||||
err := c.rancherClient.doAction(HOST_TYPE, "update", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
69
vendor/github.com/rancher/go-rancher/client/generated_host_access.go
generated
vendored
69
vendor/github.com/rancher/go-rancher/client/generated_host_access.go
generated
vendored
@ -1,69 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
HOST_ACCESS_TYPE = "hostAccess"
|
||||
)
|
||||
|
||||
type HostAccess struct {
|
||||
Resource
|
||||
|
||||
Token string `json:"token,omitempty" yaml:"token,omitempty"`
|
||||
|
||||
Url string `json:"url,omitempty" yaml:"url,omitempty"`
|
||||
}
|
||||
|
||||
type HostAccessCollection struct {
|
||||
Collection
|
||||
Data []HostAccess `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type HostAccessClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type HostAccessOperations interface {
|
||||
List(opts *ListOpts) (*HostAccessCollection, error)
|
||||
Create(opts *HostAccess) (*HostAccess, error)
|
||||
Update(existing *HostAccess, updates interface{}) (*HostAccess, error)
|
||||
ById(id string) (*HostAccess, error)
|
||||
Delete(container *HostAccess) error
|
||||
}
|
||||
|
||||
func newHostAccessClient(rancherClient *RancherClient) *HostAccessClient {
|
||||
return &HostAccessClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *HostAccessClient) Create(container *HostAccess) (*HostAccess, error) {
|
||||
resp := &HostAccess{}
|
||||
err := c.rancherClient.doCreate(HOST_ACCESS_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HostAccessClient) Update(existing *HostAccess, updates interface{}) (*HostAccess, error) {
|
||||
resp := &HostAccess{}
|
||||
err := c.rancherClient.doUpdate(HOST_ACCESS_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HostAccessClient) List(opts *ListOpts) (*HostAccessCollection, error) {
|
||||
resp := &HostAccessCollection{}
|
||||
err := c.rancherClient.doList(HOST_ACCESS_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HostAccessClient) ById(id string) (*HostAccess, error) {
|
||||
resp := &HostAccess{}
|
||||
err := c.rancherClient.doById(HOST_ACCESS_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HostAccessClient) Delete(container *HostAccess) error {
|
||||
return c.rancherClient.doResourceDelete(HOST_ACCESS_TYPE, &container.Resource)
|
||||
}
|
71
vendor/github.com/rancher/go-rancher/client/generated_host_api_proxy_token.go
generated
vendored
71
vendor/github.com/rancher/go-rancher/client/generated_host_api_proxy_token.go
generated
vendored
@ -1,71 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
HOST_API_PROXY_TOKEN_TYPE = "hostApiProxyToken"
|
||||
)
|
||||
|
||||
type HostApiProxyToken struct {
|
||||
Resource
|
||||
|
||||
ReportedUuid string `json:"reportedUuid,omitempty" yaml:"reported_uuid,omitempty"`
|
||||
|
||||
Token string `json:"token,omitempty" yaml:"token,omitempty"`
|
||||
|
||||
Url string `json:"url,omitempty" yaml:"url,omitempty"`
|
||||
}
|
||||
|
||||
type HostApiProxyTokenCollection struct {
|
||||
Collection
|
||||
Data []HostApiProxyToken `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type HostApiProxyTokenClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type HostApiProxyTokenOperations interface {
|
||||
List(opts *ListOpts) (*HostApiProxyTokenCollection, error)
|
||||
Create(opts *HostApiProxyToken) (*HostApiProxyToken, error)
|
||||
Update(existing *HostApiProxyToken, updates interface{}) (*HostApiProxyToken, error)
|
||||
ById(id string) (*HostApiProxyToken, error)
|
||||
Delete(container *HostApiProxyToken) error
|
||||
}
|
||||
|
||||
func newHostApiProxyTokenClient(rancherClient *RancherClient) *HostApiProxyTokenClient {
|
||||
return &HostApiProxyTokenClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *HostApiProxyTokenClient) Create(container *HostApiProxyToken) (*HostApiProxyToken, error) {
|
||||
resp := &HostApiProxyToken{}
|
||||
err := c.rancherClient.doCreate(HOST_API_PROXY_TOKEN_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HostApiProxyTokenClient) Update(existing *HostApiProxyToken, updates interface{}) (*HostApiProxyToken, error) {
|
||||
resp := &HostApiProxyToken{}
|
||||
err := c.rancherClient.doUpdate(HOST_API_PROXY_TOKEN_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HostApiProxyTokenClient) List(opts *ListOpts) (*HostApiProxyTokenCollection, error) {
|
||||
resp := &HostApiProxyTokenCollection{}
|
||||
err := c.rancherClient.doList(HOST_API_PROXY_TOKEN_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HostApiProxyTokenClient) ById(id string) (*HostApiProxyToken, error) {
|
||||
resp := &HostApiProxyToken{}
|
||||
err := c.rancherClient.doById(HOST_API_PROXY_TOKEN_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *HostApiProxyTokenClient) Delete(container *HostApiProxyToken) error {
|
||||
return c.rancherClient.doResourceDelete(HOST_API_PROXY_TOKEN_TYPE, &container.Resource)
|
||||
}
|
83
vendor/github.com/rancher/go-rancher/client/generated_identity.go
generated
vendored
83
vendor/github.com/rancher/go-rancher/client/generated_identity.go
generated
vendored
@ -1,83 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
IDENTITY_TYPE = "identity"
|
||||
)
|
||||
|
||||
type Identity struct {
|
||||
Resource
|
||||
|
||||
All string `json:"all,omitempty" yaml:"all,omitempty"`
|
||||
|
||||
ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
|
||||
|
||||
ExternalIdType string `json:"externalIdType,omitempty" yaml:"external_id_type,omitempty"`
|
||||
|
||||
Login string `json:"login,omitempty" yaml:"login,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
ProfilePicture string `json:"profilePicture,omitempty" yaml:"profile_picture,omitempty"`
|
||||
|
||||
ProfileUrl string `json:"profileUrl,omitempty" yaml:"profile_url,omitempty"`
|
||||
|
||||
ProjectId string `json:"projectId,omitempty" yaml:"project_id,omitempty"`
|
||||
|
||||
Role string `json:"role,omitempty" yaml:"role,omitempty"`
|
||||
}
|
||||
|
||||
type IdentityCollection struct {
|
||||
Collection
|
||||
Data []Identity `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type IdentityClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type IdentityOperations interface {
|
||||
List(opts *ListOpts) (*IdentityCollection, error)
|
||||
Create(opts *Identity) (*Identity, error)
|
||||
Update(existing *Identity, updates interface{}) (*Identity, error)
|
||||
ById(id string) (*Identity, error)
|
||||
Delete(container *Identity) error
|
||||
}
|
||||
|
||||
func newIdentityClient(rancherClient *RancherClient) *IdentityClient {
|
||||
return &IdentityClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *IdentityClient) Create(container *Identity) (*Identity, error) {
|
||||
resp := &Identity{}
|
||||
err := c.rancherClient.doCreate(IDENTITY_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *IdentityClient) Update(existing *Identity, updates interface{}) (*Identity, error) {
|
||||
resp := &Identity{}
|
||||
err := c.rancherClient.doUpdate(IDENTITY_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *IdentityClient) List(opts *ListOpts) (*IdentityCollection, error) {
|
||||
resp := &IdentityCollection{}
|
||||
err := c.rancherClient.doList(IDENTITY_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *IdentityClient) ById(id string) (*Identity, error) {
|
||||
resp := &Identity{}
|
||||
err := c.rancherClient.doById(IDENTITY_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *IdentityClient) Delete(container *Identity) error {
|
||||
return c.rancherClient.doResourceDelete(IDENTITY_TYPE, &container.Resource)
|
||||
}
|
168
vendor/github.com/rancher/go-rancher/client/generated_image.go
generated
vendored
168
vendor/github.com/rancher/go-rancher/client/generated_image.go
generated
vendored
@ -1,168 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
IMAGE_TYPE = "image"
|
||||
)
|
||||
|
||||
type Image struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type ImageCollection struct {
|
||||
Collection
|
||||
Data []Image `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type ImageClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type ImageOperations interface {
|
||||
List(opts *ListOpts) (*ImageCollection, error)
|
||||
Create(opts *Image) (*Image, error)
|
||||
Update(existing *Image, updates interface{}) (*Image, error)
|
||||
ById(id string) (*Image, error)
|
||||
Delete(container *Image) error
|
||||
|
||||
ActionActivate(*Image) (*Image, error)
|
||||
|
||||
ActionCreate(*Image) (*Image, error)
|
||||
|
||||
ActionDeactivate(*Image) (*Image, error)
|
||||
|
||||
ActionPurge(*Image) (*Image, error)
|
||||
|
||||
ActionRemove(*Image) (*Image, error)
|
||||
|
||||
ActionRestore(*Image) (*Image, error)
|
||||
|
||||
ActionUpdate(*Image) (*Image, error)
|
||||
}
|
||||
|
||||
func newImageClient(rancherClient *RancherClient) *ImageClient {
|
||||
return &ImageClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ImageClient) Create(container *Image) (*Image, error) {
|
||||
resp := &Image{}
|
||||
err := c.rancherClient.doCreate(IMAGE_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ImageClient) Update(existing *Image, updates interface{}) (*Image, error) {
|
||||
resp := &Image{}
|
||||
err := c.rancherClient.doUpdate(IMAGE_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ImageClient) List(opts *ListOpts) (*ImageCollection, error) {
|
||||
resp := &ImageCollection{}
|
||||
err := c.rancherClient.doList(IMAGE_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ImageClient) ById(id string) (*Image, error) {
|
||||
resp := &Image{}
|
||||
err := c.rancherClient.doById(IMAGE_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ImageClient) Delete(container *Image) error {
|
||||
return c.rancherClient.doResourceDelete(IMAGE_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *ImageClient) ActionActivate(resource *Image) (*Image, error) {
|
||||
|
||||
resp := &Image{}
|
||||
|
||||
err := c.rancherClient.doAction(IMAGE_TYPE, "activate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ImageClient) ActionCreate(resource *Image) (*Image, error) {
|
||||
|
||||
resp := &Image{}
|
||||
|
||||
err := c.rancherClient.doAction(IMAGE_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ImageClient) ActionDeactivate(resource *Image) (*Image, error) {
|
||||
|
||||
resp := &Image{}
|
||||
|
||||
err := c.rancherClient.doAction(IMAGE_TYPE, "deactivate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ImageClient) ActionPurge(resource *Image) (*Image, error) {
|
||||
|
||||
resp := &Image{}
|
||||
|
||||
err := c.rancherClient.doAction(IMAGE_TYPE, "purge", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ImageClient) ActionRemove(resource *Image) (*Image, error) {
|
||||
|
||||
resp := &Image{}
|
||||
|
||||
err := c.rancherClient.doAction(IMAGE_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ImageClient) ActionRestore(resource *Image) (*Image, error) {
|
||||
|
||||
resp := &Image{}
|
||||
|
||||
err := c.rancherClient.doAction(IMAGE_TYPE, "restore", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ImageClient) ActionUpdate(resource *Image) (*Image, error) {
|
||||
|
||||
resp := &Image{}
|
||||
|
||||
err := c.rancherClient.doAction(IMAGE_TYPE, "update", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
79
vendor/github.com/rancher/go-rancher/client/generated_in_service_upgrade_strategy.go
generated
vendored
79
vendor/github.com/rancher/go-rancher/client/generated_in_service_upgrade_strategy.go
generated
vendored
@ -1,79 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
IN_SERVICE_UPGRADE_STRATEGY_TYPE = "inServiceUpgradeStrategy"
|
||||
)
|
||||
|
||||
type InServiceUpgradeStrategy struct {
|
||||
Resource
|
||||
|
||||
BatchSize int64 `json:"batchSize,omitempty" yaml:"batch_size,omitempty"`
|
||||
|
||||
IntervalMillis int64 `json:"intervalMillis,omitempty" yaml:"interval_millis,omitempty"`
|
||||
|
||||
LaunchConfig *LaunchConfig `json:"launchConfig,omitempty" yaml:"launch_config,omitempty"`
|
||||
|
||||
PreviousLaunchConfig *LaunchConfig `json:"previousLaunchConfig,omitempty" yaml:"previous_launch_config,omitempty"`
|
||||
|
||||
PreviousSecondaryLaunchConfigs []interface{} `json:"previousSecondaryLaunchConfigs,omitempty" yaml:"previous_secondary_launch_configs,omitempty"`
|
||||
|
||||
SecondaryLaunchConfigs []interface{} `json:"secondaryLaunchConfigs,omitempty" yaml:"secondary_launch_configs,omitempty"`
|
||||
|
||||
StartFirst bool `json:"startFirst,omitempty" yaml:"start_first,omitempty"`
|
||||
}
|
||||
|
||||
type InServiceUpgradeStrategyCollection struct {
|
||||
Collection
|
||||
Data []InServiceUpgradeStrategy `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type InServiceUpgradeStrategyClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type InServiceUpgradeStrategyOperations interface {
|
||||
List(opts *ListOpts) (*InServiceUpgradeStrategyCollection, error)
|
||||
Create(opts *InServiceUpgradeStrategy) (*InServiceUpgradeStrategy, error)
|
||||
Update(existing *InServiceUpgradeStrategy, updates interface{}) (*InServiceUpgradeStrategy, error)
|
||||
ById(id string) (*InServiceUpgradeStrategy, error)
|
||||
Delete(container *InServiceUpgradeStrategy) error
|
||||
}
|
||||
|
||||
func newInServiceUpgradeStrategyClient(rancherClient *RancherClient) *InServiceUpgradeStrategyClient {
|
||||
return &InServiceUpgradeStrategyClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *InServiceUpgradeStrategyClient) Create(container *InServiceUpgradeStrategy) (*InServiceUpgradeStrategy, error) {
|
||||
resp := &InServiceUpgradeStrategy{}
|
||||
err := c.rancherClient.doCreate(IN_SERVICE_UPGRADE_STRATEGY_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InServiceUpgradeStrategyClient) Update(existing *InServiceUpgradeStrategy, updates interface{}) (*InServiceUpgradeStrategy, error) {
|
||||
resp := &InServiceUpgradeStrategy{}
|
||||
err := c.rancherClient.doUpdate(IN_SERVICE_UPGRADE_STRATEGY_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InServiceUpgradeStrategyClient) List(opts *ListOpts) (*InServiceUpgradeStrategyCollection, error) {
|
||||
resp := &InServiceUpgradeStrategyCollection{}
|
||||
err := c.rancherClient.doList(IN_SERVICE_UPGRADE_STRATEGY_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InServiceUpgradeStrategyClient) ById(id string) (*InServiceUpgradeStrategy, error) {
|
||||
resp := &InServiceUpgradeStrategy{}
|
||||
err := c.rancherClient.doById(IN_SERVICE_UPGRADE_STRATEGY_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InServiceUpgradeStrategyClient) Delete(container *InServiceUpgradeStrategy) error {
|
||||
return c.rancherClient.doResourceDelete(IN_SERVICE_UPGRADE_STRATEGY_TYPE, &container.Resource)
|
||||
}
|
271
vendor/github.com/rancher/go-rancher/client/generated_instance.go
generated
vendored
271
vendor/github.com/rancher/go-rancher/client/generated_instance.go
generated
vendored
@ -1,271 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
INSTANCE_TYPE = "instance"
|
||||
)
|
||||
|
||||
type Instance struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
|
||||
|
||||
HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type InstanceCollection struct {
|
||||
Collection
|
||||
Data []Instance `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type InstanceClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type InstanceOperations interface {
|
||||
List(opts *ListOpts) (*InstanceCollection, error)
|
||||
Create(opts *Instance) (*Instance, error)
|
||||
Update(existing *Instance, updates interface{}) (*Instance, error)
|
||||
ById(id string) (*Instance, error)
|
||||
Delete(container *Instance) error
|
||||
|
||||
ActionAllocate(*Instance) (*Instance, error)
|
||||
|
||||
ActionConsole(*Instance, *InstanceConsoleInput) (*InstanceConsole, error)
|
||||
|
||||
ActionCreate(*Instance) (*Instance, error)
|
||||
|
||||
ActionDeallocate(*Instance) (*Instance, error)
|
||||
|
||||
ActionError(*Instance) (*Instance, error)
|
||||
|
||||
ActionMigrate(*Instance) (*Instance, error)
|
||||
|
||||
ActionPurge(*Instance) (*Instance, error)
|
||||
|
||||
ActionRemove(*Instance) (*Instance, error)
|
||||
|
||||
ActionRestart(*Instance) (*Instance, error)
|
||||
|
||||
ActionRestore(*Instance) (*Instance, error)
|
||||
|
||||
ActionStart(*Instance) (*Instance, error)
|
||||
|
||||
ActionStop(*Instance, *InstanceStop) (*Instance, error)
|
||||
|
||||
ActionUpdate(*Instance) (*Instance, error)
|
||||
|
||||
ActionUpdatehealthy(*Instance) (*Instance, error)
|
||||
|
||||
ActionUpdatereinitializing(*Instance) (*Instance, error)
|
||||
|
||||
ActionUpdateunhealthy(*Instance) (*Instance, error)
|
||||
}
|
||||
|
||||
func newInstanceClient(rancherClient *RancherClient) *InstanceClient {
|
||||
return &InstanceClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *InstanceClient) Create(container *Instance) (*Instance, error) {
|
||||
resp := &Instance{}
|
||||
err := c.rancherClient.doCreate(INSTANCE_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceClient) Update(existing *Instance, updates interface{}) (*Instance, error) {
|
||||
resp := &Instance{}
|
||||
err := c.rancherClient.doUpdate(INSTANCE_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceClient) List(opts *ListOpts) (*InstanceCollection, error) {
|
||||
resp := &InstanceCollection{}
|
||||
err := c.rancherClient.doList(INSTANCE_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceClient) ById(id string) (*Instance, error) {
|
||||
resp := &Instance{}
|
||||
err := c.rancherClient.doById(INSTANCE_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceClient) Delete(container *Instance) error {
|
||||
return c.rancherClient.doResourceDelete(INSTANCE_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *InstanceClient) ActionAllocate(resource *Instance) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(INSTANCE_TYPE, "allocate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceClient) ActionConsole(resource *Instance, input *InstanceConsoleInput) (*InstanceConsole, error) {
|
||||
|
||||
resp := &InstanceConsole{}
|
||||
|
||||
err := c.rancherClient.doAction(INSTANCE_TYPE, "console", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceClient) ActionCreate(resource *Instance) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(INSTANCE_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceClient) ActionDeallocate(resource *Instance) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(INSTANCE_TYPE, "deallocate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceClient) ActionError(resource *Instance) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(INSTANCE_TYPE, "error", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceClient) ActionMigrate(resource *Instance) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(INSTANCE_TYPE, "migrate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceClient) ActionPurge(resource *Instance) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(INSTANCE_TYPE, "purge", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceClient) ActionRemove(resource *Instance) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(INSTANCE_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceClient) ActionRestart(resource *Instance) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(INSTANCE_TYPE, "restart", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceClient) ActionRestore(resource *Instance) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(INSTANCE_TYPE, "restore", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceClient) ActionStart(resource *Instance) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(INSTANCE_TYPE, "start", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceClient) ActionStop(resource *Instance, input *InstanceStop) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(INSTANCE_TYPE, "stop", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceClient) ActionUpdate(resource *Instance) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(INSTANCE_TYPE, "update", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceClient) ActionUpdatehealthy(resource *Instance) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(INSTANCE_TYPE, "updatehealthy", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceClient) ActionUpdatereinitializing(resource *Instance) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(INSTANCE_TYPE, "updatereinitializing", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceClient) ActionUpdateunhealthy(resource *Instance) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(INSTANCE_TYPE, "updateunhealthy", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
71
vendor/github.com/rancher/go-rancher/client/generated_instance_console.go
generated
vendored
71
vendor/github.com/rancher/go-rancher/client/generated_instance_console.go
generated
vendored
@ -1,71 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
INSTANCE_CONSOLE_TYPE = "instanceConsole"
|
||||
)
|
||||
|
||||
type InstanceConsole struct {
|
||||
Resource
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
Password string `json:"password,omitempty" yaml:"password,omitempty"`
|
||||
|
||||
Url string `json:"url,omitempty" yaml:"url,omitempty"`
|
||||
}
|
||||
|
||||
type InstanceConsoleCollection struct {
|
||||
Collection
|
||||
Data []InstanceConsole `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type InstanceConsoleClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type InstanceConsoleOperations interface {
|
||||
List(opts *ListOpts) (*InstanceConsoleCollection, error)
|
||||
Create(opts *InstanceConsole) (*InstanceConsole, error)
|
||||
Update(existing *InstanceConsole, updates interface{}) (*InstanceConsole, error)
|
||||
ById(id string) (*InstanceConsole, error)
|
||||
Delete(container *InstanceConsole) error
|
||||
}
|
||||
|
||||
func newInstanceConsoleClient(rancherClient *RancherClient) *InstanceConsoleClient {
|
||||
return &InstanceConsoleClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *InstanceConsoleClient) Create(container *InstanceConsole) (*InstanceConsole, error) {
|
||||
resp := &InstanceConsole{}
|
||||
err := c.rancherClient.doCreate(INSTANCE_CONSOLE_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceConsoleClient) Update(existing *InstanceConsole, updates interface{}) (*InstanceConsole, error) {
|
||||
resp := &InstanceConsole{}
|
||||
err := c.rancherClient.doUpdate(INSTANCE_CONSOLE_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceConsoleClient) List(opts *ListOpts) (*InstanceConsoleCollection, error) {
|
||||
resp := &InstanceConsoleCollection{}
|
||||
err := c.rancherClient.doList(INSTANCE_CONSOLE_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceConsoleClient) ById(id string) (*InstanceConsole, error) {
|
||||
resp := &InstanceConsole{}
|
||||
err := c.rancherClient.doById(INSTANCE_CONSOLE_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceConsoleClient) Delete(container *InstanceConsole) error {
|
||||
return c.rancherClient.doResourceDelete(INSTANCE_CONSOLE_TYPE, &container.Resource)
|
||||
}
|
65
vendor/github.com/rancher/go-rancher/client/generated_instance_console_input.go
generated
vendored
65
vendor/github.com/rancher/go-rancher/client/generated_instance_console_input.go
generated
vendored
@ -1,65 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
INSTANCE_CONSOLE_INPUT_TYPE = "instanceConsoleInput"
|
||||
)
|
||||
|
||||
type InstanceConsoleInput struct {
|
||||
Resource
|
||||
}
|
||||
|
||||
type InstanceConsoleInputCollection struct {
|
||||
Collection
|
||||
Data []InstanceConsoleInput `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type InstanceConsoleInputClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type InstanceConsoleInputOperations interface {
|
||||
List(opts *ListOpts) (*InstanceConsoleInputCollection, error)
|
||||
Create(opts *InstanceConsoleInput) (*InstanceConsoleInput, error)
|
||||
Update(existing *InstanceConsoleInput, updates interface{}) (*InstanceConsoleInput, error)
|
||||
ById(id string) (*InstanceConsoleInput, error)
|
||||
Delete(container *InstanceConsoleInput) error
|
||||
}
|
||||
|
||||
func newInstanceConsoleInputClient(rancherClient *RancherClient) *InstanceConsoleInputClient {
|
||||
return &InstanceConsoleInputClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *InstanceConsoleInputClient) Create(container *InstanceConsoleInput) (*InstanceConsoleInput, error) {
|
||||
resp := &InstanceConsoleInput{}
|
||||
err := c.rancherClient.doCreate(INSTANCE_CONSOLE_INPUT_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceConsoleInputClient) Update(existing *InstanceConsoleInput, updates interface{}) (*InstanceConsoleInput, error) {
|
||||
resp := &InstanceConsoleInput{}
|
||||
err := c.rancherClient.doUpdate(INSTANCE_CONSOLE_INPUT_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceConsoleInputClient) List(opts *ListOpts) (*InstanceConsoleInputCollection, error) {
|
||||
resp := &InstanceConsoleInputCollection{}
|
||||
err := c.rancherClient.doList(INSTANCE_CONSOLE_INPUT_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceConsoleInputClient) ById(id string) (*InstanceConsoleInput, error) {
|
||||
resp := &InstanceConsoleInput{}
|
||||
err := c.rancherClient.doById(INSTANCE_CONSOLE_INPUT_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceConsoleInputClient) Delete(container *InstanceConsoleInput) error {
|
||||
return c.rancherClient.doResourceDelete(INSTANCE_CONSOLE_INPUT_TYPE, &container.Resource)
|
||||
}
|
87
vendor/github.com/rancher/go-rancher/client/generated_instance_health_check.go
generated
vendored
87
vendor/github.com/rancher/go-rancher/client/generated_instance_health_check.go
generated
vendored
@ -1,87 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
INSTANCE_HEALTH_CHECK_TYPE = "instanceHealthCheck"
|
||||
)
|
||||
|
||||
type InstanceHealthCheck struct {
|
||||
Resource
|
||||
|
||||
HealthyThreshold int64 `json:"healthyThreshold,omitempty" yaml:"healthy_threshold,omitempty"`
|
||||
|
||||
InitializingTimeout int64 `json:"initializingTimeout,omitempty" yaml:"initializing_timeout,omitempty"`
|
||||
|
||||
Interval int64 `json:"interval,omitempty" yaml:"interval,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
Port int64 `json:"port,omitempty" yaml:"port,omitempty"`
|
||||
|
||||
RecreateOnQuorumStrategyConfig *RecreateOnQuorumStrategyConfig `json:"recreateOnQuorumStrategyConfig,omitempty" yaml:"recreate_on_quorum_strategy_config,omitempty"`
|
||||
|
||||
ReinitializingTimeout int64 `json:"reinitializingTimeout,omitempty" yaml:"reinitializing_timeout,omitempty"`
|
||||
|
||||
RequestLine string `json:"requestLine,omitempty" yaml:"request_line,omitempty"`
|
||||
|
||||
ResponseTimeout int64 `json:"responseTimeout,omitempty" yaml:"response_timeout,omitempty"`
|
||||
|
||||
Strategy string `json:"strategy,omitempty" yaml:"strategy,omitempty"`
|
||||
|
||||
UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty" yaml:"unhealthy_threshold,omitempty"`
|
||||
}
|
||||
|
||||
type InstanceHealthCheckCollection struct {
|
||||
Collection
|
||||
Data []InstanceHealthCheck `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type InstanceHealthCheckClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type InstanceHealthCheckOperations interface {
|
||||
List(opts *ListOpts) (*InstanceHealthCheckCollection, error)
|
||||
Create(opts *InstanceHealthCheck) (*InstanceHealthCheck, error)
|
||||
Update(existing *InstanceHealthCheck, updates interface{}) (*InstanceHealthCheck, error)
|
||||
ById(id string) (*InstanceHealthCheck, error)
|
||||
Delete(container *InstanceHealthCheck) error
|
||||
}
|
||||
|
||||
func newInstanceHealthCheckClient(rancherClient *RancherClient) *InstanceHealthCheckClient {
|
||||
return &InstanceHealthCheckClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *InstanceHealthCheckClient) Create(container *InstanceHealthCheck) (*InstanceHealthCheck, error) {
|
||||
resp := &InstanceHealthCheck{}
|
||||
err := c.rancherClient.doCreate(INSTANCE_HEALTH_CHECK_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceHealthCheckClient) Update(existing *InstanceHealthCheck, updates interface{}) (*InstanceHealthCheck, error) {
|
||||
resp := &InstanceHealthCheck{}
|
||||
err := c.rancherClient.doUpdate(INSTANCE_HEALTH_CHECK_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceHealthCheckClient) List(opts *ListOpts) (*InstanceHealthCheckCollection, error) {
|
||||
resp := &InstanceHealthCheckCollection{}
|
||||
err := c.rancherClient.doList(INSTANCE_HEALTH_CHECK_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceHealthCheckClient) ById(id string) (*InstanceHealthCheck, error) {
|
||||
resp := &InstanceHealthCheck{}
|
||||
err := c.rancherClient.doById(INSTANCE_HEALTH_CHECK_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceHealthCheckClient) Delete(container *InstanceHealthCheck) error {
|
||||
return c.rancherClient.doResourceDelete(INSTANCE_HEALTH_CHECK_TYPE, &container.Resource)
|
||||
}
|
176
vendor/github.com/rancher/go-rancher/client/generated_instance_link.go
generated
vendored
176
vendor/github.com/rancher/go-rancher/client/generated_instance_link.go
generated
vendored
@ -1,176 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
INSTANCE_LINK_TYPE = "instanceLink"
|
||||
)
|
||||
|
||||
type InstanceLink struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
InstanceId string `json:"instanceId,omitempty" yaml:"instance_id,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
LinkName string `json:"linkName,omitempty" yaml:"link_name,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
Ports []interface{} `json:"ports,omitempty" yaml:"ports,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
TargetInstanceId string `json:"targetInstanceId,omitempty" yaml:"target_instance_id,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type InstanceLinkCollection struct {
|
||||
Collection
|
||||
Data []InstanceLink `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type InstanceLinkClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type InstanceLinkOperations interface {
|
||||
List(opts *ListOpts) (*InstanceLinkCollection, error)
|
||||
Create(opts *InstanceLink) (*InstanceLink, error)
|
||||
Update(existing *InstanceLink, updates interface{}) (*InstanceLink, error)
|
||||
ById(id string) (*InstanceLink, error)
|
||||
Delete(container *InstanceLink) error
|
||||
|
||||
ActionActivate(*InstanceLink) (*InstanceLink, error)
|
||||
|
||||
ActionCreate(*InstanceLink) (*InstanceLink, error)
|
||||
|
||||
ActionDeactivate(*InstanceLink) (*InstanceLink, error)
|
||||
|
||||
ActionPurge(*InstanceLink) (*InstanceLink, error)
|
||||
|
||||
ActionRemove(*InstanceLink) (*InstanceLink, error)
|
||||
|
||||
ActionRestore(*InstanceLink) (*InstanceLink, error)
|
||||
|
||||
ActionUpdate(*InstanceLink) (*InstanceLink, error)
|
||||
}
|
||||
|
||||
func newInstanceLinkClient(rancherClient *RancherClient) *InstanceLinkClient {
|
||||
return &InstanceLinkClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *InstanceLinkClient) Create(container *InstanceLink) (*InstanceLink, error) {
|
||||
resp := &InstanceLink{}
|
||||
err := c.rancherClient.doCreate(INSTANCE_LINK_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceLinkClient) Update(existing *InstanceLink, updates interface{}) (*InstanceLink, error) {
|
||||
resp := &InstanceLink{}
|
||||
err := c.rancherClient.doUpdate(INSTANCE_LINK_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceLinkClient) List(opts *ListOpts) (*InstanceLinkCollection, error) {
|
||||
resp := &InstanceLinkCollection{}
|
||||
err := c.rancherClient.doList(INSTANCE_LINK_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceLinkClient) ById(id string) (*InstanceLink, error) {
|
||||
resp := &InstanceLink{}
|
||||
err := c.rancherClient.doById(INSTANCE_LINK_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceLinkClient) Delete(container *InstanceLink) error {
|
||||
return c.rancherClient.doResourceDelete(INSTANCE_LINK_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *InstanceLinkClient) ActionActivate(resource *InstanceLink) (*InstanceLink, error) {
|
||||
|
||||
resp := &InstanceLink{}
|
||||
|
||||
err := c.rancherClient.doAction(INSTANCE_LINK_TYPE, "activate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceLinkClient) ActionCreate(resource *InstanceLink) (*InstanceLink, error) {
|
||||
|
||||
resp := &InstanceLink{}
|
||||
|
||||
err := c.rancherClient.doAction(INSTANCE_LINK_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceLinkClient) ActionDeactivate(resource *InstanceLink) (*InstanceLink, error) {
|
||||
|
||||
resp := &InstanceLink{}
|
||||
|
||||
err := c.rancherClient.doAction(INSTANCE_LINK_TYPE, "deactivate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceLinkClient) ActionPurge(resource *InstanceLink) (*InstanceLink, error) {
|
||||
|
||||
resp := &InstanceLink{}
|
||||
|
||||
err := c.rancherClient.doAction(INSTANCE_LINK_TYPE, "purge", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceLinkClient) ActionRemove(resource *InstanceLink) (*InstanceLink, error) {
|
||||
|
||||
resp := &InstanceLink{}
|
||||
|
||||
err := c.rancherClient.doAction(INSTANCE_LINK_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceLinkClient) ActionRestore(resource *InstanceLink) (*InstanceLink, error) {
|
||||
|
||||
resp := &InstanceLink{}
|
||||
|
||||
err := c.rancherClient.doAction(INSTANCE_LINK_TYPE, "restore", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceLinkClient) ActionUpdate(resource *InstanceLink) (*InstanceLink, error) {
|
||||
|
||||
resp := &InstanceLink{}
|
||||
|
||||
err := c.rancherClient.doAction(INSTANCE_LINK_TYPE, "update", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
69
vendor/github.com/rancher/go-rancher/client/generated_instance_stop.go
generated
vendored
69
vendor/github.com/rancher/go-rancher/client/generated_instance_stop.go
generated
vendored
@ -1,69 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
INSTANCE_STOP_TYPE = "instanceStop"
|
||||
)
|
||||
|
||||
type InstanceStop struct {
|
||||
Resource
|
||||
|
||||
Remove bool `json:"remove,omitempty" yaml:"remove,omitempty"`
|
||||
|
||||
Timeout int64 `json:"timeout,omitempty" yaml:"timeout,omitempty"`
|
||||
}
|
||||
|
||||
type InstanceStopCollection struct {
|
||||
Collection
|
||||
Data []InstanceStop `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type InstanceStopClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type InstanceStopOperations interface {
|
||||
List(opts *ListOpts) (*InstanceStopCollection, error)
|
||||
Create(opts *InstanceStop) (*InstanceStop, error)
|
||||
Update(existing *InstanceStop, updates interface{}) (*InstanceStop, error)
|
||||
ById(id string) (*InstanceStop, error)
|
||||
Delete(container *InstanceStop) error
|
||||
}
|
||||
|
||||
func newInstanceStopClient(rancherClient *RancherClient) *InstanceStopClient {
|
||||
return &InstanceStopClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *InstanceStopClient) Create(container *InstanceStop) (*InstanceStop, error) {
|
||||
resp := &InstanceStop{}
|
||||
err := c.rancherClient.doCreate(INSTANCE_STOP_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceStopClient) Update(existing *InstanceStop, updates interface{}) (*InstanceStop, error) {
|
||||
resp := &InstanceStop{}
|
||||
err := c.rancherClient.doUpdate(INSTANCE_STOP_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceStopClient) List(opts *ListOpts) (*InstanceStopCollection, error) {
|
||||
resp := &InstanceStopCollection{}
|
||||
err := c.rancherClient.doList(INSTANCE_STOP_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceStopClient) ById(id string) (*InstanceStop, error) {
|
||||
resp := &InstanceStop{}
|
||||
err := c.rancherClient.doById(INSTANCE_STOP_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *InstanceStopClient) Delete(container *InstanceStop) error {
|
||||
return c.rancherClient.doResourceDelete(INSTANCE_STOP_TYPE, &container.Resource)
|
||||
}
|
183
vendor/github.com/rancher/go-rancher/client/generated_ip_address.go
generated
vendored
183
vendor/github.com/rancher/go-rancher/client/generated_ip_address.go
generated
vendored
@ -1,183 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
IP_ADDRESS_TYPE = "ipAddress"
|
||||
)
|
||||
|
||||
type IpAddress struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
Address string `json:"address,omitempty" yaml:"address,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
NetworkId string `json:"networkId,omitempty" yaml:"network_id,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type IpAddressCollection struct {
|
||||
Collection
|
||||
Data []IpAddress `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type IpAddressClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type IpAddressOperations interface {
|
||||
List(opts *ListOpts) (*IpAddressCollection, error)
|
||||
Create(opts *IpAddress) (*IpAddress, error)
|
||||
Update(existing *IpAddress, updates interface{}) (*IpAddress, error)
|
||||
ById(id string) (*IpAddress, error)
|
||||
Delete(container *IpAddress) error
|
||||
|
||||
ActionActivate(*IpAddress) (*IpAddress, error)
|
||||
|
||||
ActionCreate(*IpAddress) (*IpAddress, error)
|
||||
|
||||
ActionDeactivate(*IpAddress) (*IpAddress, error)
|
||||
|
||||
ActionDisassociate(*IpAddress) (*IpAddress, error)
|
||||
|
||||
ActionPurge(*IpAddress) (*IpAddress, error)
|
||||
|
||||
ActionRemove(*IpAddress) (*IpAddress, error)
|
||||
|
||||
ActionRestore(*IpAddress) (*IpAddress, error)
|
||||
|
||||
ActionUpdate(*IpAddress) (*IpAddress, error)
|
||||
}
|
||||
|
||||
func newIpAddressClient(rancherClient *RancherClient) *IpAddressClient {
|
||||
return &IpAddressClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *IpAddressClient) Create(container *IpAddress) (*IpAddress, error) {
|
||||
resp := &IpAddress{}
|
||||
err := c.rancherClient.doCreate(IP_ADDRESS_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *IpAddressClient) Update(existing *IpAddress, updates interface{}) (*IpAddress, error) {
|
||||
resp := &IpAddress{}
|
||||
err := c.rancherClient.doUpdate(IP_ADDRESS_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *IpAddressClient) List(opts *ListOpts) (*IpAddressCollection, error) {
|
||||
resp := &IpAddressCollection{}
|
||||
err := c.rancherClient.doList(IP_ADDRESS_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *IpAddressClient) ById(id string) (*IpAddress, error) {
|
||||
resp := &IpAddress{}
|
||||
err := c.rancherClient.doById(IP_ADDRESS_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *IpAddressClient) Delete(container *IpAddress) error {
|
||||
return c.rancherClient.doResourceDelete(IP_ADDRESS_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *IpAddressClient) ActionActivate(resource *IpAddress) (*IpAddress, error) {
|
||||
|
||||
resp := &IpAddress{}
|
||||
|
||||
err := c.rancherClient.doAction(IP_ADDRESS_TYPE, "activate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *IpAddressClient) ActionCreate(resource *IpAddress) (*IpAddress, error) {
|
||||
|
||||
resp := &IpAddress{}
|
||||
|
||||
err := c.rancherClient.doAction(IP_ADDRESS_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *IpAddressClient) ActionDeactivate(resource *IpAddress) (*IpAddress, error) {
|
||||
|
||||
resp := &IpAddress{}
|
||||
|
||||
err := c.rancherClient.doAction(IP_ADDRESS_TYPE, "deactivate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *IpAddressClient) ActionDisassociate(resource *IpAddress) (*IpAddress, error) {
|
||||
|
||||
resp := &IpAddress{}
|
||||
|
||||
err := c.rancherClient.doAction(IP_ADDRESS_TYPE, "disassociate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *IpAddressClient) ActionPurge(resource *IpAddress) (*IpAddress, error) {
|
||||
|
||||
resp := &IpAddress{}
|
||||
|
||||
err := c.rancherClient.doAction(IP_ADDRESS_TYPE, "purge", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *IpAddressClient) ActionRemove(resource *IpAddress) (*IpAddress, error) {
|
||||
|
||||
resp := &IpAddress{}
|
||||
|
||||
err := c.rancherClient.doAction(IP_ADDRESS_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *IpAddressClient) ActionRestore(resource *IpAddress) (*IpAddress, error) {
|
||||
|
||||
resp := &IpAddress{}
|
||||
|
||||
err := c.rancherClient.doAction(IP_ADDRESS_TYPE, "restore", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *IpAddressClient) ActionUpdate(resource *IpAddress) (*IpAddress, error) {
|
||||
|
||||
resp := &IpAddress{}
|
||||
|
||||
err := c.rancherClient.doAction(IP_ADDRESS_TYPE, "update", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
67
vendor/github.com/rancher/go-rancher/client/generated_ip_address_associate_input.go
generated
vendored
67
vendor/github.com/rancher/go-rancher/client/generated_ip_address_associate_input.go
generated
vendored
@ -1,67 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
IP_ADDRESS_ASSOCIATE_INPUT_TYPE = "ipAddressAssociateInput"
|
||||
)
|
||||
|
||||
type IpAddressAssociateInput struct {
|
||||
Resource
|
||||
|
||||
IpAddressId string `json:"ipAddressId,omitempty" yaml:"ip_address_id,omitempty"`
|
||||
}
|
||||
|
||||
type IpAddressAssociateInputCollection struct {
|
||||
Collection
|
||||
Data []IpAddressAssociateInput `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type IpAddressAssociateInputClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type IpAddressAssociateInputOperations interface {
|
||||
List(opts *ListOpts) (*IpAddressAssociateInputCollection, error)
|
||||
Create(opts *IpAddressAssociateInput) (*IpAddressAssociateInput, error)
|
||||
Update(existing *IpAddressAssociateInput, updates interface{}) (*IpAddressAssociateInput, error)
|
||||
ById(id string) (*IpAddressAssociateInput, error)
|
||||
Delete(container *IpAddressAssociateInput) error
|
||||
}
|
||||
|
||||
func newIpAddressAssociateInputClient(rancherClient *RancherClient) *IpAddressAssociateInputClient {
|
||||
return &IpAddressAssociateInputClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *IpAddressAssociateInputClient) Create(container *IpAddressAssociateInput) (*IpAddressAssociateInput, error) {
|
||||
resp := &IpAddressAssociateInput{}
|
||||
err := c.rancherClient.doCreate(IP_ADDRESS_ASSOCIATE_INPUT_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *IpAddressAssociateInputClient) Update(existing *IpAddressAssociateInput, updates interface{}) (*IpAddressAssociateInput, error) {
|
||||
resp := &IpAddressAssociateInput{}
|
||||
err := c.rancherClient.doUpdate(IP_ADDRESS_ASSOCIATE_INPUT_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *IpAddressAssociateInputClient) List(opts *ListOpts) (*IpAddressAssociateInputCollection, error) {
|
||||
resp := &IpAddressAssociateInputCollection{}
|
||||
err := c.rancherClient.doList(IP_ADDRESS_ASSOCIATE_INPUT_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *IpAddressAssociateInputClient) ById(id string) (*IpAddressAssociateInput, error) {
|
||||
resp := &IpAddressAssociateInput{}
|
||||
err := c.rancherClient.doById(IP_ADDRESS_ASSOCIATE_INPUT_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *IpAddressAssociateInputClient) Delete(container *IpAddressAssociateInput) error {
|
||||
return c.rancherClient.doResourceDelete(IP_ADDRESS_ASSOCIATE_INPUT_TYPE, &container.Resource)
|
||||
}
|
257
vendor/github.com/rancher/go-rancher/client/generated_kubernetes_service.go
generated
vendored
257
vendor/github.com/rancher/go-rancher/client/generated_kubernetes_service.go
generated
vendored
@ -1,257 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
KUBERNETES_SERVICE_TYPE = "kubernetesService"
|
||||
)
|
||||
|
||||
type KubernetesService struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
EnvironmentId string `json:"environmentId,omitempty" yaml:"environment_id,omitempty"`
|
||||
|
||||
ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
|
||||
|
||||
HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
SelectorContainer string `json:"selectorContainer,omitempty" yaml:"selector_container,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Template interface{} `json:"template,omitempty" yaml:"template,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
|
||||
Vip string `json:"vip,omitempty" yaml:"vip,omitempty"`
|
||||
}
|
||||
|
||||
type KubernetesServiceCollection struct {
|
||||
Collection
|
||||
Data []KubernetesService `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type KubernetesServiceClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type KubernetesServiceOperations interface {
|
||||
List(opts *ListOpts) (*KubernetesServiceCollection, error)
|
||||
Create(opts *KubernetesService) (*KubernetesService, error)
|
||||
Update(existing *KubernetesService, updates interface{}) (*KubernetesService, error)
|
||||
ById(id string) (*KubernetesService, error)
|
||||
Delete(container *KubernetesService) error
|
||||
|
||||
ActionActivate(*KubernetesService) (*Service, error)
|
||||
|
||||
ActionAddservicelink(*KubernetesService, *AddRemoveServiceLinkInput) (*Service, error)
|
||||
|
||||
ActionCancelrollback(*KubernetesService) (*Service, error)
|
||||
|
||||
ActionCancelupgrade(*KubernetesService) (*Service, error)
|
||||
|
||||
ActionCreate(*KubernetesService) (*Service, error)
|
||||
|
||||
ActionDeactivate(*KubernetesService) (*Service, error)
|
||||
|
||||
ActionFinishupgrade(*KubernetesService) (*Service, error)
|
||||
|
||||
ActionRemove(*KubernetesService) (*Service, error)
|
||||
|
||||
ActionRemoveservicelink(*KubernetesService, *AddRemoveServiceLinkInput) (*Service, error)
|
||||
|
||||
ActionRestart(*KubernetesService, *ServiceRestart) (*Service, error)
|
||||
|
||||
ActionRollback(*KubernetesService) (*Service, error)
|
||||
|
||||
ActionSetservicelinks(*KubernetesService, *SetServiceLinksInput) (*Service, error)
|
||||
|
||||
ActionUpdate(*KubernetesService) (*Service, error)
|
||||
|
||||
ActionUpgrade(*KubernetesService, *ServiceUpgrade) (*Service, error)
|
||||
}
|
||||
|
||||
func newKubernetesServiceClient(rancherClient *RancherClient) *KubernetesServiceClient {
|
||||
return &KubernetesServiceClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *KubernetesServiceClient) Create(container *KubernetesService) (*KubernetesService, error) {
|
||||
resp := &KubernetesService{}
|
||||
err := c.rancherClient.doCreate(KUBERNETES_SERVICE_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesServiceClient) Update(existing *KubernetesService, updates interface{}) (*KubernetesService, error) {
|
||||
resp := &KubernetesService{}
|
||||
err := c.rancherClient.doUpdate(KUBERNETES_SERVICE_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesServiceClient) List(opts *ListOpts) (*KubernetesServiceCollection, error) {
|
||||
resp := &KubernetesServiceCollection{}
|
||||
err := c.rancherClient.doList(KUBERNETES_SERVICE_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesServiceClient) ById(id string) (*KubernetesService, error) {
|
||||
resp := &KubernetesService{}
|
||||
err := c.rancherClient.doById(KUBERNETES_SERVICE_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesServiceClient) Delete(container *KubernetesService) error {
|
||||
return c.rancherClient.doResourceDelete(KUBERNETES_SERVICE_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *KubernetesServiceClient) ActionActivate(resource *KubernetesService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "activate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesServiceClient) ActionAddservicelink(resource *KubernetesService, input *AddRemoveServiceLinkInput) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "addservicelink", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesServiceClient) ActionCancelrollback(resource *KubernetesService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "cancelrollback", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesServiceClient) ActionCancelupgrade(resource *KubernetesService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "cancelupgrade", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesServiceClient) ActionCreate(resource *KubernetesService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesServiceClient) ActionDeactivate(resource *KubernetesService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "deactivate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesServiceClient) ActionFinishupgrade(resource *KubernetesService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "finishupgrade", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesServiceClient) ActionRemove(resource *KubernetesService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesServiceClient) ActionRemoveservicelink(resource *KubernetesService, input *AddRemoveServiceLinkInput) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "removeservicelink", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesServiceClient) ActionRestart(resource *KubernetesService, input *ServiceRestart) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "restart", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesServiceClient) ActionRollback(resource *KubernetesService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "rollback", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesServiceClient) ActionSetservicelinks(resource *KubernetesService, input *SetServiceLinksInput) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "setservicelinks", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesServiceClient) ActionUpdate(resource *KubernetesService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "update", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesServiceClient) ActionUpgrade(resource *KubernetesService, input *ServiceUpgrade) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "upgrade", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
193
vendor/github.com/rancher/go-rancher/client/generated_kubernetes_stack.go
generated
vendored
193
vendor/github.com/rancher/go-rancher/client/generated_kubernetes_stack.go
generated
vendored
@ -1,193 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
KUBERNETES_STACK_TYPE = "kubernetesStack"
|
||||
)
|
||||
|
||||
type KubernetesStack struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
Environment map[string]interface{} `json:"environment,omitempty" yaml:"environment,omitempty"`
|
||||
|
||||
ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
|
||||
|
||||
HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
|
||||
|
||||
PreviousEnvironment map[string]interface{} `json:"previousEnvironment,omitempty" yaml:"previous_environment,omitempty"`
|
||||
|
||||
PreviousExternalId string `json:"previousExternalId,omitempty" yaml:"previous_external_id,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Templates map[string]interface{} `json:"templates,omitempty" yaml:"templates,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type KubernetesStackCollection struct {
|
||||
Collection
|
||||
Data []KubernetesStack `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type KubernetesStackClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type KubernetesStackOperations interface {
|
||||
List(opts *ListOpts) (*KubernetesStackCollection, error)
|
||||
Create(opts *KubernetesStack) (*KubernetesStack, error)
|
||||
Update(existing *KubernetesStack, updates interface{}) (*KubernetesStack, error)
|
||||
ById(id string) (*KubernetesStack, error)
|
||||
Delete(container *KubernetesStack) error
|
||||
|
||||
ActionCancelrollback(*KubernetesStack) (*Environment, error)
|
||||
|
||||
ActionCancelupgrade(*KubernetesStack) (*Environment, error)
|
||||
|
||||
ActionCreate(*KubernetesStack) (*Environment, error)
|
||||
|
||||
ActionError(*KubernetesStack) (*Environment, error)
|
||||
|
||||
ActionFinishupgrade(*KubernetesStack) (*Environment, error)
|
||||
|
||||
ActionRemove(*KubernetesStack) (*Environment, error)
|
||||
|
||||
ActionRollback(*KubernetesStack) (*Environment, error)
|
||||
|
||||
ActionUpgrade(*KubernetesStack, *KubernetesStackUpgrade) (*KubernetesStack, error)
|
||||
}
|
||||
|
||||
func newKubernetesStackClient(rancherClient *RancherClient) *KubernetesStackClient {
|
||||
return &KubernetesStackClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *KubernetesStackClient) Create(container *KubernetesStack) (*KubernetesStack, error) {
|
||||
resp := &KubernetesStack{}
|
||||
err := c.rancherClient.doCreate(KUBERNETES_STACK_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesStackClient) Update(existing *KubernetesStack, updates interface{}) (*KubernetesStack, error) {
|
||||
resp := &KubernetesStack{}
|
||||
err := c.rancherClient.doUpdate(KUBERNETES_STACK_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesStackClient) List(opts *ListOpts) (*KubernetesStackCollection, error) {
|
||||
resp := &KubernetesStackCollection{}
|
||||
err := c.rancherClient.doList(KUBERNETES_STACK_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesStackClient) ById(id string) (*KubernetesStack, error) {
|
||||
resp := &KubernetesStack{}
|
||||
err := c.rancherClient.doById(KUBERNETES_STACK_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesStackClient) Delete(container *KubernetesStack) error {
|
||||
return c.rancherClient.doResourceDelete(KUBERNETES_STACK_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *KubernetesStackClient) ActionCancelrollback(resource *KubernetesStack) (*Environment, error) {
|
||||
|
||||
resp := &Environment{}
|
||||
|
||||
err := c.rancherClient.doAction(KUBERNETES_STACK_TYPE, "cancelrollback", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesStackClient) ActionCancelupgrade(resource *KubernetesStack) (*Environment, error) {
|
||||
|
||||
resp := &Environment{}
|
||||
|
||||
err := c.rancherClient.doAction(KUBERNETES_STACK_TYPE, "cancelupgrade", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesStackClient) ActionCreate(resource *KubernetesStack) (*Environment, error) {
|
||||
|
||||
resp := &Environment{}
|
||||
|
||||
err := c.rancherClient.doAction(KUBERNETES_STACK_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesStackClient) ActionError(resource *KubernetesStack) (*Environment, error) {
|
||||
|
||||
resp := &Environment{}
|
||||
|
||||
err := c.rancherClient.doAction(KUBERNETES_STACK_TYPE, "error", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesStackClient) ActionFinishupgrade(resource *KubernetesStack) (*Environment, error) {
|
||||
|
||||
resp := &Environment{}
|
||||
|
||||
err := c.rancherClient.doAction(KUBERNETES_STACK_TYPE, "finishupgrade", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesStackClient) ActionRemove(resource *KubernetesStack) (*Environment, error) {
|
||||
|
||||
resp := &Environment{}
|
||||
|
||||
err := c.rancherClient.doAction(KUBERNETES_STACK_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesStackClient) ActionRollback(resource *KubernetesStack) (*Environment, error) {
|
||||
|
||||
resp := &Environment{}
|
||||
|
||||
err := c.rancherClient.doAction(KUBERNETES_STACK_TYPE, "rollback", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesStackClient) ActionUpgrade(resource *KubernetesStack, input *KubernetesStackUpgrade) (*KubernetesStack, error) {
|
||||
|
||||
resp := &KubernetesStack{}
|
||||
|
||||
err := c.rancherClient.doAction(KUBERNETES_STACK_TYPE, "upgrade", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
71
vendor/github.com/rancher/go-rancher/client/generated_kubernetes_stack_upgrade.go
generated
vendored
71
vendor/github.com/rancher/go-rancher/client/generated_kubernetes_stack_upgrade.go
generated
vendored
@ -1,71 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
KUBERNETES_STACK_UPGRADE_TYPE = "kubernetesStackUpgrade"
|
||||
)
|
||||
|
||||
type KubernetesStackUpgrade struct {
|
||||
Resource
|
||||
|
||||
Environment map[string]interface{} `json:"environment,omitempty" yaml:"environment,omitempty"`
|
||||
|
||||
ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
|
||||
|
||||
Templates map[string]interface{} `json:"templates,omitempty" yaml:"templates,omitempty"`
|
||||
}
|
||||
|
||||
type KubernetesStackUpgradeCollection struct {
|
||||
Collection
|
||||
Data []KubernetesStackUpgrade `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type KubernetesStackUpgradeClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type KubernetesStackUpgradeOperations interface {
|
||||
List(opts *ListOpts) (*KubernetesStackUpgradeCollection, error)
|
||||
Create(opts *KubernetesStackUpgrade) (*KubernetesStackUpgrade, error)
|
||||
Update(existing *KubernetesStackUpgrade, updates interface{}) (*KubernetesStackUpgrade, error)
|
||||
ById(id string) (*KubernetesStackUpgrade, error)
|
||||
Delete(container *KubernetesStackUpgrade) error
|
||||
}
|
||||
|
||||
func newKubernetesStackUpgradeClient(rancherClient *RancherClient) *KubernetesStackUpgradeClient {
|
||||
return &KubernetesStackUpgradeClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *KubernetesStackUpgradeClient) Create(container *KubernetesStackUpgrade) (*KubernetesStackUpgrade, error) {
|
||||
resp := &KubernetesStackUpgrade{}
|
||||
err := c.rancherClient.doCreate(KUBERNETES_STACK_UPGRADE_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesStackUpgradeClient) Update(existing *KubernetesStackUpgrade, updates interface{}) (*KubernetesStackUpgrade, error) {
|
||||
resp := &KubernetesStackUpgrade{}
|
||||
err := c.rancherClient.doUpdate(KUBERNETES_STACK_UPGRADE_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesStackUpgradeClient) List(opts *ListOpts) (*KubernetesStackUpgradeCollection, error) {
|
||||
resp := &KubernetesStackUpgradeCollection{}
|
||||
err := c.rancherClient.doList(KUBERNETES_STACK_UPGRADE_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesStackUpgradeClient) ById(id string) (*KubernetesStackUpgrade, error) {
|
||||
resp := &KubernetesStackUpgrade{}
|
||||
err := c.rancherClient.doById(KUBERNETES_STACK_UPGRADE_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *KubernetesStackUpgradeClient) Delete(container *KubernetesStackUpgrade) error {
|
||||
return c.rancherClient.doResourceDelete(KUBERNETES_STACK_UPGRADE_TYPE, &container.Resource)
|
||||
}
|
117
vendor/github.com/rancher/go-rancher/client/generated_label.go
generated
vendored
117
vendor/github.com/rancher/go-rancher/client/generated_label.go
generated
vendored
@ -1,117 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
LABEL_TYPE = "label"
|
||||
)
|
||||
|
||||
type Label struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
Key string `json:"key,omitempty" yaml:"key,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
|
||||
Value string `json:"value,omitempty" yaml:"value,omitempty"`
|
||||
}
|
||||
|
||||
type LabelCollection struct {
|
||||
Collection
|
||||
Data []Label `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type LabelClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type LabelOperations interface {
|
||||
List(opts *ListOpts) (*LabelCollection, error)
|
||||
Create(opts *Label) (*Label, error)
|
||||
Update(existing *Label, updates interface{}) (*Label, error)
|
||||
ById(id string) (*Label, error)
|
||||
Delete(container *Label) error
|
||||
|
||||
ActionCreate(*Label) (*Label, error)
|
||||
|
||||
ActionRemove(*Label) (*Label, error)
|
||||
}
|
||||
|
||||
func newLabelClient(rancherClient *RancherClient) *LabelClient {
|
||||
return &LabelClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *LabelClient) Create(container *Label) (*Label, error) {
|
||||
resp := &Label{}
|
||||
err := c.rancherClient.doCreate(LABEL_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LabelClient) Update(existing *Label, updates interface{}) (*Label, error) {
|
||||
resp := &Label{}
|
||||
err := c.rancherClient.doUpdate(LABEL_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LabelClient) List(opts *ListOpts) (*LabelCollection, error) {
|
||||
resp := &LabelCollection{}
|
||||
err := c.rancherClient.doList(LABEL_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LabelClient) ById(id string) (*Label, error) {
|
||||
resp := &Label{}
|
||||
err := c.rancherClient.doById(LABEL_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LabelClient) Delete(container *Label) error {
|
||||
return c.rancherClient.doResourceDelete(LABEL_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *LabelClient) ActionCreate(resource *Label) (*Label, error) {
|
||||
|
||||
resp := &Label{}
|
||||
|
||||
err := c.rancherClient.doAction(LABEL_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LabelClient) ActionRemove(resource *Label) (*Label, error) {
|
||||
|
||||
resp := &Label{}
|
||||
|
||||
err := c.rancherClient.doAction(LABEL_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
430
vendor/github.com/rancher/go-rancher/client/generated_launch_config.go
generated
vendored
430
vendor/github.com/rancher/go-rancher/client/generated_launch_config.go
generated
vendored
@ -1,430 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
LAUNCH_CONFIG_TYPE = "launchConfig"
|
||||
)
|
||||
|
||||
type LaunchConfig struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
AgentId string `json:"agentId,omitempty" yaml:"agent_id,omitempty"`
|
||||
|
||||
AllocationState string `json:"allocationState,omitempty" yaml:"allocation_state,omitempty"`
|
||||
|
||||
BlkioDeviceOptions map[string]interface{} `json:"blkioDeviceOptions,omitempty" yaml:"blkio_device_options,omitempty"`
|
||||
|
||||
Build *DockerBuild `json:"build,omitempty" yaml:"build,omitempty"`
|
||||
|
||||
CapAdd []string `json:"capAdd,omitempty" yaml:"cap_add,omitempty"`
|
||||
|
||||
CapDrop []string `json:"capDrop,omitempty" yaml:"cap_drop,omitempty"`
|
||||
|
||||
Command []string `json:"command,omitempty" yaml:"command,omitempty"`
|
||||
|
||||
Count int64 `json:"count,omitempty" yaml:"count,omitempty"`
|
||||
|
||||
CpuSet string `json:"cpuSet,omitempty" yaml:"cpu_set,omitempty"`
|
||||
|
||||
CpuShares int64 `json:"cpuShares,omitempty" yaml:"cpu_shares,omitempty"`
|
||||
|
||||
CreateIndex int64 `json:"createIndex,omitempty" yaml:"create_index,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
DataVolumeMounts map[string]interface{} `json:"dataVolumeMounts,omitempty" yaml:"data_volume_mounts,omitempty"`
|
||||
|
||||
DataVolumes []string `json:"dataVolumes,omitempty" yaml:"data_volumes,omitempty"`
|
||||
|
||||
DataVolumesFrom []string `json:"dataVolumesFrom,omitempty" yaml:"data_volumes_from,omitempty"`
|
||||
|
||||
DataVolumesFromLaunchConfigs []string `json:"dataVolumesFromLaunchConfigs,omitempty" yaml:"data_volumes_from_launch_configs,omitempty"`
|
||||
|
||||
DeploymentUnitUuid string `json:"deploymentUnitUuid,omitempty" yaml:"deployment_unit_uuid,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
Devices []string `json:"devices,omitempty" yaml:"devices,omitempty"`
|
||||
|
||||
Disks []interface{} `json:"disks,omitempty" yaml:"disks,omitempty"`
|
||||
|
||||
Dns []string `json:"dns,omitempty" yaml:"dns,omitempty"`
|
||||
|
||||
DnsSearch []string `json:"dnsSearch,omitempty" yaml:"dns_search,omitempty"`
|
||||
|
||||
DomainName string `json:"domainName,omitempty" yaml:"domain_name,omitempty"`
|
||||
|
||||
EntryPoint []string `json:"entryPoint,omitempty" yaml:"entry_point,omitempty"`
|
||||
|
||||
Environment map[string]interface{} `json:"environment,omitempty" yaml:"environment,omitempty"`
|
||||
|
||||
Expose []string `json:"expose,omitempty" yaml:"expose,omitempty"`
|
||||
|
||||
ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
|
||||
|
||||
ExtraHosts []string `json:"extraHosts,omitempty" yaml:"extra_hosts,omitempty"`
|
||||
|
||||
FirstRunning string `json:"firstRunning,omitempty" yaml:"first_running,omitempty"`
|
||||
|
||||
HealthCheck *InstanceHealthCheck `json:"healthCheck,omitempty" yaml:"health_check,omitempty"`
|
||||
|
||||
HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"`
|
||||
|
||||
HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"`
|
||||
|
||||
Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"`
|
||||
|
||||
ImageUuid string `json:"imageUuid,omitempty" yaml:"image_uuid,omitempty"`
|
||||
|
||||
InstanceLinks map[string]interface{} `json:"instanceLinks,omitempty" yaml:"instance_links,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
Labels map[string]interface{} `json:"labels,omitempty" yaml:"labels,omitempty"`
|
||||
|
||||
LogConfig *LogConfig `json:"logConfig,omitempty" yaml:"log_config,omitempty"`
|
||||
|
||||
LxcConf map[string]interface{} `json:"lxcConf,omitempty" yaml:"lxc_conf,omitempty"`
|
||||
|
||||
Memory int64 `json:"memory,omitempty" yaml:"memory,omitempty"`
|
||||
|
||||
MemoryMb int64 `json:"memoryMb,omitempty" yaml:"memory_mb,omitempty"`
|
||||
|
||||
MemorySwap int64 `json:"memorySwap,omitempty" yaml:"memory_swap,omitempty"`
|
||||
|
||||
NativeContainer bool `json:"nativeContainer,omitempty" yaml:"native_container,omitempty"`
|
||||
|
||||
NetworkContainerId string `json:"networkContainerId,omitempty" yaml:"network_container_id,omitempty"`
|
||||
|
||||
NetworkIds []string `json:"networkIds,omitempty" yaml:"network_ids,omitempty"`
|
||||
|
||||
NetworkLaunchConfig string `json:"networkLaunchConfig,omitempty" yaml:"network_launch_config,omitempty"`
|
||||
|
||||
NetworkMode string `json:"networkMode,omitempty" yaml:"network_mode,omitempty"`
|
||||
|
||||
PidMode string `json:"pidMode,omitempty" yaml:"pid_mode,omitempty"`
|
||||
|
||||
Ports []string `json:"ports,omitempty" yaml:"ports,omitempty"`
|
||||
|
||||
PrimaryIpAddress string `json:"primaryIpAddress,omitempty" yaml:"primary_ip_address,omitempty"`
|
||||
|
||||
Privileged bool `json:"privileged,omitempty" yaml:"privileged,omitempty"`
|
||||
|
||||
PublishAllPorts bool `json:"publishAllPorts,omitempty" yaml:"publish_all_ports,omitempty"`
|
||||
|
||||
ReadOnly bool `json:"readOnly,omitempty" yaml:"read_only,omitempty"`
|
||||
|
||||
RegistryCredentialId string `json:"registryCredentialId,omitempty" yaml:"registry_credential_id,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
RequestedHostId string `json:"requestedHostId,omitempty" yaml:"requested_host_id,omitempty"`
|
||||
|
||||
RequestedIpAddress string `json:"requestedIpAddress,omitempty" yaml:"requested_ip_address,omitempty"`
|
||||
|
||||
SecurityOpt []string `json:"securityOpt,omitempty" yaml:"security_opt,omitempty"`
|
||||
|
||||
StartCount int64 `json:"startCount,omitempty" yaml:"start_count,omitempty"`
|
||||
|
||||
StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
StdinOpen bool `json:"stdinOpen,omitempty" yaml:"stdin_open,omitempty"`
|
||||
|
||||
SystemContainer string `json:"systemContainer,omitempty" yaml:"system_container,omitempty"`
|
||||
|
||||
Token string `json:"token,omitempty" yaml:"token,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Tty bool `json:"tty,omitempty" yaml:"tty,omitempty"`
|
||||
|
||||
User string `json:"user,omitempty" yaml:"user,omitempty"`
|
||||
|
||||
Userdata string `json:"userdata,omitempty" yaml:"userdata,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
|
||||
Vcpu int64 `json:"vcpu,omitempty" yaml:"vcpu,omitempty"`
|
||||
|
||||
Version string `json:"version,omitempty" yaml:"version,omitempty"`
|
||||
|
||||
VolumeDriver string `json:"volumeDriver,omitempty" yaml:"volume_driver,omitempty"`
|
||||
|
||||
WorkingDir string `json:"workingDir,omitempty" yaml:"working_dir,omitempty"`
|
||||
}
|
||||
|
||||
type LaunchConfigCollection struct {
|
||||
Collection
|
||||
Data []LaunchConfig `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type LaunchConfigClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type LaunchConfigOperations interface {
|
||||
List(opts *ListOpts) (*LaunchConfigCollection, error)
|
||||
Create(opts *LaunchConfig) (*LaunchConfig, error)
|
||||
Update(existing *LaunchConfig, updates interface{}) (*LaunchConfig, error)
|
||||
ById(id string) (*LaunchConfig, error)
|
||||
Delete(container *LaunchConfig) error
|
||||
|
||||
ActionAllocate(*LaunchConfig) (*Instance, error)
|
||||
|
||||
ActionConsole(*LaunchConfig, *InstanceConsoleInput) (*InstanceConsole, error)
|
||||
|
||||
ActionCreate(*LaunchConfig) (*Instance, error)
|
||||
|
||||
ActionDeallocate(*LaunchConfig) (*Instance, error)
|
||||
|
||||
ActionError(*LaunchConfig) (*Instance, error)
|
||||
|
||||
ActionExecute(*LaunchConfig, *ContainerExec) (*HostAccess, error)
|
||||
|
||||
ActionMigrate(*LaunchConfig) (*Instance, error)
|
||||
|
||||
ActionProxy(*LaunchConfig, *ContainerProxy) (*HostAccess, error)
|
||||
|
||||
ActionPurge(*LaunchConfig) (*Instance, error)
|
||||
|
||||
ActionRemove(*LaunchConfig) (*Instance, error)
|
||||
|
||||
ActionRestart(*LaunchConfig) (*Instance, error)
|
||||
|
||||
ActionRestore(*LaunchConfig) (*Instance, error)
|
||||
|
||||
ActionSetlabels(*LaunchConfig, *SetLabelsInput) (*Container, error)
|
||||
|
||||
ActionStart(*LaunchConfig) (*Instance, error)
|
||||
|
||||
ActionStop(*LaunchConfig, *InstanceStop) (*Instance, error)
|
||||
|
||||
ActionUpdate(*LaunchConfig) (*Instance, error)
|
||||
|
||||
ActionUpdatehealthy(*LaunchConfig) (*Instance, error)
|
||||
|
||||
ActionUpdatereinitializing(*LaunchConfig) (*Instance, error)
|
||||
|
||||
ActionUpdateunhealthy(*LaunchConfig) (*Instance, error)
|
||||
}
|
||||
|
||||
func newLaunchConfigClient(rancherClient *RancherClient) *LaunchConfigClient {
|
||||
return &LaunchConfigClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *LaunchConfigClient) Create(container *LaunchConfig) (*LaunchConfig, error) {
|
||||
resp := &LaunchConfig{}
|
||||
err := c.rancherClient.doCreate(LAUNCH_CONFIG_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LaunchConfigClient) Update(existing *LaunchConfig, updates interface{}) (*LaunchConfig, error) {
|
||||
resp := &LaunchConfig{}
|
||||
err := c.rancherClient.doUpdate(LAUNCH_CONFIG_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LaunchConfigClient) List(opts *ListOpts) (*LaunchConfigCollection, error) {
|
||||
resp := &LaunchConfigCollection{}
|
||||
err := c.rancherClient.doList(LAUNCH_CONFIG_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LaunchConfigClient) ById(id string) (*LaunchConfig, error) {
|
||||
resp := &LaunchConfig{}
|
||||
err := c.rancherClient.doById(LAUNCH_CONFIG_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LaunchConfigClient) Delete(container *LaunchConfig) error {
|
||||
return c.rancherClient.doResourceDelete(LAUNCH_CONFIG_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *LaunchConfigClient) ActionAllocate(resource *LaunchConfig) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "allocate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LaunchConfigClient) ActionConsole(resource *LaunchConfig, input *InstanceConsoleInput) (*InstanceConsole, error) {
|
||||
|
||||
resp := &InstanceConsole{}
|
||||
|
||||
err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "console", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LaunchConfigClient) ActionCreate(resource *LaunchConfig) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LaunchConfigClient) ActionDeallocate(resource *LaunchConfig) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "deallocate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LaunchConfigClient) ActionError(resource *LaunchConfig) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "error", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LaunchConfigClient) ActionExecute(resource *LaunchConfig, input *ContainerExec) (*HostAccess, error) {
|
||||
|
||||
resp := &HostAccess{}
|
||||
|
||||
err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "execute", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LaunchConfigClient) ActionMigrate(resource *LaunchConfig) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "migrate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LaunchConfigClient) ActionProxy(resource *LaunchConfig, input *ContainerProxy) (*HostAccess, error) {
|
||||
|
||||
resp := &HostAccess{}
|
||||
|
||||
err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "proxy", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LaunchConfigClient) ActionPurge(resource *LaunchConfig) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "purge", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LaunchConfigClient) ActionRemove(resource *LaunchConfig) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LaunchConfigClient) ActionRestart(resource *LaunchConfig) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "restart", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LaunchConfigClient) ActionRestore(resource *LaunchConfig) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "restore", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LaunchConfigClient) ActionSetlabels(resource *LaunchConfig, input *SetLabelsInput) (*Container, error) {
|
||||
|
||||
resp := &Container{}
|
||||
|
||||
err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "setlabels", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LaunchConfigClient) ActionStart(resource *LaunchConfig) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "start", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LaunchConfigClient) ActionStop(resource *LaunchConfig, input *InstanceStop) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "stop", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LaunchConfigClient) ActionUpdate(resource *LaunchConfig) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "update", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LaunchConfigClient) ActionUpdatehealthy(resource *LaunchConfig) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "updatehealthy", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LaunchConfigClient) ActionUpdatereinitializing(resource *LaunchConfig) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "updatereinitializing", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LaunchConfigClient) ActionUpdateunhealthy(resource *LaunchConfig) (*Instance, error) {
|
||||
|
||||
resp := &Instance{}
|
||||
|
||||
err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "updateunhealthy", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
111
vendor/github.com/rancher/go-rancher/client/generated_ldapconfig.go
generated
vendored
111
vendor/github.com/rancher/go-rancher/client/generated_ldapconfig.go
generated
vendored
@ -1,111 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
LDAPCONFIG_TYPE = "ldapconfig"
|
||||
)
|
||||
|
||||
type Ldapconfig struct {
|
||||
Resource
|
||||
|
||||
AccessMode string `json:"accessMode,omitempty" yaml:"access_mode,omitempty"`
|
||||
|
||||
AllowedIdentities []interface{} `json:"allowedIdentities,omitempty" yaml:"allowed_identities,omitempty"`
|
||||
|
||||
ConnectionTimeout int64 `json:"connectionTimeout,omitempty" yaml:"connection_timeout,omitempty"`
|
||||
|
||||
Domain string `json:"domain,omitempty" yaml:"domain,omitempty"`
|
||||
|
||||
Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
|
||||
|
||||
GroupMemberMappingAttribute string `json:"groupMemberMappingAttribute,omitempty" yaml:"group_member_mapping_attribute,omitempty"`
|
||||
|
||||
GroupNameField string `json:"groupNameField,omitempty" yaml:"group_name_field,omitempty"`
|
||||
|
||||
GroupObjectClass string `json:"groupObjectClass,omitempty" yaml:"group_object_class,omitempty"`
|
||||
|
||||
GroupSearchField string `json:"groupSearchField,omitempty" yaml:"group_search_field,omitempty"`
|
||||
|
||||
LoginDomain string `json:"loginDomain,omitempty" yaml:"login_domain,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
Port int64 `json:"port,omitempty" yaml:"port,omitempty"`
|
||||
|
||||
Server string `json:"server,omitempty" yaml:"server,omitempty"`
|
||||
|
||||
ServiceAccountPassword string `json:"serviceAccountPassword,omitempty" yaml:"service_account_password,omitempty"`
|
||||
|
||||
ServiceAccountUsername string `json:"serviceAccountUsername,omitempty" yaml:"service_account_username,omitempty"`
|
||||
|
||||
Tls bool `json:"tls,omitempty" yaml:"tls,omitempty"`
|
||||
|
||||
UserDisabledBitMask int64 `json:"userDisabledBitMask,omitempty" yaml:"user_disabled_bit_mask,omitempty"`
|
||||
|
||||
UserEnabledAttribute string `json:"userEnabledAttribute,omitempty" yaml:"user_enabled_attribute,omitempty"`
|
||||
|
||||
UserLoginField string `json:"userLoginField,omitempty" yaml:"user_login_field,omitempty"`
|
||||
|
||||
UserMemberAttribute string `json:"userMemberAttribute,omitempty" yaml:"user_member_attribute,omitempty"`
|
||||
|
||||
UserNameField string `json:"userNameField,omitempty" yaml:"user_name_field,omitempty"`
|
||||
|
||||
UserObjectClass string `json:"userObjectClass,omitempty" yaml:"user_object_class,omitempty"`
|
||||
|
||||
UserSearchField string `json:"userSearchField,omitempty" yaml:"user_search_field,omitempty"`
|
||||
}
|
||||
|
||||
type LdapconfigCollection struct {
|
||||
Collection
|
||||
Data []Ldapconfig `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type LdapconfigClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type LdapconfigOperations interface {
|
||||
List(opts *ListOpts) (*LdapconfigCollection, error)
|
||||
Create(opts *Ldapconfig) (*Ldapconfig, error)
|
||||
Update(existing *Ldapconfig, updates interface{}) (*Ldapconfig, error)
|
||||
ById(id string) (*Ldapconfig, error)
|
||||
Delete(container *Ldapconfig) error
|
||||
}
|
||||
|
||||
func newLdapconfigClient(rancherClient *RancherClient) *LdapconfigClient {
|
||||
return &LdapconfigClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *LdapconfigClient) Create(container *Ldapconfig) (*Ldapconfig, error) {
|
||||
resp := &Ldapconfig{}
|
||||
err := c.rancherClient.doCreate(LDAPCONFIG_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LdapconfigClient) Update(existing *Ldapconfig, updates interface{}) (*Ldapconfig, error) {
|
||||
resp := &Ldapconfig{}
|
||||
err := c.rancherClient.doUpdate(LDAPCONFIG_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LdapconfigClient) List(opts *ListOpts) (*LdapconfigCollection, error) {
|
||||
resp := &LdapconfigCollection{}
|
||||
err := c.rancherClient.doList(LDAPCONFIG_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LdapconfigClient) ById(id string) (*Ldapconfig, error) {
|
||||
resp := &Ldapconfig{}
|
||||
err := c.rancherClient.doById(LDAPCONFIG_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LdapconfigClient) Delete(container *Ldapconfig) error {
|
||||
return c.rancherClient.doResourceDelete(LDAPCONFIG_TYPE, &container.Resource)
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
LOAD_BALANCER_APP_COOKIE_STICKINESS_POLICY_TYPE = "loadBalancerAppCookieStickinessPolicy"
|
||||
)
|
||||
|
||||
type LoadBalancerAppCookieStickinessPolicy struct {
|
||||
Resource
|
||||
|
||||
Cookie string `json:"cookie,omitempty" yaml:"cookie,omitempty"`
|
||||
|
||||
MaxLength int64 `json:"maxLength,omitempty" yaml:"max_length,omitempty"`
|
||||
|
||||
Mode string `json:"mode,omitempty" yaml:"mode,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
Prefix bool `json:"prefix,omitempty" yaml:"prefix,omitempty"`
|
||||
|
||||
RequestLearn bool `json:"requestLearn,omitempty" yaml:"request_learn,omitempty"`
|
||||
|
||||
Timeout int64 `json:"timeout,omitempty" yaml:"timeout,omitempty"`
|
||||
}
|
||||
|
||||
type LoadBalancerAppCookieStickinessPolicyCollection struct {
|
||||
Collection
|
||||
Data []LoadBalancerAppCookieStickinessPolicy `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type LoadBalancerAppCookieStickinessPolicyClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type LoadBalancerAppCookieStickinessPolicyOperations interface {
|
||||
List(opts *ListOpts) (*LoadBalancerAppCookieStickinessPolicyCollection, error)
|
||||
Create(opts *LoadBalancerAppCookieStickinessPolicy) (*LoadBalancerAppCookieStickinessPolicy, error)
|
||||
Update(existing *LoadBalancerAppCookieStickinessPolicy, updates interface{}) (*LoadBalancerAppCookieStickinessPolicy, error)
|
||||
ById(id string) (*LoadBalancerAppCookieStickinessPolicy, error)
|
||||
Delete(container *LoadBalancerAppCookieStickinessPolicy) error
|
||||
}
|
||||
|
||||
func newLoadBalancerAppCookieStickinessPolicyClient(rancherClient *RancherClient) *LoadBalancerAppCookieStickinessPolicyClient {
|
||||
return &LoadBalancerAppCookieStickinessPolicyClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *LoadBalancerAppCookieStickinessPolicyClient) Create(container *LoadBalancerAppCookieStickinessPolicy) (*LoadBalancerAppCookieStickinessPolicy, error) {
|
||||
resp := &LoadBalancerAppCookieStickinessPolicy{}
|
||||
err := c.rancherClient.doCreate(LOAD_BALANCER_APP_COOKIE_STICKINESS_POLICY_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerAppCookieStickinessPolicyClient) Update(existing *LoadBalancerAppCookieStickinessPolicy, updates interface{}) (*LoadBalancerAppCookieStickinessPolicy, error) {
|
||||
resp := &LoadBalancerAppCookieStickinessPolicy{}
|
||||
err := c.rancherClient.doUpdate(LOAD_BALANCER_APP_COOKIE_STICKINESS_POLICY_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerAppCookieStickinessPolicyClient) List(opts *ListOpts) (*LoadBalancerAppCookieStickinessPolicyCollection, error) {
|
||||
resp := &LoadBalancerAppCookieStickinessPolicyCollection{}
|
||||
err := c.rancherClient.doList(LOAD_BALANCER_APP_COOKIE_STICKINESS_POLICY_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerAppCookieStickinessPolicyClient) ById(id string) (*LoadBalancerAppCookieStickinessPolicy, error) {
|
||||
resp := &LoadBalancerAppCookieStickinessPolicy{}
|
||||
err := c.rancherClient.doById(LOAD_BALANCER_APP_COOKIE_STICKINESS_POLICY_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerAppCookieStickinessPolicyClient) Delete(container *LoadBalancerAppCookieStickinessPolicy) error {
|
||||
return c.rancherClient.doResourceDelete(LOAD_BALANCER_APP_COOKIE_STICKINESS_POLICY_TYPE, &container.Resource)
|
||||
}
|
69
vendor/github.com/rancher/go-rancher/client/generated_load_balancer_config.go
generated
vendored
69
vendor/github.com/rancher/go-rancher/client/generated_load_balancer_config.go
generated
vendored
@ -1,69 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
LOAD_BALANCER_CONFIG_TYPE = "loadBalancerConfig"
|
||||
)
|
||||
|
||||
type LoadBalancerConfig struct {
|
||||
Resource
|
||||
|
||||
HaproxyConfig *HaproxyConfig `json:"haproxyConfig,omitempty" yaml:"haproxy_config,omitempty"`
|
||||
|
||||
LbCookieStickinessPolicy *LoadBalancerCookieStickinessPolicy `json:"lbCookieStickinessPolicy,omitempty" yaml:"lb_cookie_stickiness_policy,omitempty"`
|
||||
}
|
||||
|
||||
type LoadBalancerConfigCollection struct {
|
||||
Collection
|
||||
Data []LoadBalancerConfig `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type LoadBalancerConfigClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type LoadBalancerConfigOperations interface {
|
||||
List(opts *ListOpts) (*LoadBalancerConfigCollection, error)
|
||||
Create(opts *LoadBalancerConfig) (*LoadBalancerConfig, error)
|
||||
Update(existing *LoadBalancerConfig, updates interface{}) (*LoadBalancerConfig, error)
|
||||
ById(id string) (*LoadBalancerConfig, error)
|
||||
Delete(container *LoadBalancerConfig) error
|
||||
}
|
||||
|
||||
func newLoadBalancerConfigClient(rancherClient *RancherClient) *LoadBalancerConfigClient {
|
||||
return &LoadBalancerConfigClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *LoadBalancerConfigClient) Create(container *LoadBalancerConfig) (*LoadBalancerConfig, error) {
|
||||
resp := &LoadBalancerConfig{}
|
||||
err := c.rancherClient.doCreate(LOAD_BALANCER_CONFIG_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerConfigClient) Update(existing *LoadBalancerConfig, updates interface{}) (*LoadBalancerConfig, error) {
|
||||
resp := &LoadBalancerConfig{}
|
||||
err := c.rancherClient.doUpdate(LOAD_BALANCER_CONFIG_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerConfigClient) List(opts *ListOpts) (*LoadBalancerConfigCollection, error) {
|
||||
resp := &LoadBalancerConfigCollection{}
|
||||
err := c.rancherClient.doList(LOAD_BALANCER_CONFIG_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerConfigClient) ById(id string) (*LoadBalancerConfig, error) {
|
||||
resp := &LoadBalancerConfig{}
|
||||
err := c.rancherClient.doById(LOAD_BALANCER_CONFIG_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerConfigClient) Delete(container *LoadBalancerConfig) error {
|
||||
return c.rancherClient.doResourceDelete(LOAD_BALANCER_CONFIG_TYPE, &container.Resource)
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
LOAD_BALANCER_COOKIE_STICKINESS_POLICY_TYPE = "loadBalancerCookieStickinessPolicy"
|
||||
)
|
||||
|
||||
type LoadBalancerCookieStickinessPolicy struct {
|
||||
Resource
|
||||
|
||||
Cookie string `json:"cookie,omitempty" yaml:"cookie,omitempty"`
|
||||
|
||||
Domain string `json:"domain,omitempty" yaml:"domain,omitempty"`
|
||||
|
||||
Indirect bool `json:"indirect,omitempty" yaml:"indirect,omitempty"`
|
||||
|
||||
Mode string `json:"mode,omitempty" yaml:"mode,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
Nocache bool `json:"nocache,omitempty" yaml:"nocache,omitempty"`
|
||||
|
||||
Postonly bool `json:"postonly,omitempty" yaml:"postonly,omitempty"`
|
||||
}
|
||||
|
||||
type LoadBalancerCookieStickinessPolicyCollection struct {
|
||||
Collection
|
||||
Data []LoadBalancerCookieStickinessPolicy `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type LoadBalancerCookieStickinessPolicyClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type LoadBalancerCookieStickinessPolicyOperations interface {
|
||||
List(opts *ListOpts) (*LoadBalancerCookieStickinessPolicyCollection, error)
|
||||
Create(opts *LoadBalancerCookieStickinessPolicy) (*LoadBalancerCookieStickinessPolicy, error)
|
||||
Update(existing *LoadBalancerCookieStickinessPolicy, updates interface{}) (*LoadBalancerCookieStickinessPolicy, error)
|
||||
ById(id string) (*LoadBalancerCookieStickinessPolicy, error)
|
||||
Delete(container *LoadBalancerCookieStickinessPolicy) error
|
||||
}
|
||||
|
||||
func newLoadBalancerCookieStickinessPolicyClient(rancherClient *RancherClient) *LoadBalancerCookieStickinessPolicyClient {
|
||||
return &LoadBalancerCookieStickinessPolicyClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *LoadBalancerCookieStickinessPolicyClient) Create(container *LoadBalancerCookieStickinessPolicy) (*LoadBalancerCookieStickinessPolicy, error) {
|
||||
resp := &LoadBalancerCookieStickinessPolicy{}
|
||||
err := c.rancherClient.doCreate(LOAD_BALANCER_COOKIE_STICKINESS_POLICY_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerCookieStickinessPolicyClient) Update(existing *LoadBalancerCookieStickinessPolicy, updates interface{}) (*LoadBalancerCookieStickinessPolicy, error) {
|
||||
resp := &LoadBalancerCookieStickinessPolicy{}
|
||||
err := c.rancherClient.doUpdate(LOAD_BALANCER_COOKIE_STICKINESS_POLICY_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerCookieStickinessPolicyClient) List(opts *ListOpts) (*LoadBalancerCookieStickinessPolicyCollection, error) {
|
||||
resp := &LoadBalancerCookieStickinessPolicyCollection{}
|
||||
err := c.rancherClient.doList(LOAD_BALANCER_COOKIE_STICKINESS_POLICY_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerCookieStickinessPolicyClient) ById(id string) (*LoadBalancerCookieStickinessPolicy, error) {
|
||||
resp := &LoadBalancerCookieStickinessPolicy{}
|
||||
err := c.rancherClient.doById(LOAD_BALANCER_COOKIE_STICKINESS_POLICY_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerCookieStickinessPolicyClient) Delete(container *LoadBalancerCookieStickinessPolicy) error {
|
||||
return c.rancherClient.doResourceDelete(LOAD_BALANCER_COOKIE_STICKINESS_POLICY_TYPE, &container.Resource)
|
||||
}
|
283
vendor/github.com/rancher/go-rancher/client/generated_load_balancer_service.go
generated
vendored
283
vendor/github.com/rancher/go-rancher/client/generated_load_balancer_service.go
generated
vendored
@ -1,283 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
LOAD_BALANCER_SERVICE_TYPE = "loadBalancerService"
|
||||
)
|
||||
|
||||
type LoadBalancerService struct {
|
||||
Resource
|
||||
|
||||
AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
|
||||
|
||||
AssignServiceIpAddress bool `json:"assignServiceIpAddress,omitempty" yaml:"assign_service_ip_address,omitempty"`
|
||||
|
||||
CertificateIds []string `json:"certificateIds,omitempty" yaml:"certificate_ids,omitempty"`
|
||||
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
|
||||
CurrentScale int64 `json:"currentScale,omitempty" yaml:"current_scale,omitempty"`
|
||||
|
||||
Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
|
||||
|
||||
DefaultCertificateId string `json:"defaultCertificateId,omitempty" yaml:"default_certificate_id,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
EnvironmentId string `json:"environmentId,omitempty" yaml:"environment_id,omitempty"`
|
||||
|
||||
ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
|
||||
|
||||
Fqdn string `json:"fqdn,omitempty" yaml:"fqdn,omitempty"`
|
||||
|
||||
HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"`
|
||||
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
|
||||
LaunchConfig *LaunchConfig `json:"launchConfig,omitempty" yaml:"launch_config,omitempty"`
|
||||
|
||||
LoadBalancerConfig *LoadBalancerConfig `json:"loadBalancerConfig,omitempty" yaml:"load_balancer_config,omitempty"`
|
||||
|
||||
Metadata map[string]interface{} `json:"metadata,omitempty" yaml:"metadata,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
PublicEndpoints []interface{} `json:"publicEndpoints,omitempty" yaml:"public_endpoints,omitempty"`
|
||||
|
||||
RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
|
||||
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
|
||||
RetainIp bool `json:"retainIp,omitempty" yaml:"retain_ip,omitempty"`
|
||||
|
||||
Scale int64 `json:"scale,omitempty" yaml:"scale,omitempty"`
|
||||
|
||||
ScalePolicy *ScalePolicy `json:"scalePolicy,omitempty" yaml:"scale_policy,omitempty"`
|
||||
|
||||
SelectorLink string `json:"selectorLink,omitempty" yaml:"selector_link,omitempty"`
|
||||
|
||||
StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"`
|
||||
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
|
||||
|
||||
TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
|
||||
|
||||
Upgrade *ServiceUpgrade `json:"upgrade,omitempty" yaml:"upgrade,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
|
||||
Vip string `json:"vip,omitempty" yaml:"vip,omitempty"`
|
||||
}
|
||||
|
||||
type LoadBalancerServiceCollection struct {
|
||||
Collection
|
||||
Data []LoadBalancerService `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type LoadBalancerServiceClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type LoadBalancerServiceOperations interface {
|
||||
List(opts *ListOpts) (*LoadBalancerServiceCollection, error)
|
||||
Create(opts *LoadBalancerService) (*LoadBalancerService, error)
|
||||
Update(existing *LoadBalancerService, updates interface{}) (*LoadBalancerService, error)
|
||||
ById(id string) (*LoadBalancerService, error)
|
||||
Delete(container *LoadBalancerService) error
|
||||
|
||||
ActionActivate(*LoadBalancerService) (*Service, error)
|
||||
|
||||
ActionAddservicelink(*LoadBalancerService, *AddRemoveLoadBalancerServiceLinkInput) (*Service, error)
|
||||
|
||||
ActionCancelrollback(*LoadBalancerService) (*Service, error)
|
||||
|
||||
ActionCancelupgrade(*LoadBalancerService) (*Service, error)
|
||||
|
||||
ActionCreate(*LoadBalancerService) (*Service, error)
|
||||
|
||||
ActionDeactivate(*LoadBalancerService) (*Service, error)
|
||||
|
||||
ActionFinishupgrade(*LoadBalancerService) (*Service, error)
|
||||
|
||||
ActionRemove(*LoadBalancerService) (*Service, error)
|
||||
|
||||
ActionRemoveservicelink(*LoadBalancerService, *AddRemoveLoadBalancerServiceLinkInput) (*Service, error)
|
||||
|
||||
ActionRestart(*LoadBalancerService, *ServiceRestart) (*Service, error)
|
||||
|
||||
ActionRollback(*LoadBalancerService) (*Service, error)
|
||||
|
||||
ActionSetservicelinks(*LoadBalancerService, *SetLoadBalancerServiceLinksInput) (*Service, error)
|
||||
|
||||
ActionUpdate(*LoadBalancerService) (*Service, error)
|
||||
|
||||
ActionUpgrade(*LoadBalancerService, *ServiceUpgrade) (*Service, error)
|
||||
}
|
||||
|
||||
func newLoadBalancerServiceClient(rancherClient *RancherClient) *LoadBalancerServiceClient {
|
||||
return &LoadBalancerServiceClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *LoadBalancerServiceClient) Create(container *LoadBalancerService) (*LoadBalancerService, error) {
|
||||
resp := &LoadBalancerService{}
|
||||
err := c.rancherClient.doCreate(LOAD_BALANCER_SERVICE_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerServiceClient) Update(existing *LoadBalancerService, updates interface{}) (*LoadBalancerService, error) {
|
||||
resp := &LoadBalancerService{}
|
||||
err := c.rancherClient.doUpdate(LOAD_BALANCER_SERVICE_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerServiceClient) List(opts *ListOpts) (*LoadBalancerServiceCollection, error) {
|
||||
resp := &LoadBalancerServiceCollection{}
|
||||
err := c.rancherClient.doList(LOAD_BALANCER_SERVICE_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerServiceClient) ById(id string) (*LoadBalancerService, error) {
|
||||
resp := &LoadBalancerService{}
|
||||
err := c.rancherClient.doById(LOAD_BALANCER_SERVICE_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerServiceClient) Delete(container *LoadBalancerService) error {
|
||||
return c.rancherClient.doResourceDelete(LOAD_BALANCER_SERVICE_TYPE, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *LoadBalancerServiceClient) ActionActivate(resource *LoadBalancerService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "activate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerServiceClient) ActionAddservicelink(resource *LoadBalancerService, input *AddRemoveLoadBalancerServiceLinkInput) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "addservicelink", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerServiceClient) ActionCancelrollback(resource *LoadBalancerService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "cancelrollback", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerServiceClient) ActionCancelupgrade(resource *LoadBalancerService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "cancelupgrade", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerServiceClient) ActionCreate(resource *LoadBalancerService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "create", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerServiceClient) ActionDeactivate(resource *LoadBalancerService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "deactivate", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerServiceClient) ActionFinishupgrade(resource *LoadBalancerService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "finishupgrade", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerServiceClient) ActionRemove(resource *LoadBalancerService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "remove", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerServiceClient) ActionRemoveservicelink(resource *LoadBalancerService, input *AddRemoveLoadBalancerServiceLinkInput) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "removeservicelink", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerServiceClient) ActionRestart(resource *LoadBalancerService, input *ServiceRestart) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "restart", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerServiceClient) ActionRollback(resource *LoadBalancerService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "rollback", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerServiceClient) ActionSetservicelinks(resource *LoadBalancerService, input *SetLoadBalancerServiceLinksInput) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "setservicelinks", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerServiceClient) ActionUpdate(resource *LoadBalancerService) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "update", &resource.Resource, nil, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerServiceClient) ActionUpgrade(resource *LoadBalancerService, input *ServiceUpgrade) (*Service, error) {
|
||||
|
||||
resp := &Service{}
|
||||
|
||||
err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "upgrade", &resource.Resource, input, resp)
|
||||
|
||||
return resp, err
|
||||
}
|
71
vendor/github.com/rancher/go-rancher/client/generated_load_balancer_service_link.go
generated
vendored
71
vendor/github.com/rancher/go-rancher/client/generated_load_balancer_service_link.go
generated
vendored
@ -1,71 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
LOAD_BALANCER_SERVICE_LINK_TYPE = "loadBalancerServiceLink"
|
||||
)
|
||||
|
||||
type LoadBalancerServiceLink struct {
|
||||
Resource
|
||||
|
||||
Ports []string `json:"ports,omitempty" yaml:"ports,omitempty"`
|
||||
|
||||
ServiceId string `json:"serviceId,omitempty" yaml:"service_id,omitempty"`
|
||||
|
||||
Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type LoadBalancerServiceLinkCollection struct {
|
||||
Collection
|
||||
Data []LoadBalancerServiceLink `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type LoadBalancerServiceLinkClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type LoadBalancerServiceLinkOperations interface {
|
||||
List(opts *ListOpts) (*LoadBalancerServiceLinkCollection, error)
|
||||
Create(opts *LoadBalancerServiceLink) (*LoadBalancerServiceLink, error)
|
||||
Update(existing *LoadBalancerServiceLink, updates interface{}) (*LoadBalancerServiceLink, error)
|
||||
ById(id string) (*LoadBalancerServiceLink, error)
|
||||
Delete(container *LoadBalancerServiceLink) error
|
||||
}
|
||||
|
||||
func newLoadBalancerServiceLinkClient(rancherClient *RancherClient) *LoadBalancerServiceLinkClient {
|
||||
return &LoadBalancerServiceLinkClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *LoadBalancerServiceLinkClient) Create(container *LoadBalancerServiceLink) (*LoadBalancerServiceLink, error) {
|
||||
resp := &LoadBalancerServiceLink{}
|
||||
err := c.rancherClient.doCreate(LOAD_BALANCER_SERVICE_LINK_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerServiceLinkClient) Update(existing *LoadBalancerServiceLink, updates interface{}) (*LoadBalancerServiceLink, error) {
|
||||
resp := &LoadBalancerServiceLink{}
|
||||
err := c.rancherClient.doUpdate(LOAD_BALANCER_SERVICE_LINK_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerServiceLinkClient) List(opts *ListOpts) (*LoadBalancerServiceLinkCollection, error) {
|
||||
resp := &LoadBalancerServiceLinkCollection{}
|
||||
err := c.rancherClient.doList(LOAD_BALANCER_SERVICE_LINK_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerServiceLinkClient) ById(id string) (*LoadBalancerServiceLink, error) {
|
||||
resp := &LoadBalancerServiceLink{}
|
||||
err := c.rancherClient.doById(LOAD_BALANCER_SERVICE_LINK_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LoadBalancerServiceLinkClient) Delete(container *LoadBalancerServiceLink) error {
|
||||
return c.rancherClient.doResourceDelete(LOAD_BALANCER_SERVICE_LINK_TYPE, &container.Resource)
|
||||
}
|
75
vendor/github.com/rancher/go-rancher/client/generated_local_auth_config.go
generated
vendored
75
vendor/github.com/rancher/go-rancher/client/generated_local_auth_config.go
generated
vendored
@ -1,75 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
LOCAL_AUTH_CONFIG_TYPE = "localAuthConfig"
|
||||
)
|
||||
|
||||
type LocalAuthConfig struct {
|
||||
Resource
|
||||
|
||||
AccessMode string `json:"accessMode,omitempty" yaml:"access_mode,omitempty"`
|
||||
|
||||
Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
|
||||
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
Password string `json:"password,omitempty" yaml:"password,omitempty"`
|
||||
|
||||
Username string `json:"username,omitempty" yaml:"username,omitempty"`
|
||||
}
|
||||
|
||||
type LocalAuthConfigCollection struct {
|
||||
Collection
|
||||
Data []LocalAuthConfig `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type LocalAuthConfigClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type LocalAuthConfigOperations interface {
|
||||
List(opts *ListOpts) (*LocalAuthConfigCollection, error)
|
||||
Create(opts *LocalAuthConfig) (*LocalAuthConfig, error)
|
||||
Update(existing *LocalAuthConfig, updates interface{}) (*LocalAuthConfig, error)
|
||||
ById(id string) (*LocalAuthConfig, error)
|
||||
Delete(container *LocalAuthConfig) error
|
||||
}
|
||||
|
||||
func newLocalAuthConfigClient(rancherClient *RancherClient) *LocalAuthConfigClient {
|
||||
return &LocalAuthConfigClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *LocalAuthConfigClient) Create(container *LocalAuthConfig) (*LocalAuthConfig, error) {
|
||||
resp := &LocalAuthConfig{}
|
||||
err := c.rancherClient.doCreate(LOCAL_AUTH_CONFIG_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LocalAuthConfigClient) Update(existing *LocalAuthConfig, updates interface{}) (*LocalAuthConfig, error) {
|
||||
resp := &LocalAuthConfig{}
|
||||
err := c.rancherClient.doUpdate(LOCAL_AUTH_CONFIG_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LocalAuthConfigClient) List(opts *ListOpts) (*LocalAuthConfigCollection, error) {
|
||||
resp := &LocalAuthConfigCollection{}
|
||||
err := c.rancherClient.doList(LOCAL_AUTH_CONFIG_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LocalAuthConfigClient) ById(id string) (*LocalAuthConfig, error) {
|
||||
resp := &LocalAuthConfig{}
|
||||
err := c.rancherClient.doById(LOCAL_AUTH_CONFIG_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LocalAuthConfigClient) Delete(container *LocalAuthConfig) error {
|
||||
return c.rancherClient.doResourceDelete(LOCAL_AUTH_CONFIG_TYPE, &container.Resource)
|
||||
}
|
69
vendor/github.com/rancher/go-rancher/client/generated_log_config.go
generated
vendored
69
vendor/github.com/rancher/go-rancher/client/generated_log_config.go
generated
vendored
@ -1,69 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
LOG_CONFIG_TYPE = "logConfig"
|
||||
)
|
||||
|
||||
type LogConfig struct {
|
||||
Resource
|
||||
|
||||
Config map[string]interface{} `json:"config,omitempty" yaml:"config,omitempty"`
|
||||
|
||||
Driver string `json:"driver,omitempty" yaml:"driver,omitempty"`
|
||||
}
|
||||
|
||||
type LogConfigCollection struct {
|
||||
Collection
|
||||
Data []LogConfig `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
type LogConfigClient struct {
|
||||
rancherClient *RancherClient
|
||||
}
|
||||
|
||||
type LogConfigOperations interface {
|
||||
List(opts *ListOpts) (*LogConfigCollection, error)
|
||||
Create(opts *LogConfig) (*LogConfig, error)
|
||||
Update(existing *LogConfig, updates interface{}) (*LogConfig, error)
|
||||
ById(id string) (*LogConfig, error)
|
||||
Delete(container *LogConfig) error
|
||||
}
|
||||
|
||||
func newLogConfigClient(rancherClient *RancherClient) *LogConfigClient {
|
||||
return &LogConfigClient{
|
||||
rancherClient: rancherClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *LogConfigClient) Create(container *LogConfig) (*LogConfig, error) {
|
||||
resp := &LogConfig{}
|
||||
err := c.rancherClient.doCreate(LOG_CONFIG_TYPE, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LogConfigClient) Update(existing *LogConfig, updates interface{}) (*LogConfig, error) {
|
||||
resp := &LogConfig{}
|
||||
err := c.rancherClient.doUpdate(LOG_CONFIG_TYPE, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LogConfigClient) List(opts *ListOpts) (*LogConfigCollection, error) {
|
||||
resp := &LogConfigCollection{}
|
||||
err := c.rancherClient.doList(LOG_CONFIG_TYPE, opts, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LogConfigClient) ById(id string) (*LogConfig, error) {
|
||||
resp := &LogConfig{}
|
||||
err := c.rancherClient.doById(LOG_CONFIG_TYPE, id, resp)
|
||||
if apiError, ok := err.(*ApiError); ok {
|
||||
if apiError.StatusCode == 404 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *LogConfigClient) Delete(container *LogConfig) error {
|
||||
return c.rancherClient.doResourceDelete(LOG_CONFIG_TYPE, &container.Resource)
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user