mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
initial generated code for SAR
This commit is contained in:
parent
32920b5617
commit
d9a203409a
110
api/swagger-spec/authorization.k8s.io.json
Normal file
110
api/swagger-spec/authorization.k8s.io.json
Normal file
@ -0,0 +1,110 @@
|
||||
{
|
||||
"swaggerVersion": "1.2",
|
||||
"apiVersion": "",
|
||||
"basePath": "https://10.10.10.10:6443",
|
||||
"resourcePath": "/apis/authorization.k8s.io",
|
||||
"apis": [
|
||||
{
|
||||
"path": "/apis/authorization.k8s.io",
|
||||
"description": "get information of a group",
|
||||
"operations": [
|
||||
{
|
||||
"type": "unversioned.APIGroup",
|
||||
"method": "GET",
|
||||
"summary": "get information of a group",
|
||||
"nickname": "getAPIGroup",
|
||||
"parameters": [],
|
||||
"produces": [
|
||||
"application/json",
|
||||
"application/yaml",
|
||||
"application/vnd.kubernetes.protobuf"
|
||||
],
|
||||
"consumes": [
|
||||
"application/json",
|
||||
"application/yaml",
|
||||
"application/vnd.kubernetes.protobuf"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"models": {
|
||||
"unversioned.APIGroup": {
|
||||
"id": "unversioned.APIGroup",
|
||||
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
||||
"required": [
|
||||
"name",
|
||||
"versions",
|
||||
"serverAddressByClientCIDRs"
|
||||
],
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds"
|
||||
},
|
||||
"apiVersion": {
|
||||
"type": "string",
|
||||
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "name is the name of the group."
|
||||
},
|
||||
"versions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "unversioned.GroupVersionForDiscovery"
|
||||
},
|
||||
"description": "versions are the versions supported in this group."
|
||||
},
|
||||
"preferredVersion": {
|
||||
"$ref": "unversioned.GroupVersionForDiscovery",
|
||||
"description": "preferredVersion is the version preferred by the API server, which probably is the storage version."
|
||||
},
|
||||
"serverAddressByClientCIDRs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "unversioned.ServerAddressByClientCIDR"
|
||||
},
|
||||
"description": "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP."
|
||||
}
|
||||
}
|
||||
},
|
||||
"unversioned.GroupVersionForDiscovery": {
|
||||
"id": "unversioned.GroupVersionForDiscovery",
|
||||
"description": "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.",
|
||||
"required": [
|
||||
"groupVersion",
|
||||
"version"
|
||||
],
|
||||
"properties": {
|
||||
"groupVersion": {
|
||||
"type": "string",
|
||||
"description": "groupVersion specifies the API group and version in the form \"group/version\""
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"description": "version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion."
|
||||
}
|
||||
}
|
||||
},
|
||||
"unversioned.ServerAddressByClientCIDR": {
|
||||
"id": "unversioned.ServerAddressByClientCIDR",
|
||||
"description": "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.",
|
||||
"required": [
|
||||
"clientCIDR",
|
||||
"serverAddress"
|
||||
],
|
||||
"properties": {
|
||||
"clientCIDR": {
|
||||
"type": "string",
|
||||
"description": "The CIDR with which clients can match their IP to figure out the server address that they should use."
|
||||
},
|
||||
"serverAddress": {
|
||||
"type": "string",
|
||||
"description": "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
360
api/swagger-spec/authorization.k8s.io_v1beta1.json
Normal file
360
api/swagger-spec/authorization.k8s.io_v1beta1.json
Normal file
@ -0,0 +1,360 @@
|
||||
{
|
||||
"swaggerVersion": "1.2",
|
||||
"apiVersion": "authorization.k8s.io/v1beta1",
|
||||
"basePath": "https://10.10.10.10:6443",
|
||||
"resourcePath": "/apis/authorization.k8s.io/v1beta1",
|
||||
"apis": [
|
||||
{
|
||||
"path": "/apis/authorization.k8s.io/v1beta1/subjectaccessreviews",
|
||||
"description": "API at /apis/authorization.k8s.io/v1beta1",
|
||||
"operations": [
|
||||
{
|
||||
"type": "v1beta1.SubjectAccessReview",
|
||||
"method": "POST",
|
||||
"summary": "create a SubjectAccessReview",
|
||||
"nickname": "createSubjectAccessReview",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"paramType": "query",
|
||||
"name": "pretty",
|
||||
"description": "If 'true', then the output is pretty printed.",
|
||||
"required": false,
|
||||
"allowMultiple": false
|
||||
},
|
||||
{
|
||||
"type": "v1beta1.SubjectAccessReview",
|
||||
"paramType": "body",
|
||||
"name": "body",
|
||||
"description": "",
|
||||
"required": true,
|
||||
"allowMultiple": false
|
||||
}
|
||||
],
|
||||
"responseMessages": [
|
||||
{
|
||||
"code": 200,
|
||||
"message": "OK",
|
||||
"responseModel": "v1beta1.SubjectAccessReview"
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"application/json",
|
||||
"application/yaml",
|
||||
"application/vnd.kubernetes.protobuf"
|
||||
],
|
||||
"consumes": [
|
||||
"*/*"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/apis/authorization.k8s.io/v1beta1",
|
||||
"description": "API at /apis/authorization.k8s.io/v1beta1",
|
||||
"operations": [
|
||||
{
|
||||
"type": "unversioned.APIResourceList",
|
||||
"method": "GET",
|
||||
"summary": "get available resources",
|
||||
"nickname": "getAPIResources",
|
||||
"parameters": [],
|
||||
"produces": [
|
||||
"application/json",
|
||||
"application/yaml",
|
||||
"application/vnd.kubernetes.protobuf"
|
||||
],
|
||||
"consumes": [
|
||||
"application/json",
|
||||
"application/yaml",
|
||||
"application/vnd.kubernetes.protobuf"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"models": {
|
||||
"v1beta1.SubjectAccessReview": {
|
||||
"id": "v1beta1.SubjectAccessReview",
|
||||
"description": "SubjectAccessReview checks whether or not a user or group can perform an action.",
|
||||
"required": [
|
||||
"spec"
|
||||
],
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds"
|
||||
},
|
||||
"apiVersion": {
|
||||
"type": "string",
|
||||
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources"
|
||||
},
|
||||
"metadata": {
|
||||
"$ref": "v1.ObjectMeta"
|
||||
},
|
||||
"spec": {
|
||||
"$ref": "v1beta1.SubjectAccessReviewSpec",
|
||||
"description": "Spec holds information about the request being evaluated"
|
||||
},
|
||||
"status": {
|
||||
"$ref": "v1beta1.SubjectAccessReviewStatus",
|
||||
"description": "Status is filled in by the server and indicates whether the request is allowed or not"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1.ObjectMeta": {
|
||||
"id": "v1.ObjectMeta",
|
||||
"description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names"
|
||||
},
|
||||
"generateName": {
|
||||
"type": "string",
|
||||
"description": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency"
|
||||
},
|
||||
"namespace": {
|
||||
"type": "string",
|
||||
"description": "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://releases.k8s.io/HEAD/docs/user-guide/namespaces.md"
|
||||
},
|
||||
"selfLink": {
|
||||
"type": "string",
|
||||
"description": "SelfLink is a URL representing this object. Populated by the system. Read-only."
|
||||
},
|
||||
"uid": {
|
||||
"type": "string",
|
||||
"description": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids"
|
||||
},
|
||||
"resourceVersion": {
|
||||
"type": "string",
|
||||
"description": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency"
|
||||
},
|
||||
"generation": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only."
|
||||
},
|
||||
"creationTimestamp": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata"
|
||||
},
|
||||
"deletionTimestamp": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource will be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. Once the resource is deleted in the API, the Kubelet will send a hard termination signal to the container. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata"
|
||||
},
|
||||
"deletionGracePeriodSeconds": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only."
|
||||
},
|
||||
"labels": {
|
||||
"type": "object",
|
||||
"description": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md"
|
||||
},
|
||||
"annotations": {
|
||||
"type": "object",
|
||||
"description": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://releases.k8s.io/HEAD/docs/user-guide/annotations.md"
|
||||
},
|
||||
"ownerReferences": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "v1.OwnerReference"
|
||||
},
|
||||
"description": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller."
|
||||
},
|
||||
"finalizers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1.OwnerReference": {
|
||||
"id": "v1.OwnerReference",
|
||||
"description": "OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field.",
|
||||
"required": [
|
||||
"apiVersion",
|
||||
"kind",
|
||||
"name",
|
||||
"uid"
|
||||
],
|
||||
"properties": {
|
||||
"apiVersion": {
|
||||
"type": "string",
|
||||
"description": "API version of the referent."
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "Kind of the referent. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Name of the referent. More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names"
|
||||
},
|
||||
"uid": {
|
||||
"type": "string",
|
||||
"description": "UID of the referent. More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids"
|
||||
},
|
||||
"controller": {
|
||||
"type": "boolean",
|
||||
"description": "If true, this reference points to the managing controller."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1beta1.SubjectAccessReviewSpec": {
|
||||
"id": "v1beta1.SubjectAccessReviewSpec",
|
||||
"description": "SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set",
|
||||
"properties": {
|
||||
"resourceAttributes": {
|
||||
"$ref": "v1beta1.ResourceAttributes",
|
||||
"description": "ResourceAuthorizationAttributes describes information for a resource access request"
|
||||
},
|
||||
"nonResourceAttributes": {
|
||||
"$ref": "v1beta1.NonResourceAttributes",
|
||||
"description": "NonResourceAttributes describes information for a non-resource access request"
|
||||
},
|
||||
"user": {
|
||||
"type": "string",
|
||||
"description": "User is the user you're testing for. If you specify \"User\" but not \"Group\", then is it interpreted as \"What if User were not a member of any groups"
|
||||
},
|
||||
"group": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Groups is the groups you're testing for."
|
||||
},
|
||||
"extra": {
|
||||
"type": "object",
|
||||
"description": "Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1beta1.ResourceAttributes": {
|
||||
"id": "v1beta1.ResourceAttributes",
|
||||
"description": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface",
|
||||
"properties": {
|
||||
"namespace": {
|
||||
"type": "string",
|
||||
"description": "Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces \"\" (empty) is defaulted for LocalSubjectAccessReviews \"\" (empty) is empty for cluster-scoped resources \"\" (empty) means \"all\" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview"
|
||||
},
|
||||
"verb": {
|
||||
"type": "string",
|
||||
"description": "Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all."
|
||||
},
|
||||
"group": {
|
||||
"type": "string",
|
||||
"description": "Group is the API Group of the Resource. \"*\" means all."
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"description": "Version is the API Version of the Resource. \"*\" means all."
|
||||
},
|
||||
"resource": {
|
||||
"type": "string",
|
||||
"description": "Resource is one of the existing resource types. \"*\" means all."
|
||||
},
|
||||
"subresource": {
|
||||
"type": "string",
|
||||
"description": "Subresource is one of the existing resource types. \"\" means none."
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1beta1.NonResourceAttributes": {
|
||||
"id": "v1beta1.NonResourceAttributes",
|
||||
"description": "NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface",
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string",
|
||||
"description": "Path is the URL path of the request"
|
||||
},
|
||||
"verb": {
|
||||
"type": "string",
|
||||
"description": "Verb is the standard HTTP verb"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1beta1.SubjectAccessReviewStatus": {
|
||||
"id": "v1beta1.SubjectAccessReviewStatus",
|
||||
"description": "SubjectAccessReviewStatus",
|
||||
"required": [
|
||||
"allowed"
|
||||
],
|
||||
"properties": {
|
||||
"allowed": {
|
||||
"type": "boolean",
|
||||
"description": "Allowed is required. True if the action would be allowed, false otherwise."
|
||||
},
|
||||
"reason": {
|
||||
"type": "string",
|
||||
"description": "Reason is optional. It indicates why a request was allowed or denied."
|
||||
},
|
||||
"evaluationError": {
|
||||
"type": "string",
|
||||
"description": "EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request."
|
||||
}
|
||||
}
|
||||
},
|
||||
"unversioned.APIResourceList": {
|
||||
"id": "unversioned.APIResourceList",
|
||||
"description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.",
|
||||
"required": [
|
||||
"groupVersion",
|
||||
"resources"
|
||||
],
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds"
|
||||
},
|
||||
"apiVersion": {
|
||||
"type": "string",
|
||||
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources"
|
||||
},
|
||||
"groupVersion": {
|
||||
"type": "string",
|
||||
"description": "groupVersion is the group and version this APIResourceList is for."
|
||||
},
|
||||
"resources": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "unversioned.APIResource"
|
||||
},
|
||||
"description": "resources contains the name of the resources and if they are namespaced."
|
||||
}
|
||||
}
|
||||
},
|
||||
"unversioned.APIResource": {
|
||||
"id": "unversioned.APIResource",
|
||||
"description": "APIResource specifies the name of a resource and whether it is namespaced.",
|
||||
"required": [
|
||||
"name",
|
||||
"namespaced",
|
||||
"kind"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "name is the name of the resource."
|
||||
},
|
||||
"namespaced": {
|
||||
"type": "boolean",
|
||||
"description": "namespaced indicates if a resource is namespaced or not."
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -33,6 +33,14 @@
|
||||
"path": "/apis/authentication.k8s.io",
|
||||
"description": "get information of a group"
|
||||
},
|
||||
{
|
||||
"path": "/apis/authorization.k8s.io/v1beta1",
|
||||
"description": "API at /apis/authorization.k8s.io/v1beta1"
|
||||
},
|
||||
{
|
||||
"path": "/apis/authorization.k8s.io",
|
||||
"description": "get information of a group"
|
||||
},
|
||||
{
|
||||
"path": "/apis/autoscaling/v1",
|
||||
"description": "API at /apis/autoscaling/v1"
|
||||
|
File diff suppressed because it is too large
Load Diff
2264
pkg/apis/authorization/v1beta1/generated.pb.go
Normal file
2264
pkg/apis/authorization/v1beta1/generated.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
160
pkg/apis/authorization/v1beta1/generated.proto
Normal file
160
pkg/apis/authorization/v1beta1/generated.proto
Normal file
@ -0,0 +1,160 @@
|
||||
/*
|
||||
Copyright 2016 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.
|
||||
*/
|
||||
|
||||
|
||||
// This file was autogenerated by go-to-protobuf. Do not edit it manually!
|
||||
|
||||
syntax = 'proto2';
|
||||
|
||||
package k8s.io.kubernetes.pkg.apis.authorization.v1beta1;
|
||||
|
||||
import "k8s.io/kubernetes/pkg/api/resource/generated.proto";
|
||||
import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto";
|
||||
import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
|
||||
import "k8s.io/kubernetes/pkg/runtime/generated.proto";
|
||||
import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
|
||||
|
||||
// Package-wide variables from generator "generated".
|
||||
option go_package = "v1beta1";
|
||||
|
||||
// ExtraValue masks the value so protobuf can generate
|
||||
// +protobuf.nullable=true
|
||||
// +protobuf.options.(gogoproto.goproto_stringer)=false
|
||||
message ExtraValue {
|
||||
// items, if empty, will result in an empty slice
|
||||
|
||||
repeated string items = 1;
|
||||
}
|
||||
|
||||
// LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace.
|
||||
// Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions
|
||||
// checking.
|
||||
message LocalSubjectAccessReview {
|
||||
optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace
|
||||
// you made the request against. If empty, it is defaulted.
|
||||
optional SubjectAccessReviewSpec spec = 2;
|
||||
|
||||
// Status is filled in by the server and indicates whether the request is allowed or not
|
||||
optional SubjectAccessReviewStatus status = 3;
|
||||
}
|
||||
|
||||
// NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface
|
||||
message NonResourceAttributes {
|
||||
// Path is the URL path of the request
|
||||
optional string path = 1;
|
||||
|
||||
// Verb is the standard HTTP verb
|
||||
optional string verb = 2;
|
||||
}
|
||||
|
||||
// ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface
|
||||
message ResourceAttributes {
|
||||
// Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces
|
||||
// "" (empty) is defaulted for LocalSubjectAccessReviews
|
||||
// "" (empty) is empty for cluster-scoped resources
|
||||
// "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
|
||||
optional string namespace = 1;
|
||||
|
||||
// Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all.
|
||||
optional string verb = 2;
|
||||
|
||||
// Group is the API Group of the Resource. "*" means all.
|
||||
optional string group = 3;
|
||||
|
||||
// Version is the API Version of the Resource. "*" means all.
|
||||
optional string version = 4;
|
||||
|
||||
// Resource is one of the existing resource types. "*" means all.
|
||||
optional string resource = 5;
|
||||
|
||||
// Subresource is one of the existing resource types. "" means none.
|
||||
optional string subresource = 6;
|
||||
|
||||
// Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all.
|
||||
optional string name = 7;
|
||||
}
|
||||
|
||||
// SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a
|
||||
// spec.namespace means "in all namespaces". Self is a special case, because users should always be able
|
||||
// to check whether they can perform an action
|
||||
message SelfSubjectAccessReview {
|
||||
optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Spec holds information about the request being evaluated. user and groups must be empty
|
||||
optional SelfSubjectAccessReviewSpec spec = 2;
|
||||
|
||||
// Status is filled in by the server and indicates whether the request is allowed or not
|
||||
optional SubjectAccessReviewStatus status = 3;
|
||||
}
|
||||
|
||||
// SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
|
||||
// and NonResourceAuthorizationAttributes must be set
|
||||
message SelfSubjectAccessReviewSpec {
|
||||
// ResourceAuthorizationAttributes describes information for a resource access request
|
||||
optional ResourceAttributes resourceAttributes = 1;
|
||||
|
||||
// NonResourceAttributes describes information for a non-resource access request
|
||||
optional NonResourceAttributes nonResourceAttributes = 2;
|
||||
}
|
||||
|
||||
// SubjectAccessReview checks whether or not a user or group can perform an action.
|
||||
message SubjectAccessReview {
|
||||
optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Spec holds information about the request being evaluated
|
||||
optional SubjectAccessReviewSpec spec = 2;
|
||||
|
||||
// Status is filled in by the server and indicates whether the request is allowed or not
|
||||
optional SubjectAccessReviewStatus status = 3;
|
||||
}
|
||||
|
||||
// SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
|
||||
// and NonResourceAuthorizationAttributes must be set
|
||||
message SubjectAccessReviewSpec {
|
||||
// ResourceAuthorizationAttributes describes information for a resource access request
|
||||
optional ResourceAttributes resourceAttributes = 1;
|
||||
|
||||
// NonResourceAttributes describes information for a non-resource access request
|
||||
optional NonResourceAttributes nonResourceAttributes = 2;
|
||||
|
||||
// User is the user you're testing for.
|
||||
// If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups
|
||||
optional string verb = 3;
|
||||
|
||||
// Groups is the groups you're testing for.
|
||||
repeated string group = 4;
|
||||
|
||||
// Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer
|
||||
// it needs a reflection here.
|
||||
map<string, ExtraValue> extra = 5;
|
||||
}
|
||||
|
||||
// SubjectAccessReviewStatus
|
||||
message SubjectAccessReviewStatus {
|
||||
// Allowed is required. True if the action would be allowed, false otherwise.
|
||||
optional bool allowed = 1;
|
||||
|
||||
// Reason is optional. It indicates why a request was allowed or denied.
|
||||
optional string reason = 2;
|
||||
|
||||
// EvaluationError is an indication that some error occurred during the authorization check.
|
||||
// It is entirely possible to get an error and be able to continue determine authorization status in spite of it.
|
||||
// For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.
|
||||
optional string evaluationError = 3;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -106,9 +106,10 @@ func (SubjectAccessReviewSpec) SwaggerDoc() map[string]string {
|
||||
}
|
||||
|
||||
var map_SubjectAccessReviewStatus = map[string]string{
|
||||
"": "SubjectAccessReviewStatus",
|
||||
"allowed": "Allowed is required. True if the action would be allowed, false otherwise.",
|
||||
"reason": "Reason is optional. It indicates why a request was allowed or denied.",
|
||||
"": "SubjectAccessReviewStatus",
|
||||
"allowed": "Allowed is required. True if the action would be allowed, false otherwise.",
|
||||
"reason": "Reason is optional. It indicates why a request was allowed or denied.",
|
||||
"evaluationError": "EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.",
|
||||
}
|
||||
|
||||
func (SubjectAccessReviewStatus) SwaggerDoc() map[string]string {
|
||||
|
@ -19,6 +19,7 @@ package internalclientset
|
||||
import (
|
||||
"github.com/golang/glog"
|
||||
unversionedauthentication "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/unversioned"
|
||||
unversionedauthorization "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/unversioned"
|
||||
unversionedautoscaling "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned"
|
||||
unversionedbatch "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned"
|
||||
unversionedcertificates "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned"
|
||||
@ -33,12 +34,13 @@ import (
|
||||
type Interface interface {
|
||||
Discovery() discovery.DiscoveryInterface
|
||||
Core() unversionedcore.CoreInterface
|
||||
Extensions() unversionedextensions.ExtensionsInterface
|
||||
Autoscaling() unversionedautoscaling.AutoscalingInterface
|
||||
Authentication() unversionedauthentication.AuthenticationInterface
|
||||
Authorization() unversionedauthorization.AuthorizationInterface
|
||||
Autoscaling() unversionedautoscaling.AutoscalingInterface
|
||||
Batch() unversionedbatch.BatchInterface
|
||||
Rbac() unversionedrbac.RbacInterface
|
||||
Certificates() unversionedcertificates.CertificatesInterface
|
||||
Extensions() unversionedextensions.ExtensionsInterface
|
||||
Rbac() unversionedrbac.RbacInterface
|
||||
}
|
||||
|
||||
// Clientset contains the clients for groups. Each group has exactly one
|
||||
@ -46,12 +48,13 @@ type Interface interface {
|
||||
type Clientset struct {
|
||||
*discovery.DiscoveryClient
|
||||
*unversionedcore.CoreClient
|
||||
*unversionedextensions.ExtensionsClient
|
||||
*unversionedautoscaling.AutoscalingClient
|
||||
*unversionedauthentication.AuthenticationClient
|
||||
*unversionedauthorization.AuthorizationClient
|
||||
*unversionedautoscaling.AutoscalingClient
|
||||
*unversionedbatch.BatchClient
|
||||
*unversionedrbac.RbacClient
|
||||
*unversionedcertificates.CertificatesClient
|
||||
*unversionedextensions.ExtensionsClient
|
||||
*unversionedrbac.RbacClient
|
||||
}
|
||||
|
||||
// Core retrieves the CoreClient
|
||||
@ -62,12 +65,20 @@ func (c *Clientset) Core() unversionedcore.CoreInterface {
|
||||
return c.CoreClient
|
||||
}
|
||||
|
||||
// Extensions retrieves the ExtensionsClient
|
||||
func (c *Clientset) Extensions() unversionedextensions.ExtensionsInterface {
|
||||
// Authentication retrieves the AuthenticationClient
|
||||
func (c *Clientset) Authentication() unversionedauthentication.AuthenticationInterface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.ExtensionsClient
|
||||
return c.AuthenticationClient
|
||||
}
|
||||
|
||||
// Authorization retrieves the AuthorizationClient
|
||||
func (c *Clientset) Authorization() unversionedauthorization.AuthorizationInterface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.AuthorizationClient
|
||||
}
|
||||
|
||||
// Autoscaling retrieves the AutoscalingClient
|
||||
@ -78,14 +89,6 @@ func (c *Clientset) Autoscaling() unversionedautoscaling.AutoscalingInterface {
|
||||
return c.AutoscalingClient
|
||||
}
|
||||
|
||||
// Authentication retrieves the AuthenticationClient
|
||||
func (c *Clientset) Authentication() unversionedauthentication.AuthenticationInterface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.AuthenticationClient
|
||||
}
|
||||
|
||||
// Batch retrieves the BatchClient
|
||||
func (c *Clientset) Batch() unversionedbatch.BatchInterface {
|
||||
if c == nil {
|
||||
@ -94,14 +97,6 @@ func (c *Clientset) Batch() unversionedbatch.BatchInterface {
|
||||
return c.BatchClient
|
||||
}
|
||||
|
||||
// Rbac retrieves the RbacClient
|
||||
func (c *Clientset) Rbac() unversionedrbac.RbacInterface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.RbacClient
|
||||
}
|
||||
|
||||
// Certificates retrieves the CertificatesClient
|
||||
func (c *Clientset) Certificates() unversionedcertificates.CertificatesInterface {
|
||||
if c == nil {
|
||||
@ -110,6 +105,22 @@ func (c *Clientset) Certificates() unversionedcertificates.CertificatesInterface
|
||||
return c.CertificatesClient
|
||||
}
|
||||
|
||||
// Extensions retrieves the ExtensionsClient
|
||||
func (c *Clientset) Extensions() unversionedextensions.ExtensionsInterface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.ExtensionsClient
|
||||
}
|
||||
|
||||
// Rbac retrieves the RbacClient
|
||||
func (c *Clientset) Rbac() unversionedrbac.RbacInterface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.RbacClient
|
||||
}
|
||||
|
||||
// Discovery retrieves the DiscoveryClient
|
||||
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||
return c.DiscoveryClient
|
||||
@ -127,7 +138,11 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
clientset.ExtensionsClient, err = unversionedextensions.NewForConfig(&configShallowCopy)
|
||||
clientset.AuthenticationClient, err = unversionedauthentication.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
clientset.AuthorizationClient, err = unversionedauthorization.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -135,19 +150,19 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
clientset.AuthenticationClient, err = unversionedauthentication.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
clientset.BatchClient, err = unversionedbatch.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
clientset.RbacClient, err = unversionedrbac.NewForConfig(&configShallowCopy)
|
||||
clientset.CertificatesClient, err = unversionedcertificates.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
clientset.CertificatesClient, err = unversionedcertificates.NewForConfig(&configShallowCopy)
|
||||
clientset.ExtensionsClient, err = unversionedextensions.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
clientset.RbacClient, err = unversionedrbac.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -165,12 +180,13 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) {
|
||||
func NewForConfigOrDie(c *restclient.Config) *Clientset {
|
||||
var clientset Clientset
|
||||
clientset.CoreClient = unversionedcore.NewForConfigOrDie(c)
|
||||
clientset.ExtensionsClient = unversionedextensions.NewForConfigOrDie(c)
|
||||
clientset.AutoscalingClient = unversionedautoscaling.NewForConfigOrDie(c)
|
||||
clientset.AuthenticationClient = unversionedauthentication.NewForConfigOrDie(c)
|
||||
clientset.AuthorizationClient = unversionedauthorization.NewForConfigOrDie(c)
|
||||
clientset.AutoscalingClient = unversionedautoscaling.NewForConfigOrDie(c)
|
||||
clientset.BatchClient = unversionedbatch.NewForConfigOrDie(c)
|
||||
clientset.RbacClient = unversionedrbac.NewForConfigOrDie(c)
|
||||
clientset.CertificatesClient = unversionedcertificates.NewForConfigOrDie(c)
|
||||
clientset.ExtensionsClient = unversionedextensions.NewForConfigOrDie(c)
|
||||
clientset.RbacClient = unversionedrbac.NewForConfigOrDie(c)
|
||||
|
||||
clientset.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
|
||||
return &clientset
|
||||
@ -180,12 +196,13 @@ func NewForConfigOrDie(c *restclient.Config) *Clientset {
|
||||
func New(c *restclient.RESTClient) *Clientset {
|
||||
var clientset Clientset
|
||||
clientset.CoreClient = unversionedcore.New(c)
|
||||
clientset.ExtensionsClient = unversionedextensions.New(c)
|
||||
clientset.AutoscalingClient = unversionedautoscaling.New(c)
|
||||
clientset.AuthenticationClient = unversionedauthentication.New(c)
|
||||
clientset.AuthorizationClient = unversionedauthorization.New(c)
|
||||
clientset.AutoscalingClient = unversionedautoscaling.New(c)
|
||||
clientset.BatchClient = unversionedbatch.New(c)
|
||||
clientset.RbacClient = unversionedrbac.New(c)
|
||||
clientset.CertificatesClient = unversionedcertificates.New(c)
|
||||
clientset.ExtensionsClient = unversionedextensions.New(c)
|
||||
clientset.RbacClient = unversionedrbac.New(c)
|
||||
|
||||
clientset.DiscoveryClient = discovery.NewDiscoveryClient(c)
|
||||
return &clientset
|
||||
|
@ -22,6 +22,8 @@ import (
|
||||
clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
|
||||
unversionedauthentication "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/unversioned"
|
||||
fakeunversionedauthentication "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/unversioned/fake"
|
||||
unversionedauthorization "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/unversioned"
|
||||
fakeunversionedauthorization "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/unversioned/fake"
|
||||
unversionedautoscaling "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned"
|
||||
fakeunversionedautoscaling "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/fake"
|
||||
unversionedbatch "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned"
|
||||
@ -79,9 +81,14 @@ func (c *Clientset) Core() unversionedcore.CoreInterface {
|
||||
return &fakeunversionedcore.FakeCore{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Extensions retrieves the ExtensionsClient
|
||||
func (c *Clientset) Extensions() unversionedextensions.ExtensionsInterface {
|
||||
return &fakeunversionedextensions.FakeExtensions{Fake: &c.Fake}
|
||||
// Authentication retrieves the AuthenticationClient
|
||||
func (c *Clientset) Authentication() unversionedauthentication.AuthenticationInterface {
|
||||
return &fakeunversionedauthentication.FakeAuthentication{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Authorization retrieves the AuthorizationClient
|
||||
func (c *Clientset) Authorization() unversionedauthorization.AuthorizationInterface {
|
||||
return &fakeunversionedauthorization.FakeAuthorization{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Autoscaling retrieves the AutoscalingClient
|
||||
@ -89,22 +96,22 @@ func (c *Clientset) Autoscaling() unversionedautoscaling.AutoscalingInterface {
|
||||
return &fakeunversionedautoscaling.FakeAutoscaling{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Authentication retrieves the AuthenticationClient
|
||||
func (c *Clientset) Authentication() unversionedauthentication.AuthenticationInterface {
|
||||
return &fakeunversionedauthentication.FakeAuthentication{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Batch retrieves the BatchClient
|
||||
func (c *Clientset) Batch() unversionedbatch.BatchInterface {
|
||||
return &fakeunversionedbatch.FakeBatch{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Rbac retrieves the RbacClient
|
||||
func (c *Clientset) Rbac() unversionedrbac.RbacInterface {
|
||||
return &fakeunversionedrbac.FakeRbac{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Certificates retrieves the CertificatesClient
|
||||
func (c *Clientset) Certificates() unversionedcertificates.CertificatesInterface {
|
||||
return &fakeunversionedcertificates.FakeCertificates{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Extensions retrieves the ExtensionsClient
|
||||
func (c *Clientset) Extensions() unversionedextensions.ExtensionsInterface {
|
||||
return &fakeunversionedextensions.FakeExtensions{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Rbac retrieves the RbacClient
|
||||
func (c *Clientset) Rbac() unversionedrbac.RbacInterface {
|
||||
return &fakeunversionedrbac.FakeRbac{Fake: &c.Fake}
|
||||
}
|
||||
|
@ -0,0 +1,101 @@
|
||||
/*
|
||||
Copyright 2016 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 unversioned
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
registered "k8s.io/kubernetes/pkg/apimachinery/registered"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
)
|
||||
|
||||
type AuthorizationInterface interface {
|
||||
GetRESTClient() *restclient.RESTClient
|
||||
SubjectAccessReviewsGetter
|
||||
}
|
||||
|
||||
// AuthorizationClient is used to interact with features provided by the Authorization group.
|
||||
type AuthorizationClient struct {
|
||||
*restclient.RESTClient
|
||||
}
|
||||
|
||||
func (c *AuthorizationClient) SubjectAccessReviews() SubjectAccessReviewInterface {
|
||||
return newSubjectAccessReviews(c)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new AuthorizationClient for the given config.
|
||||
func NewForConfig(c *restclient.Config) (*AuthorizationClient, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client, err := restclient.RESTClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &AuthorizationClient{client}, nil
|
||||
}
|
||||
|
||||
// NewForConfigOrDie creates a new AuthorizationClient for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *restclient.Config) *AuthorizationClient {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return client
|
||||
}
|
||||
|
||||
// New creates a new AuthorizationClient for the given RESTClient.
|
||||
func New(c *restclient.RESTClient) *AuthorizationClient {
|
||||
return &AuthorizationClient{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *restclient.Config) error {
|
||||
// if authorization group is not registered, return an error
|
||||
g, err := registered.Group("authorization.k8s.io")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
config.APIPath = "/apis"
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = restclient.DefaultKubernetesUserAgent()
|
||||
}
|
||||
// TODO: Unconditionally set the config.Version, until we fix the config.
|
||||
//if config.Version == "" {
|
||||
copyGroupVersion := g.GroupVersion
|
||||
config.GroupVersion = ©GroupVersion
|
||||
//}
|
||||
|
||||
config.NegotiatedSerializer = api.Codecs
|
||||
|
||||
if config.QPS == 0 {
|
||||
config.QPS = 5
|
||||
}
|
||||
if config.Burst == 0 {
|
||||
config.Burst = 10
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetRESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *AuthorizationClient) GetRESTClient() *restclient.RESTClient {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.RESTClient
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright 2016 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.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with the default arguments.
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package unversioned
|
@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright 2016 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.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with the default arguments.
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
@ -0,0 +1,37 @@
|
||||
/*
|
||||
Copyright 2016 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 fake
|
||||
|
||||
import (
|
||||
unversioned "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/unversioned"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
||||
type FakeAuthorization struct {
|
||||
*core.Fake
|
||||
}
|
||||
|
||||
func (c *FakeAuthorization) SubjectAccessReviews() unversioned.SubjectAccessReviewInterface {
|
||||
return &FakeSubjectAccessReviews{c}
|
||||
}
|
||||
|
||||
// GetRESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeAuthorization) GetRESTClient() *restclient.RESTClient {
|
||||
return nil
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
/*
|
||||
Copyright 2016 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 fake
|
||||
|
||||
// FakeSubjectAccessReviews implements SubjectAccessReviewInterface
|
||||
type FakeSubjectAccessReviews struct {
|
||||
Fake *FakeAuthorization
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
/*
|
||||
Copyright 2016 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 unversioned
|
||||
|
||||
// SubjectAccessReviewsGetter has a method to return a SubjectAccessReviewInterface.
|
||||
// A group's client should implement this interface.
|
||||
type SubjectAccessReviewsGetter interface {
|
||||
SubjectAccessReviews() SubjectAccessReviewInterface
|
||||
}
|
||||
|
||||
// SubjectAccessReviewInterface has methods to work with SubjectAccessReview resources.
|
||||
type SubjectAccessReviewInterface interface {
|
||||
SubjectAccessReviewExpansion
|
||||
}
|
||||
|
||||
// subjectAccessReviews implements SubjectAccessReviewInterface
|
||||
type subjectAccessReviews struct {
|
||||
client *AuthorizationClient
|
||||
}
|
||||
|
||||
// newSubjectAccessReviews returns a SubjectAccessReviews
|
||||
func newSubjectAccessReviews(c *AuthorizationClient) *subjectAccessReviews {
|
||||
return &subjectAccessReviews{
|
||||
client: c,
|
||||
}
|
||||
}
|
@ -18,6 +18,7 @@ package release_1_4
|
||||
|
||||
import (
|
||||
"github.com/golang/glog"
|
||||
v1beta1authorization "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4/typed/authorization/v1beta1"
|
||||
v1autoscaling "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4/typed/autoscaling/v1"
|
||||
v1batch "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4/typed/batch/v1"
|
||||
v1core "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4/typed/core/v1"
|
||||
@ -30,9 +31,10 @@ import (
|
||||
type Interface interface {
|
||||
Discovery() discovery.DiscoveryInterface
|
||||
Core() v1core.CoreInterface
|
||||
Extensions() v1beta1extensions.ExtensionsInterface
|
||||
Authorization() v1beta1authorization.AuthorizationInterface
|
||||
Autoscaling() v1autoscaling.AutoscalingInterface
|
||||
Batch() v1batch.BatchInterface
|
||||
Extensions() v1beta1extensions.ExtensionsInterface
|
||||
}
|
||||
|
||||
// Clientset contains the clients for groups. Each group has exactly one
|
||||
@ -40,9 +42,10 @@ type Interface interface {
|
||||
type Clientset struct {
|
||||
*discovery.DiscoveryClient
|
||||
*v1core.CoreClient
|
||||
*v1beta1extensions.ExtensionsClient
|
||||
*v1beta1authorization.AuthorizationClient
|
||||
*v1autoscaling.AutoscalingClient
|
||||
*v1batch.BatchClient
|
||||
*v1beta1extensions.ExtensionsClient
|
||||
}
|
||||
|
||||
// Core retrieves the CoreClient
|
||||
@ -53,12 +56,12 @@ func (c *Clientset) Core() v1core.CoreInterface {
|
||||
return c.CoreClient
|
||||
}
|
||||
|
||||
// Extensions retrieves the ExtensionsClient
|
||||
func (c *Clientset) Extensions() v1beta1extensions.ExtensionsInterface {
|
||||
// Authorization retrieves the AuthorizationClient
|
||||
func (c *Clientset) Authorization() v1beta1authorization.AuthorizationInterface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.ExtensionsClient
|
||||
return c.AuthorizationClient
|
||||
}
|
||||
|
||||
// Autoscaling retrieves the AutoscalingClient
|
||||
@ -77,6 +80,14 @@ func (c *Clientset) Batch() v1batch.BatchInterface {
|
||||
return c.BatchClient
|
||||
}
|
||||
|
||||
// Extensions retrieves the ExtensionsClient
|
||||
func (c *Clientset) Extensions() v1beta1extensions.ExtensionsInterface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.ExtensionsClient
|
||||
}
|
||||
|
||||
// Discovery retrieves the DiscoveryClient
|
||||
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||
return c.DiscoveryClient
|
||||
@ -94,7 +105,7 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
clientset.ExtensionsClient, err = v1beta1extensions.NewForConfig(&configShallowCopy)
|
||||
clientset.AuthorizationClient, err = v1beta1authorization.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -106,6 +117,10 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
clientset.ExtensionsClient, err = v1beta1extensions.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
clientset.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
@ -120,9 +135,10 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) {
|
||||
func NewForConfigOrDie(c *restclient.Config) *Clientset {
|
||||
var clientset Clientset
|
||||
clientset.CoreClient = v1core.NewForConfigOrDie(c)
|
||||
clientset.ExtensionsClient = v1beta1extensions.NewForConfigOrDie(c)
|
||||
clientset.AuthorizationClient = v1beta1authorization.NewForConfigOrDie(c)
|
||||
clientset.AutoscalingClient = v1autoscaling.NewForConfigOrDie(c)
|
||||
clientset.BatchClient = v1batch.NewForConfigOrDie(c)
|
||||
clientset.ExtensionsClient = v1beta1extensions.NewForConfigOrDie(c)
|
||||
|
||||
clientset.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
|
||||
return &clientset
|
||||
@ -132,9 +148,10 @@ func NewForConfigOrDie(c *restclient.Config) *Clientset {
|
||||
func New(c *restclient.RESTClient) *Clientset {
|
||||
var clientset Clientset
|
||||
clientset.CoreClient = v1core.New(c)
|
||||
clientset.ExtensionsClient = v1beta1extensions.New(c)
|
||||
clientset.AuthorizationClient = v1beta1authorization.New(c)
|
||||
clientset.AutoscalingClient = v1autoscaling.New(c)
|
||||
clientset.BatchClient = v1batch.New(c)
|
||||
clientset.ExtensionsClient = v1beta1extensions.New(c)
|
||||
|
||||
clientset.DiscoveryClient = discovery.NewDiscoveryClient(c)
|
||||
return &clientset
|
||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,extensions/v1beta1,autoscaling/v1,batch/v1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1]
|
||||
|
||||
// This package has the automatically generated clientset.
|
||||
package release_1_4
|
||||
|
@ -20,6 +20,8 @@ import (
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/apimachinery/registered"
|
||||
clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4"
|
||||
v1beta1authorization "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4/typed/authorization/v1beta1"
|
||||
fakev1beta1authorization "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4/typed/authorization/v1beta1/fake"
|
||||
v1autoscaling "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4/typed/autoscaling/v1"
|
||||
fakev1autoscaling "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4/typed/autoscaling/v1/fake"
|
||||
v1batch "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4/typed/batch/v1"
|
||||
@ -73,9 +75,9 @@ func (c *Clientset) Core() v1core.CoreInterface {
|
||||
return &fakev1core.FakeCore{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Extensions retrieves the ExtensionsClient
|
||||
func (c *Clientset) Extensions() v1beta1extensions.ExtensionsInterface {
|
||||
return &fakev1beta1extensions.FakeExtensions{Fake: &c.Fake}
|
||||
// Authorization retrieves the AuthorizationClient
|
||||
func (c *Clientset) Authorization() v1beta1authorization.AuthorizationInterface {
|
||||
return &fakev1beta1authorization.FakeAuthorization{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Autoscaling retrieves the AutoscalingClient
|
||||
@ -87,3 +89,8 @@ func (c *Clientset) Autoscaling() v1autoscaling.AutoscalingInterface {
|
||||
func (c *Clientset) Batch() v1batch.BatchInterface {
|
||||
return &fakev1batch.FakeBatch{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Extensions retrieves the ExtensionsClient
|
||||
func (c *Clientset) Extensions() v1beta1extensions.ExtensionsInterface {
|
||||
return &fakev1beta1extensions.FakeExtensions{Fake: &c.Fake}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,extensions/v1beta1,autoscaling/v1,batch/v1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1]
|
||||
|
||||
// This package has the automatically generated fake clientset.
|
||||
package fake
|
||||
|
@ -0,0 +1,96 @@
|
||||
/*
|
||||
Copyright 2016 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 v1beta1
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
registered "k8s.io/kubernetes/pkg/apimachinery/registered"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
serializer "k8s.io/kubernetes/pkg/runtime/serializer"
|
||||
)
|
||||
|
||||
type AuthorizationInterface interface {
|
||||
GetRESTClient() *restclient.RESTClient
|
||||
SubjectAccessReviewsGetter
|
||||
}
|
||||
|
||||
// AuthorizationClient is used to interact with features provided by the Authorization group.
|
||||
type AuthorizationClient struct {
|
||||
*restclient.RESTClient
|
||||
}
|
||||
|
||||
func (c *AuthorizationClient) SubjectAccessReviews() SubjectAccessReviewInterface {
|
||||
return newSubjectAccessReviews(c)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new AuthorizationClient for the given config.
|
||||
func NewForConfig(c *restclient.Config) (*AuthorizationClient, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client, err := restclient.RESTClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &AuthorizationClient{client}, nil
|
||||
}
|
||||
|
||||
// NewForConfigOrDie creates a new AuthorizationClient for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *restclient.Config) *AuthorizationClient {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return client
|
||||
}
|
||||
|
||||
// New creates a new AuthorizationClient for the given RESTClient.
|
||||
func New(c *restclient.RESTClient) *AuthorizationClient {
|
||||
return &AuthorizationClient{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *restclient.Config) error {
|
||||
// if authorization group is not registered, return an error
|
||||
g, err := registered.Group("authorization.k8s.io")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
config.APIPath = "/apis"
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = restclient.DefaultKubernetesUserAgent()
|
||||
}
|
||||
// TODO: Unconditionally set the config.Version, until we fix the config.
|
||||
//if config.Version == "" {
|
||||
copyGroupVersion := g.GroupVersion
|
||||
config.GroupVersion = ©GroupVersion
|
||||
//}
|
||||
|
||||
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetRESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *AuthorizationClient) GetRESTClient() *restclient.RESTClient {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.RESTClient
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright 2016 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.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1]
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1beta1
|
@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright 2016 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.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1]
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
@ -0,0 +1,37 @@
|
||||
/*
|
||||
Copyright 2016 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 fake
|
||||
|
||||
import (
|
||||
v1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_4/typed/authorization/v1beta1"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
||||
type FakeAuthorization struct {
|
||||
*core.Fake
|
||||
}
|
||||
|
||||
func (c *FakeAuthorization) SubjectAccessReviews() v1beta1.SubjectAccessReviewInterface {
|
||||
return &FakeSubjectAccessReviews{c}
|
||||
}
|
||||
|
||||
// GetRESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeAuthorization) GetRESTClient() *restclient.RESTClient {
|
||||
return nil
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
/*
|
||||
Copyright 2016 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 fake
|
||||
|
||||
// FakeSubjectAccessReviews implements SubjectAccessReviewInterface
|
||||
type FakeSubjectAccessReviews struct {
|
||||
Fake *FakeAuthorization
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
/*
|
||||
Copyright 2016 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 v1beta1
|
||||
|
||||
// SubjectAccessReviewsGetter has a method to return a SubjectAccessReviewInterface.
|
||||
// A group's client should implement this interface.
|
||||
type SubjectAccessReviewsGetter interface {
|
||||
SubjectAccessReviews() SubjectAccessReviewInterface
|
||||
}
|
||||
|
||||
// SubjectAccessReviewInterface has methods to work with SubjectAccessReview resources.
|
||||
type SubjectAccessReviewInterface interface {
|
||||
SubjectAccessReviewExpansion
|
||||
}
|
||||
|
||||
// subjectAccessReviews implements SubjectAccessReviewInterface
|
||||
type subjectAccessReviews struct {
|
||||
client *AuthorizationClient
|
||||
}
|
||||
|
||||
// newSubjectAccessReviews returns a SubjectAccessReviews
|
||||
func newSubjectAccessReviews(c *AuthorizationClient) *subjectAccessReviews {
|
||||
return &subjectAccessReviews{
|
||||
client: c,
|
||||
}
|
||||
}
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,extensions/v1beta1,autoscaling/v1,batch/v1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1]
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1
|
||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,extensions/v1beta1,autoscaling/v1,batch/v1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1]
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,extensions/v1beta1,autoscaling/v1,batch/v1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1]
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1
|
||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,extensions/v1beta1,autoscaling/v1,batch/v1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1]
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,extensions/v1beta1,autoscaling/v1,batch/v1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1]
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1
|
||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,extensions/v1beta1,autoscaling/v1,batch/v1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1]
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,extensions/v1beta1,autoscaling/v1,batch/v1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1]
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1beta1
|
||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,extensions/v1beta1,autoscaling/v1,batch/v1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=release_1_4 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1]
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
||||
|
Loading…
Reference in New Issue
Block a user