Skip to content

Commit

Permalink
Generated API change for kubernetes 1.10
Browse files Browse the repository at this point in the history
Settings:
    export KUBERNETES_BRANCH="release-1.10"
    export CLIENT_VERSION="0.1.0a1"
    export PACKAGE_NAME="client"
  • Loading branch information
roycaihw committed Mar 21, 2018
1 parent 9036125 commit 6181687
Show file tree
Hide file tree
Showing 1,160 changed files with 304,650 additions and 0 deletions.
1,344 changes: 1,344 additions & 0 deletions kubernetes/README.md

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions kubernetes/client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so

# Folders
_obj
_test

# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out

*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*

_testmain.go

*.exe
*.test
*.prof
23 changes: 23 additions & 0 deletions kubernetes/client/.swagger-codegen-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
2 changes: 2 additions & 0 deletions kubernetes/client/.swagger-codegen/COMMIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Requested Commit: v2.3.0
Actual Commit: ea9340e84dda11cb6b4758e6133632ea0f83ea0a
1 change: 1 addition & 0 deletions kubernetes/client/.swagger-codegen/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.3.0
8 changes: 8 additions & 0 deletions kubernetes/client/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
language: go

install:
- go get -d -v .

script:
- go build -v ./

105 changes: 105 additions & 0 deletions kubernetes/client/admissionregistration_api.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
/*
* Kubernetes
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* API version: v1.10.0
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/

package client

import (
"io/ioutil"
"net/url"
"net/http"
"strings"
"golang.org/x/net/context"
"encoding/json"
)

// Linger please
var (
_ context.Context
)

type AdmissionregistrationApiService service


/* AdmissionregistrationApiService
get information of a group
* @param ctx context.Context for authentication, logging, tracing, etc.
@return V1ApiGroup*/
func (a *AdmissionregistrationApiService) GetAPIGroup(ctx context.Context) (V1ApiGroup, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
successPayload V1ApiGroup
)

// create path and map variables
localVarPath := a.client.cfg.BasePath + "/apis/admissionregistration.k8s.io/"

localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}


// to determine the Content-Type header
localVarHttpContentTypes := []string{ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", }

// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
if localVarHttpContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHttpContentType
}

// to determine the Accept header
localVarHttpHeaderAccepts := []string{
"application/json",
"application/yaml",
"application/vnd.kubernetes.protobuf",
}

// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
if localVarHttpHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
}
if ctx != nil {
// API Key Authentication
if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
var key string
if auth.Prefix != "" {
key = auth.Prefix + " " + auth.Key
} else {
key = auth.Key
}
localVarHeaderParams["authorization"] = key
}
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
if err != nil {
return successPayload, nil, err
}

localVarHttpResponse, err := a.client.callAPI(r)
if err != nil || localVarHttpResponse == nil {
return successPayload, localVarHttpResponse, err
}
defer localVarHttpResponse.Body.Close()
if localVarHttpResponse.StatusCode >= 300 {
bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body)
return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes)
}

if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil {
return successPayload, localVarHttpResponse, err
}


return successPayload, localVarHttpResponse, err
}

Loading

0 comments on commit 6181687

Please sign in to comment.