-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from roycaihw/generated-api
Generated API change for kubernetes 1.10
- Loading branch information
Showing
1,160 changed files
with
304,650 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Requested Commit: v2.3.0 | ||
Actual Commit: ea9340e84dda11cb6b4758e6133632ea0f83ea0a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ./ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
|
Oops, something went wrong.