Update vendor k8s-cloud-provider and google API
Ran commands: hack/pin-dependency.sh github.com/GoogleCloudPlatform/k8s-cloud-provider 27a4ced34534a6c32b63159b100ac0efaa1d37b3 hack/update-vendor.sh hack/pin-dependency.sh google.golang.org/api 5213b809086156e6e2b262a41394993fcff97439 hack/update-vendor.sh hack/verify-vendor.sh merge conflicts
This commit is contained in:
2
vendor/google.golang.org/api/compute/v0.alpha/BUILD
generated
vendored
2
vendor/google.golang.org/api/compute/v0.alpha/BUILD
generated
vendored
@@ -9,6 +9,8 @@ go_library(
|
||||
deps = [
|
||||
"//vendor/google.golang.org/api/gensupport:go_default_library",
|
||||
"//vendor/google.golang.org/api/googleapi:go_default_library",
|
||||
"//vendor/google.golang.org/api/option:go_default_library",
|
||||
"//vendor/google.golang.org/api/transport/http:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
7495
vendor/google.golang.org/api/compute/v0.alpha/compute-api.json
generated
vendored
7495
vendor/google.golang.org/api/compute/v0.alpha/compute-api.json
generated
vendored
File diff suppressed because it is too large
Load Diff
18695
vendor/google.golang.org/api/compute/v0.alpha/compute-gen.go
generated
vendored
18695
vendor/google.golang.org/api/compute/v0.alpha/compute-gen.go
generated
vendored
File diff suppressed because it is too large
Load Diff
2
vendor/google.golang.org/api/compute/v0.beta/BUILD
generated
vendored
2
vendor/google.golang.org/api/compute/v0.beta/BUILD
generated
vendored
@@ -9,6 +9,8 @@ go_library(
|
||||
deps = [
|
||||
"//vendor/google.golang.org/api/gensupport:go_default_library",
|
||||
"//vendor/google.golang.org/api/googleapi:go_default_library",
|
||||
"//vendor/google.golang.org/api/option:go_default_library",
|
||||
"//vendor/google.golang.org/api/transport/http:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
8068
vendor/google.golang.org/api/compute/v0.beta/compute-api.json
generated
vendored
8068
vendor/google.golang.org/api/compute/v0.beta/compute-api.json
generated
vendored
File diff suppressed because it is too large
Load Diff
21872
vendor/google.golang.org/api/compute/v0.beta/compute-gen.go
generated
vendored
21872
vendor/google.golang.org/api/compute/v0.beta/compute-gen.go
generated
vendored
File diff suppressed because it is too large
Load Diff
2
vendor/google.golang.org/api/compute/v1/BUILD
generated
vendored
2
vendor/google.golang.org/api/compute/v1/BUILD
generated
vendored
@@ -9,6 +9,8 @@ go_library(
|
||||
deps = [
|
||||
"//vendor/google.golang.org/api/gensupport:go_default_library",
|
||||
"//vendor/google.golang.org/api/googleapi:go_default_library",
|
||||
"//vendor/google.golang.org/api/option:go_default_library",
|
||||
"//vendor/google.golang.org/api/transport/http:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
2096
vendor/google.golang.org/api/compute/v1/compute-api.json
generated
vendored
2096
vendor/google.golang.org/api/compute/v1/compute-api.json
generated
vendored
File diff suppressed because it is too large
Load Diff
5021
vendor/google.golang.org/api/compute/v1/compute-gen.go
generated
vendored
5021
vendor/google.golang.org/api/compute/v1/compute-gen.go
generated
vendored
File diff suppressed because it is too large
Load Diff
2
vendor/google.golang.org/api/container/v1/BUILD
generated
vendored
2
vendor/google.golang.org/api/container/v1/BUILD
generated
vendored
@@ -9,6 +9,8 @@ go_library(
|
||||
deps = [
|
||||
"//vendor/google.golang.org/api/gensupport:go_default_library",
|
||||
"//vendor/google.golang.org/api/googleapi:go_default_library",
|
||||
"//vendor/google.golang.org/api/option:go_default_library",
|
||||
"//vendor/google.golang.org/api/transport/http:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
382
vendor/google.golang.org/api/container/v1/container-api.json
generated
vendored
382
vendor/google.golang.org/api/container/v1/container-api.json
generated
vendored
@@ -106,10 +106,59 @@
|
||||
"resources": {
|
||||
"projects": {
|
||||
"resources": {
|
||||
"aggregated": {
|
||||
"resources": {
|
||||
"usableSubnetworks": {
|
||||
"methods": {
|
||||
"list": {
|
||||
"description": "Lists subnetworks that are usable for creating clusters in a project.",
|
||||
"flatPath": "v1/projects/{projectsId}/aggregated/usableSubnetworks",
|
||||
"httpMethod": "GET",
|
||||
"id": "container.projects.aggregated.usableSubnetworks.list",
|
||||
"parameterOrder": [
|
||||
"parent"
|
||||
],
|
||||
"parameters": {
|
||||
"filter": {
|
||||
"description": "Filtering currently only supports equality on the networkProjectId and must\nbe in the form: \"networkProjectId=[PROJECTID]\", where `networkProjectId`\nis the project which owns the listed subnetworks. This defaults to the\nparent project ID.",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
"pageSize": {
|
||||
"description": "The max number of results per page that should be returned. If the number\nof available results is larger than `page_size`, a `next_page_token` is\nreturned which can be used to get the next page of results in subsequent\nrequests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
|
||||
"format": "int32",
|
||||
"location": "query",
|
||||
"type": "integer"
|
||||
},
|
||||
"pageToken": {
|
||||
"description": "Specifies a page token to use. Set this to the nextPageToken returned by\nprevious list requests to get the next page of results.",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
"parent": {
|
||||
"description": "The parent project where subnetworks are usable.\nSpecified in the format 'projects/*'.",
|
||||
"location": "path",
|
||||
"pattern": "^projects/[^/]+$",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"path": "v1/{+parent}/aggregated/usableSubnetworks",
|
||||
"response": {
|
||||
"$ref": "ListUsableSubnetworksResponse"
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/cloud-platform"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"locations": {
|
||||
"methods": {
|
||||
"getServerConfig": {
|
||||
"description": "Returns configuration info about the Kubernetes Engine service.",
|
||||
"description": "Returns configuration info about the Google Kubernetes Engine service.",
|
||||
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverConfig",
|
||||
"httpMethod": "GET",
|
||||
"id": "container.projects.locations.getServerConfig",
|
||||
@@ -118,7 +167,7 @@
|
||||
],
|
||||
"parameters": {
|
||||
"name": {
|
||||
"description": "The name (project and location) of the server config to get\nSpecified in the format 'projects/*/locations/*'.",
|
||||
"description": "The name (project and location) of the server config to get,\nspecified in the format 'projects/*/locations/*'.",
|
||||
"location": "path",
|
||||
"pattern": "^projects/[^/]+/locations/[^/]+$",
|
||||
"required": true,
|
||||
@@ -176,7 +225,7 @@
|
||||
]
|
||||
},
|
||||
"create": {
|
||||
"description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe cluster creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range is being used by the cluster.",
|
||||
"description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe Kubelet creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range the cluster is using.",
|
||||
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters",
|
||||
"httpMethod": "POST",
|
||||
"id": "container.projects.locations.clusters.create",
|
||||
@@ -204,7 +253,7 @@
|
||||
]
|
||||
},
|
||||
"delete": {
|
||||
"description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster\n(e.g. load balancer resources) will not be deleted if they weren't present\nat the initial create time.",
|
||||
"description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster,\nsuch as load balancer resources, are not deleted if they weren't present\nwhen the cluster was initially created.",
|
||||
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}",
|
||||
"httpMethod": "DELETE",
|
||||
"id": "container.projects.locations.clusters.delete",
|
||||
@@ -283,6 +332,28 @@
|
||||
"https://www.googleapis.com/auth/cloud-platform"
|
||||
]
|
||||
},
|
||||
"getJwks": {
|
||||
"description": "Gets the public component of the cluster signing keys in\nJSON Web Key format.\nThis API is not yet intended for general use, and is not available for all\nclusters.",
|
||||
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/jwks",
|
||||
"httpMethod": "GET",
|
||||
"id": "container.projects.locations.clusters.getJwks",
|
||||
"parameterOrder": [
|
||||
"parent"
|
||||
],
|
||||
"parameters": {
|
||||
"parent": {
|
||||
"description": "The cluster (project, location, cluster id) to get keys for. Specified in\nthe format 'projects/*/locations/*/clusters/*'.",
|
||||
"location": "path",
|
||||
"pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"path": "v1/{+parent}/jwks",
|
||||
"response": {
|
||||
"$ref": "GetJSONWebKeysResponse"
|
||||
}
|
||||
},
|
||||
"list": {
|
||||
"description": "Lists all clusters owned by a project in either the specified zone or all\nzones.",
|
||||
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters",
|
||||
@@ -459,7 +530,7 @@
|
||||
]
|
||||
},
|
||||
"setMasterAuth": {
|
||||
"description": "Used to set master auth materials. Currently supports :-\nChanging the admin password for a specific cluster.\nThis can be either via password generation or explicitly set the password.",
|
||||
"description": "Sets master auth materials. Currently supports changing the admin password\nor a specific cluster, either via password generation or explicitly setting\nthe password.",
|
||||
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setMasterAuth",
|
||||
"httpMethod": "POST",
|
||||
"id": "container.projects.locations.clusters.setMasterAuth",
|
||||
@@ -515,7 +586,7 @@
|
||||
]
|
||||
},
|
||||
"setNetworkPolicy": {
|
||||
"description": "Enables/Disables Network Policy for a cluster.",
|
||||
"description": "Enables or disables Network Policy for a cluster.",
|
||||
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setNetworkPolicy",
|
||||
"httpMethod": "POST",
|
||||
"id": "container.projects.locations.clusters.setNetworkPolicy",
|
||||
@@ -571,7 +642,7 @@
|
||||
]
|
||||
},
|
||||
"startIpRotation": {
|
||||
"description": "Start master IP rotation.",
|
||||
"description": "Starts master IP rotation.",
|
||||
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:startIpRotation",
|
||||
"httpMethod": "POST",
|
||||
"id": "container.projects.locations.clusters.startIpRotation",
|
||||
@@ -732,7 +803,7 @@
|
||||
]
|
||||
},
|
||||
"get": {
|
||||
"description": "Retrieves the node pool requested.",
|
||||
"description": "Retrieves the requested node pool.",
|
||||
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}",
|
||||
"httpMethod": "GET",
|
||||
"id": "container.projects.locations.clusters.nodePools.get",
|
||||
@@ -817,7 +888,7 @@
|
||||
]
|
||||
},
|
||||
"rollback": {
|
||||
"description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed.",
|
||||
"description": "Rolls back a previously Aborted or Failed NodePool upgrade.\nThis makes no changes if the last upgrade successfully completed.",
|
||||
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:rollback",
|
||||
"httpMethod": "POST",
|
||||
"id": "container.projects.locations.clusters.nodePools.rollback",
|
||||
@@ -845,7 +916,7 @@
|
||||
]
|
||||
},
|
||||
"setAutoscaling": {
|
||||
"description": "Sets the autoscaling settings for a specific node pool.",
|
||||
"description": "Sets the autoscaling settings for the specified node pool.",
|
||||
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:setAutoscaling",
|
||||
"httpMethod": "POST",
|
||||
"id": "container.projects.locations.clusters.nodePools.setAutoscaling",
|
||||
@@ -929,7 +1000,7 @@
|
||||
]
|
||||
},
|
||||
"update": {
|
||||
"description": "Updates the version and/or image type for a specific node pool.",
|
||||
"description": "Updates the version and/or image type for the specified node pool.",
|
||||
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}",
|
||||
"httpMethod": "PUT",
|
||||
"id": "container.projects.locations.clusters.nodePools.update",
|
||||
@@ -957,6 +1028,32 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"well-known": {
|
||||
"methods": {
|
||||
"getOpenid-configuration": {
|
||||
"description": "Gets the OIDC discovery document for the cluster.\nSee the\n[OpenID Connect Discovery 1.0\nspecification](https://openid.net/specs/openid-connect-discovery-1_0.html)\nfor details.\nThis API is not yet intended for general use, and is not available for all\nclusters.",
|
||||
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/.well-known/openid-configuration",
|
||||
"httpMethod": "GET",
|
||||
"id": "container.projects.locations.clusters.well-known.getOpenid-configuration",
|
||||
"parameterOrder": [
|
||||
"parent"
|
||||
],
|
||||
"parameters": {
|
||||
"parent": {
|
||||
"description": "The cluster (project, location, cluster id) to get the discovery document\nfor. Specified in the format 'projects/*/locations/*/clusters/*'.",
|
||||
"location": "path",
|
||||
"pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"path": "v1/{+parent}/.well-known/openid-configuration",
|
||||
"response": {
|
||||
"$ref": "GetOpenIDConfigResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -1072,7 +1169,7 @@
|
||||
"zones": {
|
||||
"methods": {
|
||||
"getServerconfig": {
|
||||
"description": "Returns configuration info about the Kubernetes Engine service.",
|
||||
"description": "Returns configuration info about the Google Kubernetes Engine service.",
|
||||
"flatPath": "v1/projects/{projectId}/zones/{zone}/serverconfig",
|
||||
"httpMethod": "GET",
|
||||
"id": "container.projects.zones.getServerconfig",
|
||||
@@ -1082,7 +1179,7 @@
|
||||
],
|
||||
"parameters": {
|
||||
"name": {
|
||||
"description": "The name (project and location) of the server config to get\nSpecified in the format 'projects/*/locations/*'.",
|
||||
"description": "The name (project and location) of the server config to get,\nspecified in the format 'projects/*/locations/*'.",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
@@ -1194,7 +1291,7 @@
|
||||
]
|
||||
},
|
||||
"create": {
|
||||
"description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe cluster creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range is being used by the cluster.",
|
||||
"description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe Kubelet creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range the cluster is using.",
|
||||
"flatPath": "v1/projects/{projectId}/zones/{zone}/clusters",
|
||||
"httpMethod": "POST",
|
||||
"id": "container.projects.zones.clusters.create",
|
||||
@@ -1228,7 +1325,7 @@
|
||||
]
|
||||
},
|
||||
"delete": {
|
||||
"description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster\n(e.g. load balancer resources) will not be deleted if they weren't present\nat the initial create time.",
|
||||
"description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster,\nsuch as load balancer resources, are not deleted if they weren't present\nwhen the cluster was initially created.",
|
||||
"flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}",
|
||||
"httpMethod": "DELETE",
|
||||
"id": "container.projects.zones.clusters.delete",
|
||||
@@ -1637,7 +1734,7 @@
|
||||
]
|
||||
},
|
||||
"setMasterAuth": {
|
||||
"description": "Used to set master auth materials. Currently supports :-\nChanging the admin password for a specific cluster.\nThis can be either via password generation or explicitly set the password.",
|
||||
"description": "Sets master auth materials. Currently supports changing the admin password\nor a specific cluster, either via password generation or explicitly setting\nthe password.",
|
||||
"flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth",
|
||||
"httpMethod": "POST",
|
||||
"id": "container.projects.zones.clusters.setMasterAuth",
|
||||
@@ -1678,7 +1775,7 @@
|
||||
]
|
||||
},
|
||||
"setNetworkPolicy": {
|
||||
"description": "Enables/Disables Network Policy for a cluster.",
|
||||
"description": "Enables or disables Network Policy for a cluster.",
|
||||
"flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy",
|
||||
"httpMethod": "POST",
|
||||
"id": "container.projects.zones.clusters.setNetworkPolicy",
|
||||
@@ -1719,7 +1816,7 @@
|
||||
]
|
||||
},
|
||||
"startIpRotation": {
|
||||
"description": "Start master IP rotation.",
|
||||
"description": "Starts master IP rotation.",
|
||||
"flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation",
|
||||
"httpMethod": "POST",
|
||||
"id": "container.projects.zones.clusters.startIpRotation",
|
||||
@@ -1805,7 +1902,7 @@
|
||||
"nodePools": {
|
||||
"methods": {
|
||||
"autoscaling": {
|
||||
"description": "Sets the autoscaling settings for a specific node pool.",
|
||||
"description": "Sets the autoscaling settings for the specified node pool.",
|
||||
"flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling",
|
||||
"httpMethod": "POST",
|
||||
"id": "container.projects.zones.clusters.nodePools.autoscaling",
|
||||
@@ -1944,7 +2041,7 @@
|
||||
]
|
||||
},
|
||||
"get": {
|
||||
"description": "Retrieves the node pool requested.",
|
||||
"description": "Retrieves the requested node pool.",
|
||||
"flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}",
|
||||
"httpMethod": "GET",
|
||||
"id": "container.projects.zones.clusters.nodePools.get",
|
||||
@@ -2037,7 +2134,7 @@
|
||||
]
|
||||
},
|
||||
"rollback": {
|
||||
"description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed.",
|
||||
"description": "Rolls back a previously Aborted or Failed NodePool upgrade.\nThis makes no changes if the last upgrade successfully completed.",
|
||||
"flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback",
|
||||
"httpMethod": "POST",
|
||||
"id": "container.projects.zones.clusters.nodePools.rollback",
|
||||
@@ -2181,7 +2278,7 @@
|
||||
]
|
||||
},
|
||||
"update": {
|
||||
"description": "Updates the version and/or image type for a specific node pool.",
|
||||
"description": "Updates the version and/or image type for the specified node pool.",
|
||||
"flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update",
|
||||
"httpMethod": "POST",
|
||||
"id": "container.projects.zones.clusters.nodePools.update",
|
||||
@@ -2361,7 +2458,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"revision": "20181109",
|
||||
"revision": "20190514",
|
||||
"rootUrl": "https://container.googleapis.com/",
|
||||
"schemas": {
|
||||
"AcceleratorConfig": {
|
||||
@@ -2500,9 +2597,13 @@
|
||||
"type": "integer"
|
||||
},
|
||||
"currentNodeVersion": {
|
||||
"description": "[Output only] Deprecated, use\n[NodePool.version](/kubernetes-engine/docs/reference/rest/v1/projects.zones.clusters.nodePool)\ninstead. The current version of the node software components. If they are\ncurrently at multiple versions because they're in the process of being\nupgraded, this reflects the minimum version of all nodes.",
|
||||
"description": "[Output only] Deprecated, use\n[NodePools.version](/kubernetes-engine/docs/reference/rest/v1/projects.zones.clusters.nodePools)\ninstead. The current version of the node software components. If they are\ncurrently at multiple versions because they're in the process of being\nupgraded, this reflects the minimum version of all nodes.",
|
||||
"type": "string"
|
||||
},
|
||||
"defaultMaxPodsConstraint": {
|
||||
"$ref": "MaxPodsConstraint",
|
||||
"description": "The default constraint on the maximum number of pods that can be run\nsimultaneously on a node in the node pool of this cluster. Only honored\nif cluster created with IP Alias support."
|
||||
},
|
||||
"description": {
|
||||
"description": "An optional description of this cluster.",
|
||||
"type": "string"
|
||||
@@ -2511,6 +2612,10 @@
|
||||
"description": "Kubernetes alpha features are enabled on this cluster. This includes alpha\nAPI groups (e.g. v1alpha1) and features that may not be production ready in\nthe kubernetes version of the master and nodes.\nThe cluster has no SLA for uptime and master/node upgrades are disabled.\nAlpha enabled clusters are automatically deleted thirty days after\ncreation.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"enableTpu": {
|
||||
"description": "Enable the ability to use Cloud TPUs in this cluster.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"endpoint": {
|
||||
"description": "[Output only] The IP address of this cluster's master endpoint.\nThe endpoint can be accessed from the internet at\n`https://username:password@endpoint/`.\n\nSee the `masterAuth` property of this resource for username and\npassword information.",
|
||||
"type": "string"
|
||||
@@ -2524,7 +2629,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"initialNodeCount": {
|
||||
"description": "The number of nodes to create in this cluster. You must ensure that your\nCompute Engine \u003ca href=\"/compute/docs/resource-quotas\"\u003eresource quota\u003c/a\u003e\nis sufficient for this number of instances. You must also have available\nfirewall and routes quota.\nFor requests, this field should only be used in lieu of a\n\"node_pool\" object, since this configuration (along with the\n\"node_config\") will be used to create a \"NodePool\" object with an\nauto-generated name. Do not use this and a node_pool at the same time.",
|
||||
"description": "The number of nodes to create in this cluster. You must ensure that your\nCompute Engine \u003ca href=\"/compute/docs/resource-quotas\"\u003eresource quota\u003c/a\u003e\nis sufficient for this number of instances. You must also have available\nfirewall and routes quota.\nFor requests, this field should only be used in lieu of a\n\"node_pool\" object, since this configuration (along with the\n\"node_config\") will be used to create a \"NodePool\" object with an\nauto-generated name. Do not use this and a node_pool at the same time.\n\nThis field is deprecated, use node_pool.initial_node_count instead.",
|
||||
"format": "int32",
|
||||
"type": "integer"
|
||||
},
|
||||
@@ -2596,10 +2701,10 @@
|
||||
},
|
||||
"nodeConfig": {
|
||||
"$ref": "NodeConfig",
|
||||
"description": "Parameters used in creating the cluster's nodes.\nSee `nodeConfig` for the description of its properties.\nFor requests, this field should only be used in lieu of a\n\"node_pool\" object, since this configuration (along with the\n\"initial_node_count\") will be used to create a \"NodePool\" object with an\nauto-generated name. Do not use this and a node_pool at the same time.\nFor responses, this field will be populated with the node configuration of\nthe first node pool.\n\nIf unspecified, the defaults are used."
|
||||
"description": "Parameters used in creating the cluster's nodes.\nFor requests, this field should only be used in lieu of a\n\"node_pool\" object, since this configuration (along with the\n\"initial_node_count\") will be used to create a \"NodePool\" object with an\nauto-generated name. Do not use this and a node_pool at the same time.\nFor responses, this field will be populated with the node configuration of\nthe first node pool. (For configuration of each node pool, see\n`node_pool.config`)\n\nIf unspecified, the defaults are used.\nThis field is deprecated, use node_pool.config instead."
|
||||
},
|
||||
"nodeIpv4CidrSize": {
|
||||
"description": "[Output only] The size of the address space on each node for hosting\ncontainers. This is provisioned from within the `container_ipv4_cidr`\nrange.",
|
||||
"description": "[Output only] The size of the address space on each node for hosting\ncontainers. This is provisioned from within the `container_ipv4_cidr`\nrange. This field will only be set when cluster is in route-based network\nmode.",
|
||||
"format": "int32",
|
||||
"type": "integer"
|
||||
},
|
||||
@@ -2659,6 +2764,10 @@
|
||||
"description": "The name of the Google Compute Engine\n[subnetwork](/compute/docs/subnetworks) to which the\ncluster is connected.",
|
||||
"type": "string"
|
||||
},
|
||||
"tpuIpv4CidrBlock": {
|
||||
"description": "[Output only] The IP address range of the Cloud TPUs in this cluster, in\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `1.2.3.4/29`).",
|
||||
"type": "string"
|
||||
},
|
||||
"zone": {
|
||||
"description": "[Output only] The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use location instead.",
|
||||
"type": "string"
|
||||
@@ -2794,7 +2903,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"startTime": {
|
||||
"description": "Time within the maintenance window to start the maintenance operations.\nTime format should be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt)\nformat \"HH:MM”, where HH : [00-23] and MM : [00-59] GMT.",
|
||||
"description": "Time within the maintenance window to start the maintenance operations.\nTime format should be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt)\nformat \"HH:MM\", where HH : [00-23] and MM : [00-59] GMT.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
@@ -2806,6 +2915,70 @@
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
},
|
||||
"GetJSONWebKeysResponse": {
|
||||
"description": "GetJSONWebKeysResponse is a valid JSON Web Key Set as specififed in rfc 7517",
|
||||
"id": "GetJSONWebKeysResponse",
|
||||
"properties": {
|
||||
"keys": {
|
||||
"description": "The public component of the keys used by the cluster to sign token\nrequests.",
|
||||
"items": {
|
||||
"$ref": "Jwk"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"GetOpenIDConfigResponse": {
|
||||
"description": "GetOpenIDConfigResponse is an OIDC discovery document for the cluster.\nSee the OpenID Connect Discovery 1.0 specification for details.",
|
||||
"id": "GetOpenIDConfigResponse",
|
||||
"properties": {
|
||||
"claims_supported": {
|
||||
"description": "Supported claims.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"grant_types": {
|
||||
"description": "Supported grant types.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"id_token_signing_alg_values_supported": {
|
||||
"description": "supported ID Token signing Algorithms.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"issuer": {
|
||||
"description": "OIDC Issuer.",
|
||||
"type": "string"
|
||||
},
|
||||
"jwks_uri": {
|
||||
"description": "JSON Web Key uri.",
|
||||
"type": "string"
|
||||
},
|
||||
"response_types_supported": {
|
||||
"description": "Supported response types.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"subject_types_supported": {
|
||||
"description": "Supported subject types.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"HorizontalPodAutoscaling": {
|
||||
"description": "Configuration options for the horizontal pod autoscaling feature, which\nincreases or decreases the number of replica pods a replication controller\nhas based on the resource usage of the existing pods.",
|
||||
"id": "HorizontalPodAutoscaling",
|
||||
@@ -2872,6 +3045,10 @@
|
||||
"description": "A custom subnetwork name to be used if `create_subnetwork` is true. If\nthis field is empty, then an automatic name will be chosen for the new\nsubnetwork.",
|
||||
"type": "string"
|
||||
},
|
||||
"tpuIpv4CidrBlock": {
|
||||
"description": "The IP address range of the Cloud TPUs in this cluster. If unspecified, a\nrange will be automatically chosen with the default size.\n\nThis field is only applicable when `use_ip_aliases` is true.\n\nIf unspecified, the range will use the default size.\n\nSet to /netmask (e.g. `/14`) to have a range chosen with a specific\nnetmask.\n\nSet to a\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use.",
|
||||
"type": "string"
|
||||
},
|
||||
"useIpAliases": {
|
||||
"description": "Whether alias IPs will be used for pod IPs in the cluster.",
|
||||
"type": "boolean"
|
||||
@@ -2879,6 +3056,49 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"Jwk": {
|
||||
"description": "Jwk is a JSON Web Key as specified in RFC 7517",
|
||||
"id": "Jwk",
|
||||
"properties": {
|
||||
"alg": {
|
||||
"description": "Algorithm.",
|
||||
"type": "string"
|
||||
},
|
||||
"crv": {
|
||||
"description": "Used for ECDSA keys.",
|
||||
"type": "string"
|
||||
},
|
||||
"e": {
|
||||
"description": "Used for RSA keys.",
|
||||
"type": "string"
|
||||
},
|
||||
"kid": {
|
||||
"description": "Key ID.",
|
||||
"type": "string"
|
||||
},
|
||||
"kty": {
|
||||
"description": "Key Type.",
|
||||
"type": "string"
|
||||
},
|
||||
"n": {
|
||||
"description": "Used for RSA keys.",
|
||||
"type": "string"
|
||||
},
|
||||
"use": {
|
||||
"description": "Permitted uses for the public keys.",
|
||||
"type": "string"
|
||||
},
|
||||
"x": {
|
||||
"description": "Used for ECDSA keys.",
|
||||
"type": "string"
|
||||
},
|
||||
"y": {
|
||||
"description": "Used for ECDSA keys.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"KubernetesDashboard": {
|
||||
"description": "Configuration for the Kubernetes Dashboard.",
|
||||
"id": "KubernetesDashboard",
|
||||
@@ -2957,6 +3177,24 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"ListUsableSubnetworksResponse": {
|
||||
"description": "ListUsableSubnetworksResponse is the response of\nListUsableSubnetworksRequest.",
|
||||
"id": "ListUsableSubnetworksResponse",
|
||||
"properties": {
|
||||
"nextPageToken": {
|
||||
"description": "This token allows you to get the next page of results for list requests.\nIf the number of results is larger than `page_size`, use the\n`next_page_token` as a value for the query parameter `page_token` in the\nnext request. The value will become empty when there are no more pages.",
|
||||
"type": "string"
|
||||
},
|
||||
"subnetworks": {
|
||||
"description": "A list of usable subnetworks in the specified network project.",
|
||||
"items": {
|
||||
"$ref": "UsableSubnetwork"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"MaintenancePolicy": {
|
||||
"description": "MaintenancePolicy defines the maintenance policy to be used for the cluster.",
|
||||
"id": "MaintenancePolicy",
|
||||
@@ -3015,7 +3253,7 @@
|
||||
"id": "MasterAuthorizedNetworksConfig",
|
||||
"properties": {
|
||||
"cidrBlocks": {
|
||||
"description": "cidr_blocks define up to 10 external networks that could access\nKubernetes master through HTTPS.",
|
||||
"description": "cidr_blocks define up to 50 external networks that could access\nKubernetes master through HTTPS.",
|
||||
"items": {
|
||||
"$ref": "CidrBlock"
|
||||
},
|
||||
@@ -3028,6 +3266,18 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"MaxPodsConstraint": {
|
||||
"description": "Constraints applied to pods.",
|
||||
"id": "MaxPodsConstraint",
|
||||
"properties": {
|
||||
"maxPodsPerNode": {
|
||||
"description": "Constraint enforced on the max num of pods per node.",
|
||||
"format": "int64",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"NetworkConfig": {
|
||||
"description": "NetworkConfig reports the relative names of network \u0026 subnetwork.",
|
||||
"id": "NetworkConfig",
|
||||
@@ -3121,7 +3371,7 @@
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "The metadata key/value pairs assigned to instances in the cluster.\n\nKeys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes\nin length. These are reflected as part of a URL in the metadata server.\nAdditionally, to avoid ambiguity, keys must not conflict with any other\nmetadata keys for the project or be one of the reserved keys:\n \"cluster-location\"\n \"cluster-name\"\n \"cluster-uid\"\n \"configure-sh\"\n \"enable-os-login\"\n \"gci-update-strategy\"\n \"gci-ensure-gke-docker\"\n \"instance-template\"\n \"kube-env\"\n \"startup-script\"\n \"user-data\"\n\nValues are free-form strings, and only have meaning as interpreted by\nthe image running in the instance. The only restriction placed on them is\nthat each value's size must be less than or equal to 32 KB.\n\nThe total size of all keys and values must be less than 512 KB.",
|
||||
"description": "The metadata key/value pairs assigned to instances in the cluster.\n\nKeys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes\nin length. These are reflected as part of a URL in the metadata server.\nAdditionally, to avoid ambiguity, keys must not conflict with any other\nmetadata keys for the project or be one of the reserved keys:\n \"cluster-location\"\n \"cluster-name\"\n \"cluster-uid\"\n \"configure-sh\"\n \"containerd-configure-sh\"\n \"enable-os-login\"\n \"gci-update-strategy\"\n \"gci-ensure-gke-docker\"\n \"instance-template\"\n \"kube-env\"\n \"startup-script\"\n \"user-data\"\n\nValues are free-form strings, and only have meaning as interpreted by\nthe image running in the instance. The only restriction placed on them is\nthat each value's size must be less than or equal to 32 KB.\n\nThe total size of all keys and values must be less than 512 KB.",
|
||||
"type": "object"
|
||||
},
|
||||
"minCpuPlatform": {
|
||||
@@ -3214,10 +3464,19 @@
|
||||
"$ref": "NodeManagement",
|
||||
"description": "NodeManagement configuration for this NodePool."
|
||||
},
|
||||
"maxPodsConstraint": {
|
||||
"$ref": "MaxPodsConstraint",
|
||||
"description": "The constraint on the maximum number of pods that can be run\nsimultaneously on a node in the node pool."
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the node pool.",
|
||||
"type": "string"
|
||||
},
|
||||
"podIpv4CidrSize": {
|
||||
"description": "[Output only] The pod CIDR block size per node in this node pool.",
|
||||
"format": "int32",
|
||||
"type": "integer"
|
||||
},
|
||||
"selfLink": {
|
||||
"description": "[Output only] Server-defined URL for the resource.",
|
||||
"type": "string"
|
||||
@@ -4021,6 +4280,69 @@
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"UsableSubnetwork": {
|
||||
"description": "UsableSubnetwork resource returns the subnetwork name, its associated network\nand the primary CIDR range.",
|
||||
"id": "UsableSubnetwork",
|
||||
"properties": {
|
||||
"ipCidrRange": {
|
||||
"description": "The range of internal addresses that are owned by this subnetwork.",
|
||||
"type": "string"
|
||||
},
|
||||
"network": {
|
||||
"description": "Network Name.\nExample: projects/my-project/global/networks/my-network",
|
||||
"type": "string"
|
||||
},
|
||||
"secondaryIpRanges": {
|
||||
"description": "Secondary IP ranges.",
|
||||
"items": {
|
||||
"$ref": "UsableSubnetworkSecondaryRange"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"statusMessage": {
|
||||
"description": "A human readable status message representing the reasons for cases where\nthe caller cannot use the secondary ranges under the subnet. For example if\nthe secondary_ip_ranges is empty due to a permission issue, an insufficient\npermission message will be given by status_message.",
|
||||
"type": "string"
|
||||
},
|
||||
"subnetwork": {
|
||||
"description": "Subnetwork Name.\nExample: projects/my-project/regions/us-central1/subnetworks/my-subnet",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"UsableSubnetworkSecondaryRange": {
|
||||
"description": "Secondary IP range of a usable subnetwork.",
|
||||
"id": "UsableSubnetworkSecondaryRange",
|
||||
"properties": {
|
||||
"ipCidrRange": {
|
||||
"description": "The range of IP addresses belonging to this subnetwork secondary range.",
|
||||
"type": "string"
|
||||
},
|
||||
"rangeName": {
|
||||
"description": "The name associated with this subnetwork secondary range, used when adding\nan alias IP range to a VM instance.",
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"description": "This field is to determine the status of the secondary range programmably.",
|
||||
"enum": [
|
||||
"UNKNOWN",
|
||||
"UNUSED",
|
||||
"IN_USE_SERVICE",
|
||||
"IN_USE_SHAREABLE_POD",
|
||||
"IN_USE_MANAGED_POD"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"UNKNOWN is the zero value of the Status enum. It's not a valid status.",
|
||||
"UNUSED denotes that this range is unclaimed by any cluster.",
|
||||
"IN_USE_SERVICE denotes that this range is claimed by a cluster for\nservices. It cannot be used for other clusters.",
|
||||
"IN_USE_SHAREABLE_POD denotes this range was created by the network admin\nand is currently claimed by a cluster for pods. It can only be used by\nother clusters as a pod range.",
|
||||
"IN_USE_MANAGED_POD denotes this range was created by GKE and is claimed\nfor pods. It cannot be used for other clusters."
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"servicePath": "",
|
||||
|
1119
vendor/google.golang.org/api/container/v1/container-gen.go
generated
vendored
1119
vendor/google.golang.org/api/container/v1/container-gen.go
generated
vendored
File diff suppressed because it is too large
Load Diff
29
vendor/google.golang.org/api/gensupport/media.go
generated
vendored
29
vendor/google.golang.org/api/gensupport/media.go
generated
vendored
@@ -9,6 +9,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"mime"
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
"net/textproto"
|
||||
@@ -115,11 +116,15 @@ type multipartReader struct {
|
||||
pipeOpen bool
|
||||
}
|
||||
|
||||
func newMultipartReader(parts []typeReader) *multipartReader {
|
||||
// boundary optionally specifies the MIME boundary
|
||||
func newMultipartReader(parts []typeReader, boundary string) *multipartReader {
|
||||
mp := &multipartReader{pipeOpen: true}
|
||||
var pw *io.PipeWriter
|
||||
mp.pr, pw = io.Pipe()
|
||||
mpw := multipart.NewWriter(pw)
|
||||
if boundary != "" {
|
||||
mpw.SetBoundary(boundary)
|
||||
}
|
||||
mp.ctype = "multipart/related; boundary=" + mpw.Boundary()
|
||||
go func() {
|
||||
for _, part := range parts {
|
||||
@@ -163,10 +168,15 @@ func (mp *multipartReader) Close() error {
|
||||
//
|
||||
// The caller must call Close on the returned ReadCloser if reads are abandoned before reaching EOF.
|
||||
func CombineBodyMedia(body io.Reader, bodyContentType string, media io.Reader, mediaContentType string) (io.ReadCloser, string) {
|
||||
return combineBodyMedia(body, bodyContentType, media, mediaContentType, "")
|
||||
}
|
||||
|
||||
// combineBodyMedia is CombineBodyMedia but with an optional mimeBoundary field.
|
||||
func combineBodyMedia(body io.Reader, bodyContentType string, media io.Reader, mediaContentType, mimeBoundary string) (io.ReadCloser, string) {
|
||||
mp := newMultipartReader([]typeReader{
|
||||
{body, bodyContentType},
|
||||
{media, mediaContentType},
|
||||
})
|
||||
}, mimeBoundary)
|
||||
return mp, mp.ctype
|
||||
}
|
||||
|
||||
@@ -284,7 +294,11 @@ func (mi *MediaInfo) UploadRequest(reqHeaders http.Header, body io.Reader) (newB
|
||||
getBody = func() (io.ReadCloser, error) {
|
||||
rb := ioutil.NopCloser(fb())
|
||||
rm := ioutil.NopCloser(fm())
|
||||
r, _ := CombineBodyMedia(rb, "application/json", rm, mi.mType)
|
||||
var mimeBoundary string
|
||||
if _, params, err := mime.ParseMediaType(ctype); err == nil {
|
||||
mimeBoundary = params["boundary"]
|
||||
}
|
||||
r, _ := combineBodyMedia(rb, "application/json", rm, mi.mType, mimeBoundary)
|
||||
return r, nil
|
||||
}
|
||||
}
|
||||
@@ -336,7 +350,14 @@ func (mi *MediaInfo) ResumableUpload(locURI string) *ResumableUpload {
|
||||
}
|
||||
}
|
||||
|
||||
// SetGetBody sets the GetBody field of req to f.
|
||||
// SetGetBody sets the GetBody field of req to f. This was once needed
|
||||
// to gracefully support Go 1.7 and earlier which didn't have that
|
||||
// field.
|
||||
//
|
||||
// Deprecated: the code generator no longer uses this as of
|
||||
// 2019-02-19. Nothing else should be calling this anyway, but we
|
||||
// won't delete this immediately; it will be deleted in as early as 6
|
||||
// months.
|
||||
func SetGetBody(req *http.Request, f func() (io.ReadCloser, error)) {
|
||||
req.GetBody = f
|
||||
}
|
||||
|
1
vendor/google.golang.org/api/googleapi/BUILD
generated
vendored
1
vendor/google.golang.org/api/googleapi/BUILD
generated
vendored
@@ -24,6 +24,7 @@ filegroup(
|
||||
srcs = [
|
||||
":package-srcs",
|
||||
"//vendor/google.golang.org/api/googleapi/internal/uritemplates:all-srcs",
|
||||
"//vendor/google.golang.org/api/googleapi/transport:all-srcs",
|
||||
],
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:public"],
|
||||
|
26
vendor/google.golang.org/api/googleapi/googleapi.go
generated
vendored
26
vendor/google.golang.org/api/googleapi/googleapi.go
generated
vendored
@@ -189,32 +189,6 @@ func (wrap MarshalStyle) JSONReader(v interface{}) (io.Reader, error) {
|
||||
return buf, nil
|
||||
}
|
||||
|
||||
// endingWithErrorReader from r until it returns an error. If the
|
||||
// final error from r is io.EOF and e is non-nil, e is used instead.
|
||||
type endingWithErrorReader struct {
|
||||
r io.Reader
|
||||
e error
|
||||
}
|
||||
|
||||
func (er endingWithErrorReader) Read(p []byte) (n int, err error) {
|
||||
n, err = er.r.Read(p)
|
||||
if err == io.EOF && er.e != nil {
|
||||
err = er.e
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// countingWriter counts the number of bytes it receives to write, but
|
||||
// discards them.
|
||||
type countingWriter struct {
|
||||
n *int64
|
||||
}
|
||||
|
||||
func (w countingWriter) Write(p []byte) (int, error) {
|
||||
*w.n += int64(len(p))
|
||||
return len(p), nil
|
||||
}
|
||||
|
||||
// ProgressUpdater is a function that is called upon every progress update of a resumable upload.
|
||||
// This is the only part of a resumable upload (from googleapi) that is usable by the developer.
|
||||
// The remaining usable pieces of resumable uploads is exposed in each auto-generated API.
|
||||
|
23
vendor/google.golang.org/api/googleapi/transport/BUILD
generated
vendored
Normal file
23
vendor/google.golang.org/api/googleapi/transport/BUILD
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["apikey.go"],
|
||||
importmap = "k8s.io/kubernetes/vendor/google.golang.org/api/googleapi/transport",
|
||||
importpath = "google.golang.org/api/googleapi/transport",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "package-srcs",
|
||||
srcs = glob(["**"]),
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "all-srcs",
|
||||
srcs = [":package-srcs"],
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
38
vendor/google.golang.org/api/googleapi/transport/apikey.go
generated
vendored
Normal file
38
vendor/google.golang.org/api/googleapi/transport/apikey.go
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
// Copyright 2012 Google Inc. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Package transport contains HTTP transports used to make
|
||||
// authenticated API requests.
|
||||
package transport
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// APIKey is an HTTP Transport which wraps an underlying transport and
|
||||
// appends an API Key "key" parameter to the URL of outgoing requests.
|
||||
type APIKey struct {
|
||||
// Key is the API Key to set on requests.
|
||||
Key string
|
||||
|
||||
// Transport is the underlying HTTP transport.
|
||||
// If nil, http.DefaultTransport is used.
|
||||
Transport http.RoundTripper
|
||||
}
|
||||
|
||||
func (t *APIKey) RoundTrip(req *http.Request) (*http.Response, error) {
|
||||
rt := t.Transport
|
||||
if rt == nil {
|
||||
rt = http.DefaultTransport
|
||||
if rt == nil {
|
||||
return nil, errors.New("googleapi/transport: no Transport specified or available")
|
||||
}
|
||||
}
|
||||
newReq := *req
|
||||
args := newReq.URL.Query()
|
||||
args.Set("key", t.Key)
|
||||
newReq.URL.RawQuery = args.Encode()
|
||||
return rt.RoundTrip(&newReq)
|
||||
}
|
33
vendor/google.golang.org/api/internal/BUILD
generated
vendored
Normal file
33
vendor/google.golang.org/api/internal/BUILD
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"creds.go",
|
||||
"pool.go",
|
||||
"settings.go",
|
||||
],
|
||||
importmap = "k8s.io/kubernetes/vendor/google.golang.org/api/internal",
|
||||
importpath = "google.golang.org/api/internal",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//vendor/golang.org/x/oauth2:go_default_library",
|
||||
"//vendor/golang.org/x/oauth2/google:go_default_library",
|
||||
"//vendor/google.golang.org/grpc:go_default_library",
|
||||
"//vendor/google.golang.org/grpc/naming: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"],
|
||||
)
|
102
vendor/google.golang.org/api/internal/creds.go
generated
vendored
Normal file
102
vendor/google.golang.org/api/internal/creds.go
generated
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
// Copyright 2017 Google LLC
|
||||
//
|
||||
// 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 internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
|
||||
"golang.org/x/oauth2"
|
||||
|
||||
"golang.org/x/oauth2/google"
|
||||
)
|
||||
|
||||
// Creds returns credential information obtained from DialSettings, or if none, then
|
||||
// it returns default credential information.
|
||||
func Creds(ctx context.Context, ds *DialSettings) (*google.Credentials, error) {
|
||||
if ds.Credentials != nil {
|
||||
return ds.Credentials, nil
|
||||
}
|
||||
if ds.CredentialsJSON != nil {
|
||||
return credentialsFromJSON(ctx, ds.CredentialsJSON, ds.Endpoint, ds.Scopes, ds.Audiences)
|
||||
}
|
||||
if ds.CredentialsFile != "" {
|
||||
data, err := ioutil.ReadFile(ds.CredentialsFile)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot read credentials file: %v", err)
|
||||
}
|
||||
return credentialsFromJSON(ctx, data, ds.Endpoint, ds.Scopes, ds.Audiences)
|
||||
}
|
||||
if ds.TokenSource != nil {
|
||||
return &google.Credentials{TokenSource: ds.TokenSource}, nil
|
||||
}
|
||||
cred, err := google.FindDefaultCredentials(ctx, ds.Scopes...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(cred.JSON) > 0 {
|
||||
return credentialsFromJSON(ctx, cred.JSON, ds.Endpoint, ds.Scopes, ds.Audiences)
|
||||
}
|
||||
// For GAE and GCE, the JSON is empty so return the default credentials directly.
|
||||
return cred, nil
|
||||
}
|
||||
|
||||
// JSON key file type.
|
||||
const (
|
||||
serviceAccountKey = "service_account"
|
||||
)
|
||||
|
||||
// credentialsFromJSON returns a google.Credentials based on the input.
|
||||
//
|
||||
// - If the JSON is a service account and no scopes provided, returns self-signed JWT auth flow
|
||||
// - Otherwise, returns OAuth 2.0 flow.
|
||||
func credentialsFromJSON(ctx context.Context, data []byte, endpoint string, scopes []string, audiences []string) (*google.Credentials, error) {
|
||||
cred, err := google.CredentialsFromJSON(ctx, data, scopes...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(data) > 0 && len(scopes) == 0 {
|
||||
var f struct {
|
||||
Type string `json:"type"`
|
||||
// The rest JSON fields are omitted because they are not used.
|
||||
}
|
||||
if err := json.Unmarshal(cred.JSON, &f); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if f.Type == serviceAccountKey {
|
||||
ts, err := selfSignedJWTTokenSource(data, endpoint, audiences)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cred.TokenSource = ts
|
||||
}
|
||||
}
|
||||
return cred, err
|
||||
}
|
||||
|
||||
func selfSignedJWTTokenSource(data []byte, endpoint string, audiences []string) (oauth2.TokenSource, error) {
|
||||
// Use the API endpoint as the default audience
|
||||
audience := endpoint
|
||||
if len(audiences) > 0 {
|
||||
// TODO(shinfan): Update golang oauth to support multiple audiences.
|
||||
if len(audiences) > 1 {
|
||||
return nil, fmt.Errorf("multiple audiences support is not implemented")
|
||||
}
|
||||
audience = audiences[0]
|
||||
}
|
||||
return google.JWTAccessTokenSourceFromJSON(data, audience)
|
||||
}
|
61
vendor/google.golang.org/api/internal/pool.go
generated
vendored
Normal file
61
vendor/google.golang.org/api/internal/pool.go
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
// Copyright 2016 Google LLC
|
||||
//
|
||||
// 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 internal
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"google.golang.org/grpc/naming"
|
||||
)
|
||||
|
||||
// PoolResolver provides a fixed list of addresses to load balance between
|
||||
// and does not provide further updates.
|
||||
type PoolResolver struct {
|
||||
poolSize int
|
||||
dialOpt *DialSettings
|
||||
ch chan []*naming.Update
|
||||
}
|
||||
|
||||
// NewPoolResolver returns a PoolResolver
|
||||
// This is an EXPERIMENTAL API and may be changed or removed in the future.
|
||||
func NewPoolResolver(size int, o *DialSettings) *PoolResolver {
|
||||
return &PoolResolver{poolSize: size, dialOpt: o}
|
||||
}
|
||||
|
||||
// Resolve returns a Watcher for the endpoint defined by the DialSettings
|
||||
// provided to NewPoolResolver.
|
||||
func (r *PoolResolver) Resolve(target string) (naming.Watcher, error) {
|
||||
if r.dialOpt.Endpoint == "" {
|
||||
return nil, errors.New("no endpoint configured")
|
||||
}
|
||||
addrs := make([]*naming.Update, 0, r.poolSize)
|
||||
for i := 0; i < r.poolSize; i++ {
|
||||
addrs = append(addrs, &naming.Update{Op: naming.Add, Addr: r.dialOpt.Endpoint, Metadata: i})
|
||||
}
|
||||
r.ch = make(chan []*naming.Update, 1)
|
||||
r.ch <- addrs
|
||||
return r, nil
|
||||
}
|
||||
|
||||
// Next returns a static list of updates on the first call,
|
||||
// and blocks indefinitely until Close is called on subsequent calls.
|
||||
func (r *PoolResolver) Next() ([]*naming.Update, error) {
|
||||
return <-r.ch, nil
|
||||
}
|
||||
|
||||
// Close releases resources associated with the pool and causes Next to unblock.
|
||||
func (r *PoolResolver) Close() {
|
||||
close(r.ch)
|
||||
}
|
12
vendor/google.golang.org/api/internal/service-account.json
generated
vendored
Normal file
12
vendor/google.golang.org/api/internal/service-account.json
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"type": "service_account",
|
||||
"project_id": "project_id",
|
||||
"private_key_id": "private_key_id",
|
||||
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCzd9ZdbPLAR4/g\nj+Rodu15kEasMpxf/Mz+gKRb2fmgR2Y18Y/iRBYZ4SkmF2pBSfzvwE/aTCzSPBGl\njHhPzohXnSN029eWoItmxVONlqCbR29pD07aLzv08LGeIGdHIEdhVjhvRwTkYZIF\ndXmlHNDRUU/EbJN9D+3ahw22BNnC4PaDgfIWTs3xIlTCSf2rL39I4DSNLTS/LzxK\n/XrQfBMtfwMWwyQaemXbc7gRgzOy8L56wa1W1zyXx99th97j1bLnoAXBGplhB4Co\n25ohyDAuhxRm+XGMEaO0Mzo7u97kvhj48a569RH1QRhOf7EBf60jO4h5eOmfi5P5\nPV3l7041AgMBAAECggEAEZ0RTNoEeRqM5F067YW+iM/AH+ZXspP9Cn1VpC4gcbqQ\nLXsnw+0qvh97CmIB66Z3TJBzRdl0DK4YjUbcB/kdKHwjnrR01DOtesijCqJd4N+B\n762w73jzSXbV9872U+S3HLZ5k3JE6KUqz55X8fyCAgkY6w4862lEzs2yasrPFHEV\nRoQp3PM0Miif8R3hGDhOWcHxcobullthG6JHAQFfc1ctwEjZI4TK0iWqlzfWGyKN\nT9UgvjUDud5cGvS9el0AiLN6keAf77tcPn1zetUVhxN1KN4bVAm1Q+6O8esl63Rj\n7JXpHzxaRnit9S6/aH/twHsGGtLg5Puw6jey6xs4AQKBgQD2JNy1wzewCRkD+jug\n8CHbJ+LIJVRNIaWa/RK1QD8/UjmFPkIzRQSF3AKC5mRAWSa2FL3yVK3N/DD7hazW\n85XSBB7IDcnoJnA9SkUeWwqQGkDx3EntlU3gX8Kn/+ofF8O9jLXxAa901MAVXVuf\n5YDzrl4PNE3bFnPCdiNmSdRfhQKBgQC6p4DsCpwqbeTu9f5ak9VW/fQP47Fgt+Mf\nwGjBnKP5PbbNJpHCfamF7jqSRH83Xy0KNssH7jD/NZ2oT594sMmiQPUC5ni9VYY6\nsuYB0JbD5Mq+EjKIVhYtxaQJ76LzHreEI+G4z6k3H7/hRpr3/C48n9G/uVkT9DbJ\noplxxEx68QKBgQCdJ23vcwO0Firtmi/GEmtbVHz70rGfSXNFoHz4UlvPXv0wsE5u\nE4vOt2i3EMhDOWh46odYGG6bzH+tp2xyFTW70Dui+QLHgPs6dpfoyLHWzZxXj5F3\n6lK9hgZvYvqk/XRRKmzjwnK2wjsdqOyeC1covlR5mqh20D/6kZkKbur0TQKBgAwy\nCZBimRWEnKKoW/gbFKNccGfhXqONID/g2Hdd/rC4QYth68AjacIgcJ9B7nX1uAGk\n1tsryvPB0w0+NpMyKdp6GAgaeuUUA3MuYSzZLiCagEyu77JMvaI7+Z3UlHcCGMd/\neK4Uk1/QqT7U2Cc/yN2ZK6E1QQa2vCWshA4U31JhAoGAbtbSSSsul1c+PsJ13Cfk\n6qVnqYzPqt23QTyOZmGAvUHH/M4xRiQpOE0cDF4t/r5PwenAQPQzTvMmWRzj6uAY\n3eaU0eAK7ZfoweCoOIAPnpFbbRLrXfoY46H7MYh7euWGXOKEpxz5yzuEkd9ByNUE\n86vSEidqbMIiXVgEgnu/k08=\n-----END PRIVATE KEY-----\n",
|
||||
"client_email": "xyz@developer.gserviceaccount.com",
|
||||
"client_id": "123",
|
||||
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
|
||||
"token_uri": "https://accounts.google.com/o/oauth2/token",
|
||||
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
|
||||
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/xyz%40developer.gserviceaccount.com"
|
||||
}
|
96
vendor/google.golang.org/api/internal/settings.go
generated
vendored
Normal file
96
vendor/google.golang.org/api/internal/settings.go
generated
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
// Copyright 2017 Google LLC
|
||||
//
|
||||
// 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 internal supports the options and transport packages.
|
||||
package internal
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net/http"
|
||||
|
||||
"golang.org/x/oauth2"
|
||||
"golang.org/x/oauth2/google"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
// DialSettings holds information needed to establish a connection with a
|
||||
// Google API service.
|
||||
type DialSettings struct {
|
||||
Endpoint string
|
||||
Scopes []string
|
||||
TokenSource oauth2.TokenSource
|
||||
Credentials *google.Credentials
|
||||
CredentialsFile string // if set, Token Source is ignored.
|
||||
CredentialsJSON []byte
|
||||
UserAgent string
|
||||
APIKey string
|
||||
Audiences []string
|
||||
HTTPClient *http.Client
|
||||
GRPCDialOpts []grpc.DialOption
|
||||
GRPCConn *grpc.ClientConn
|
||||
NoAuth bool
|
||||
|
||||
// Google API system parameters. For more information please read:
|
||||
// https://cloud.google.com/apis/docs/system-parameters
|
||||
QuotaProject string
|
||||
RequestReason string
|
||||
}
|
||||
|
||||
// Validate reports an error if ds is invalid.
|
||||
func (ds *DialSettings) Validate() error {
|
||||
hasCreds := ds.APIKey != "" || ds.TokenSource != nil || ds.CredentialsFile != "" || ds.Credentials != nil
|
||||
if ds.NoAuth && hasCreds {
|
||||
return errors.New("options.WithoutAuthentication is incompatible with any option that provides credentials")
|
||||
}
|
||||
// Credentials should not appear with other options.
|
||||
// We currently allow TokenSource and CredentialsFile to coexist.
|
||||
// TODO(jba): make TokenSource & CredentialsFile an error (breaking change).
|
||||
nCreds := 0
|
||||
if ds.Credentials != nil {
|
||||
nCreds++
|
||||
}
|
||||
if ds.CredentialsJSON != nil {
|
||||
nCreds++
|
||||
}
|
||||
if ds.CredentialsFile != "" {
|
||||
nCreds++
|
||||
}
|
||||
if ds.APIKey != "" {
|
||||
nCreds++
|
||||
}
|
||||
if ds.TokenSource != nil {
|
||||
nCreds++
|
||||
}
|
||||
if len(ds.Scopes) > 0 && len(ds.Audiences) > 0 {
|
||||
return errors.New("WithScopes is incompatible with WithAudience")
|
||||
}
|
||||
// Accept only one form of credentials, except we allow TokenSource and CredentialsFile for backwards compatibility.
|
||||
if nCreds > 1 && !(nCreds == 2 && ds.TokenSource != nil && ds.CredentialsFile != "") {
|
||||
return errors.New("multiple credential options provided")
|
||||
}
|
||||
if ds.HTTPClient != nil && ds.GRPCConn != nil {
|
||||
return errors.New("WithHTTPClient is incompatible with WithGRPCConn")
|
||||
}
|
||||
if ds.HTTPClient != nil && ds.GRPCDialOpts != nil {
|
||||
return errors.New("WithHTTPClient is incompatible with gRPC dial options")
|
||||
}
|
||||
if ds.HTTPClient != nil && ds.QuotaProject != "" {
|
||||
return errors.New("WithHTTPClient is incompatible with QuotaProject")
|
||||
}
|
||||
if ds.HTTPClient != nil && ds.RequestReason != "" {
|
||||
return errors.New("WithHTTPClient is incompatible with RequestReason")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
2
vendor/google.golang.org/api/logging/v2beta1/BUILD
generated
vendored
2
vendor/google.golang.org/api/logging/v2beta1/BUILD
generated
vendored
@@ -9,6 +9,8 @@ go_library(
|
||||
deps = [
|
||||
"//vendor/google.golang.org/api/gensupport:go_default_library",
|
||||
"//vendor/google.golang.org/api/googleapi:go_default_library",
|
||||
"//vendor/google.golang.org/api/option:go_default_library",
|
||||
"//vendor/google.golang.org/api/transport/http:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
44
vendor/google.golang.org/api/logging/v2beta1/logging-api.json
generated
vendored
44
vendor/google.golang.org/api/logging/v2beta1/logging-api.json
generated
vendored
@@ -119,7 +119,7 @@
|
||||
"entries": {
|
||||
"methods": {
|
||||
"list": {
|
||||
"description": "Lists log entries. Use this method to retrieve log entries from Logging. For ways to export log entries, see Exporting Logs.",
|
||||
"description": "Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways to export log entries, see Exporting Logs.",
|
||||
"flatPath": "v2beta1/entries:list",
|
||||
"httpMethod": "POST",
|
||||
"id": "logging.entries.list",
|
||||
@@ -485,7 +485,7 @@
|
||||
]
|
||||
},
|
||||
"update": {
|
||||
"description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.",
|
||||
"description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.",
|
||||
"flatPath": "v2beta1/projects/{projectsId}/sinks/{sinksId}",
|
||||
"httpMethod": "PUT",
|
||||
"id": "logging.projects.sinks.update",
|
||||
@@ -529,7 +529,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"revision": "20181020",
|
||||
"revision": "20190316",
|
||||
"rootUrl": "https://logging.googleapis.com/",
|
||||
"schemas": {
|
||||
"BucketOptions": {
|
||||
@@ -660,7 +660,7 @@
|
||||
"type": "integer"
|
||||
},
|
||||
"userAgent": {
|
||||
"description": "The user agent sent by the client. Example: \"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)\".",
|
||||
"description": "The user agent sent by the client. Example: \"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET\nCLR 1.0.3705)\".",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
@@ -739,7 +739,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"projectIds": {
|
||||
"description": "Deprecated. Use resource_names instead. One or more project identifiers or project numbers from which to retrieve log entries. Example: \"my-project-1A\". If present, these project identifiers are converted to resource name format and added to the list of resources in resource_names.",
|
||||
"description": "Deprecated. Use resource_names instead. One or more project identifiers or project numbers from which to retrieve log entries. Example: \"my-project-1A\".",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -855,12 +855,12 @@
|
||||
"type": "object"
|
||||
},
|
||||
"logName": {
|
||||
"description": "Required. The resource name of the log to which this log entry belongs:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]\"\n\"folders/[FOLDER_ID]/logs/[LOG_ID]\"\nA project number may optionally be used in place of PROJECT_ID. The project number is translated to its corresponding PROJECT_ID internally and the log_name field will contain PROJECT_ID in queries and exports.[LOG_ID] must be URL-encoded within log_name. Example: \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". [LOG_ID] must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters, forward-slash, underscore, hyphen, and period.For backward compatibility, if log_name begins with a forward-slash, such as /projects/..., then the log entry is ingested as usual but the forward-slash is removed. Listing the log entry will not show the leading slash and filtering for a log name with a leading slash will never return any results.",
|
||||
"description": "Required. The resource name of the log to which this log entry belongs:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]\"\n\"folders/[FOLDER_ID]/logs/[LOG_ID]\"\nA project number may optionally be used in place of PROJECT_ID. The project number is translated to its corresponding PROJECT_ID internally and the log_name field will contain PROJECT_ID in queries and exports.[LOG_ID] must be URL-encoded within log_name. Example: \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". [LOG_ID] must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters, forward-slash, underscore, hyphen, and period.For backward compatibility, if log_name begins with a forward-slash, such as /projects/..., then the log entry is ingested as usual but the forward-slash is removed. Listing the log entry will not show the leading slash and filtering for a log name with a leading slash will never return any results.",
|
||||
"type": "string"
|
||||
},
|
||||
"metadata": {
|
||||
"$ref": "MonitoredResourceMetadata",
|
||||
"description": "Output only. Additional metadata about the monitored resource. Only k8s_container, k8s_pod, and k8s_node MonitoredResources have this field populated."
|
||||
"description": "Deprecated. Output only. Additional metadata about the monitored resource.Only k8s_container, k8s_pod, and k8s_node MonitoredResources have this field populated for GKE versions older than 1.12.6. For GKE versions 1.12.6 and above, the metadata field has been deprecated. The Kubernetes pod labels that used to be in metadata.userLabels will now be present in the labels field with a key prefix of k8s-pod/. The Stackdriver system labels that were present in the metadata.systemLabels field will no longer be available in the LogEntry."
|
||||
},
|
||||
"operation": {
|
||||
"$ref": "LogEntryOperation",
|
||||
@@ -881,7 +881,7 @@
|
||||
},
|
||||
"resource": {
|
||||
"$ref": "MonitoredResource",
|
||||
"description": "Required. The primary monitored resource associated with this log entry. Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error."
|
||||
"description": "Required. The primary monitored resource associated with this log entry.Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error."
|
||||
},
|
||||
"severity": {
|
||||
"description": "Optional. The severity of the log entry. The default value is LogSeverity.DEFAULT.",
|
||||
@@ -914,7 +914,7 @@
|
||||
"description": "Optional. Source code location information associated with the log entry, if any."
|
||||
},
|
||||
"spanId": {
|
||||
"description": "Optional. The span ID within the trace associated with the log entry. For Trace spans, this is the same format that the Trace API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such as \u003ccode\u003e\"000000000000004a\"\u003c/code\u003e.",
|
||||
"description": "Optional. The span ID within the trace associated with the log entry.For Trace spans, this is the same format that the Trace API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such as \u003ccode\u003e\"000000000000004a\"\u003c/code\u003e.",
|
||||
"type": "string"
|
||||
},
|
||||
"textPayload": {
|
||||
@@ -931,7 +931,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"traceSampled": {
|
||||
"description": "Optional. The sampling decision of the trace associated with the log entry. True means that the trace resource name in the trace field was sampled for storage in a trace backend. False means that the trace was not sampled for storage when this log entry was written, or the sampling decision was unknown at the time. A non-sampled trace value is still useful as a request correlation identifier. The default is False.",
|
||||
"description": "Optional. The sampling decision of the trace associated with the log entry.True means that the trace resource name in the trace field was sampled for storage in a trace backend. False means that the trace was not sampled for storage when this log entry was written, or the sampling decision was unknown at the time. A non-sampled trace value is still useful as a request correlation identifier. The default is False.",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
@@ -1034,6 +1034,11 @@
|
||||
"$ref": "BucketOptions",
|
||||
"description": "Optional. The bucket_options are required when the logs-based metric is using a DISTRIBUTION value type and it describes the bucket boundaries used to create a histogram of the extracted values."
|
||||
},
|
||||
"createTime": {
|
||||
"description": "Output only. The creation timestamp of the metric.This field may not be present for older metrics.",
|
||||
"format": "google-datetime",
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"description": "Optional. A description of this metric, which is used in documentation. The maximum length of the description is 8000 characters.",
|
||||
"type": "string"
|
||||
@@ -1057,6 +1062,11 @@
|
||||
"description": "Required. The client-assigned metric identifier. Examples: \"error_count\", \"nginx/requests\".Metric identifiers are limited to 100 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name.The metric identifier in this field must not be URL-encoded (https://en.wikipedia.org/wiki/Percent-encoding). However, when the metric identifier appears as the [METRIC_ID] part of a metric_name API parameter, then the metric identifier must be URL-encoded. Example: \"projects/my-project/metrics/nginx%2Frequests\".",
|
||||
"type": "string"
|
||||
},
|
||||
"updateTime": {
|
||||
"description": "Output only. The last update timestamp of the metric.This field may not be present for older metrics.",
|
||||
"format": "google-datetime",
|
||||
"type": "string"
|
||||
},
|
||||
"valueExtractor": {
|
||||
"description": "Optional. A value_extractor is required when using a distribution logs-based metric to extract the values to record from a log entry. Two functions are supported for value extraction: EXTRACT(field) or REGEXP_EXTRACT(field, regex). The argument are: 1. field: The name of the log entry field from which the value is to be extracted. 2. regex: A regular expression using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax) with a single capture group to extract data from the specified log entry field. The value of the field is converted to a string before applying the regex. It is an error to specify a regex that does not include exactly one capture group.The result of the extraction must be convertible to a double type, as the distribution always records double values. If either the extraction or the conversion to double fails, then those values are not recorded in the distribution.Example: REGEXP_EXTRACT(jsonPayload.request, \".*quantity=(\\d+).*\")",
|
||||
"type": "string"
|
||||
@@ -1080,8 +1090,13 @@
|
||||
"description": "Describes a sink used to export log entries to one of the following destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a Cloud Pub/Sub topic. A logs filter controls which log entries are exported. The sink must be created within a project, organization, billing account, or folder.",
|
||||
"id": "LogSink",
|
||||
"properties": {
|
||||
"createTime": {
|
||||
"description": "Output only. The creation timestamp of the sink.This field may not be present for older sinks.",
|
||||
"format": "google-datetime",
|
||||
"type": "string"
|
||||
},
|
||||
"destination": {
|
||||
"description": "Required. The export destination:\n\"storage.googleapis.com/[GCS_BUCKET]\"\n\"bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]\"\n\"pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]\"\nThe sink's writer_identity, set when the sink is created, must have permission to write to the destination or else the log entries are not exported. For more information, see Exporting Logs With Sinks.",
|
||||
"description": "Required. The export destination:\n\"storage.googleapis.com/[GCS_BUCKET]\"\n\"bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]\"\n\"pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]\"\nThe sink's writer_identity, set when the sink is created, must have permission to write to the destination or else the log entries are not exported. For more information, see Exporting Logs with Sinks.",
|
||||
"type": "string"
|
||||
},
|
||||
"filter": {
|
||||
@@ -1110,8 +1125,13 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"updateTime": {
|
||||
"description": "Output only. The last update timestamp of the sink.This field may not be present for older sinks.",
|
||||
"format": "google-datetime",
|
||||
"type": "string"
|
||||
},
|
||||
"writerIdentity": {
|
||||
"description": "Output only. An IAM identity\u0026mdash;a service account or group\u0026mdash;under which Logging writes the exported log entries to the sink's destination. This field is set by sinks.create and sinks.update, based on the setting of unique_writer_identity in those methods.Until you grant this identity write-access to the destination, log entry exports from this sink will fail. For more information, see Granting access for a resource. Consult the destination service's documentation to determine the appropriate IAM roles to assign to the identity.",
|
||||
"description": "Output only. An IAM identity\u0026mdash;a service account or group\u0026mdash;under which Logging writes the exported log entries to the sink's destination. This field is set by sinks.create and sinks.update based on the value of unique_writer_identity in those methods.Until you grant this identity write-access to the destination, log entry exports from this sink will fail. For more information, see Granting Access for a Resource. Consult the destination service's documentation to determine the appropriate IAM roles to assign to the identity.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
|
138
vendor/google.golang.org/api/logging/v2beta1/logging-gen.go
generated
vendored
138
vendor/google.golang.org/api/logging/v2beta1/logging-gen.go
generated
vendored
@@ -1,4 +1,4 @@
|
||||
// Copyright 2018 Google Inc. All rights reserved.
|
||||
// Copyright 2019 Google LLC.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
@@ -8,13 +8,39 @@
|
||||
//
|
||||
// This package is DEPRECATED. Use package cloud.google.com/go/logging instead.
|
||||
//
|
||||
// See https://cloud.google.com/logging/docs/
|
||||
// For product documentation, see: https://cloud.google.com/logging/docs/
|
||||
//
|
||||
// Creating a client
|
||||
//
|
||||
// Usage example:
|
||||
//
|
||||
// import "google.golang.org/api/logging/v2beta1"
|
||||
// ...
|
||||
// loggingService, err := logging.New(oauthHttpClient)
|
||||
// ctx := context.Background()
|
||||
// loggingService, err := logging.NewService(ctx)
|
||||
//
|
||||
// In this example, Google Application Default Credentials are used for authentication.
|
||||
//
|
||||
// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
|
||||
//
|
||||
// Other authentication options
|
||||
//
|
||||
// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
|
||||
//
|
||||
// loggingService, err := logging.NewService(ctx, option.WithScopes(logging.LoggingWriteScope))
|
||||
//
|
||||
// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
|
||||
//
|
||||
// loggingService, err := logging.NewService(ctx, option.WithAPIKey("AIza..."))
|
||||
//
|
||||
// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
|
||||
//
|
||||
// config := &oauth2.Config{...}
|
||||
// // ...
|
||||
// token, err := config.Exchange(ctx, ...)
|
||||
// loggingService, err := logging.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
|
||||
//
|
||||
// See https://godoc.org/google.golang.org/api/option/ for details on options.
|
||||
package logging // import "google.golang.org/api/logging/v2beta1"
|
||||
|
||||
import (
|
||||
@@ -31,6 +57,8 @@ import (
|
||||
|
||||
gensupport "google.golang.org/api/gensupport"
|
||||
googleapi "google.golang.org/api/googleapi"
|
||||
option "google.golang.org/api/option"
|
||||
htransport "google.golang.org/api/transport/http"
|
||||
)
|
||||
|
||||
// Always reference these packages, just in case the auto-generated code
|
||||
@@ -70,6 +98,36 @@ const (
|
||||
LoggingWriteScope = "https://www.googleapis.com/auth/logging.write"
|
||||
)
|
||||
|
||||
// NewService creates a new Service.
|
||||
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
|
||||
scopesOption := option.WithScopes(
|
||||
"https://www.googleapis.com/auth/cloud-platform",
|
||||
"https://www.googleapis.com/auth/cloud-platform.read-only",
|
||||
"https://www.googleapis.com/auth/logging.admin",
|
||||
"https://www.googleapis.com/auth/logging.read",
|
||||
"https://www.googleapis.com/auth/logging.write",
|
||||
)
|
||||
// NOTE: prepend, so we don't override user-specified scopes.
|
||||
opts = append([]option.ClientOption{scopesOption}, opts...)
|
||||
client, endpoint, err := htransport.NewClient(ctx, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
s, err := New(client)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if endpoint != "" {
|
||||
s.BasePath = endpoint
|
||||
}
|
||||
return s, nil
|
||||
}
|
||||
|
||||
// New creates a new Service. It uses the provided http.Client for requests.
|
||||
//
|
||||
// Deprecated: please use NewService instead.
|
||||
// To provide a custom HTTP client, use option.WithHTTPClient.
|
||||
// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
|
||||
func New(client *http.Client) (*Service, error) {
|
||||
if client == nil {
|
||||
return nil, errors.New("client is nil")
|
||||
@@ -369,7 +427,8 @@ type HttpRequest struct {
|
||||
Status int64 `json:"status,omitempty"`
|
||||
|
||||
// UserAgent: The user agent sent by the client. Example: "Mozilla/4.0
|
||||
// (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)".
|
||||
// (compatible; MSIE 6.0; Windows 98; Q312461; .NET
|
||||
// CLR 1.0.3705)".
|
||||
UserAgent string `json:"userAgent,omitempty"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "CacheFillBytes") to
|
||||
@@ -525,9 +584,7 @@ type ListLogEntriesRequest struct {
|
||||
|
||||
// ProjectIds: Deprecated. Use resource_names instead. One or more
|
||||
// project identifiers or project numbers from which to retrieve log
|
||||
// entries. Example: "my-project-1A". If present, these project
|
||||
// identifiers are converted to resource name format and added to the
|
||||
// list of resources in resource_names.
|
||||
// entries. Example: "my-project-1A".
|
||||
ProjectIds []string `json:"projectIds,omitempty"`
|
||||
|
||||
// ResourceNames: Required. Names of one or more parent resources from
|
||||
@@ -758,7 +815,7 @@ type LogEntry struct {
|
||||
// "folders/[FOLDER_ID]/logs/[LOG_ID]"
|
||||
// A project number may optionally be used in place of PROJECT_ID. The
|
||||
// project number is translated to its corresponding PROJECT_ID
|
||||
// internally and the log_name field will contain PROJECT_ID in queries
|
||||
// internally and the log_name field will contain PROJECT_ID in queries
|
||||
// and exports.[LOG_ID] must be URL-encoded within log_name. Example:
|
||||
// "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Fa
|
||||
// ctivity". [LOG_ID] must be less than 512 characters long and can only
|
||||
@@ -771,9 +828,15 @@ type LogEntry struct {
|
||||
// never return any results.
|
||||
LogName string `json:"logName,omitempty"`
|
||||
|
||||
// Metadata: Output only. Additional metadata about the monitored
|
||||
// resource. Only k8s_container, k8s_pod, and k8s_node
|
||||
// MonitoredResources have this field populated.
|
||||
// Metadata: Deprecated. Output only. Additional metadata about the
|
||||
// monitored resource.Only k8s_container, k8s_pod, and k8s_node
|
||||
// MonitoredResources have this field populated for GKE versions older
|
||||
// than 1.12.6. For GKE versions 1.12.6 and above, the metadata field
|
||||
// has been deprecated. The Kubernetes pod labels that used to be in
|
||||
// metadata.userLabels will now be present in the labels field with a
|
||||
// key prefix of k8s-pod/. The Stackdriver system labels that were
|
||||
// present in the metadata.systemLabels field will no longer be
|
||||
// available in the LogEntry.
|
||||
Metadata *MonitoredResourceMetadata `json:"metadata,omitempty"`
|
||||
|
||||
// Operation: Optional. Information about an operation associated with
|
||||
@@ -790,7 +853,7 @@ type LogEntry struct {
|
||||
ReceiveTimestamp string `json:"receiveTimestamp,omitempty"`
|
||||
|
||||
// Resource: Required. The primary monitored resource associated with
|
||||
// this log entry. Example: a log entry that reports a database error
|
||||
// this log entry.Example: a log entry that reports a database error
|
||||
// would be associated with the monitored resource designating the
|
||||
// particular database that reported the error.
|
||||
Resource *MonitoredResource `json:"resource,omitempty"`
|
||||
@@ -818,9 +881,9 @@ type LogEntry struct {
|
||||
SourceLocation *LogEntrySourceLocation `json:"sourceLocation,omitempty"`
|
||||
|
||||
// SpanId: Optional. The span ID within the trace associated with the
|
||||
// log entry. For Trace spans, this is the same format that the Trace
|
||||
// API v2 uses: a 16-character hexadecimal encoding of an 8-byte array,
|
||||
// such as <code>"000000000000004a"</code>.
|
||||
// log entry.For Trace spans, this is the same format that the Trace API
|
||||
// v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such
|
||||
// as <code>"000000000000004a"</code>.
|
||||
SpanId string `json:"spanId,omitempty"`
|
||||
|
||||
// TextPayload: The log entry payload, represented as a Unicode string
|
||||
@@ -847,7 +910,7 @@ type LogEntry struct {
|
||||
Trace string `json:"trace,omitempty"`
|
||||
|
||||
// TraceSampled: Optional. The sampling decision of the trace associated
|
||||
// with the log entry. True means that the trace resource name in the
|
||||
// with the log entry.True means that the trace resource name in the
|
||||
// trace field was sampled for storage in a trace backend. False means
|
||||
// that the trace was not sampled for storage when this log entry was
|
||||
// written, or the sampling decision was unknown at the time. A
|
||||
@@ -1028,6 +1091,10 @@ type LogMetric struct {
|
||||
// values.
|
||||
BucketOptions *BucketOptions `json:"bucketOptions,omitempty"`
|
||||
|
||||
// CreateTime: Output only. The creation timestamp of the metric.This
|
||||
// field may not be present for older metrics.
|
||||
CreateTime string `json:"createTime,omitempty"`
|
||||
|
||||
// Description: Optional. A description of this metric, which is used in
|
||||
// documentation. The maximum length of the description is 8000
|
||||
// characters.
|
||||
@@ -1084,6 +1151,10 @@ type LogMetric struct {
|
||||
// Example: "projects/my-project/metrics/nginx%2Frequests".
|
||||
Name string `json:"name,omitempty"`
|
||||
|
||||
// UpdateTime: Output only. The last update timestamp of the metric.This
|
||||
// field may not be present for older metrics.
|
||||
UpdateTime string `json:"updateTime,omitempty"`
|
||||
|
||||
// ValueExtractor: Optional. A value_extractor is required when using a
|
||||
// distribution logs-based metric to extract the values to record from a
|
||||
// log entry. Two functions are supported for value extraction:
|
||||
@@ -1143,6 +1214,10 @@ func (s *LogMetric) MarshalJSON() ([]byte, error) {
|
||||
// which log entries are exported. The sink must be created within a
|
||||
// project, organization, billing account, or folder.
|
||||
type LogSink struct {
|
||||
// CreateTime: Output only. The creation timestamp of the sink.This
|
||||
// field may not be present for older sinks.
|
||||
CreateTime string `json:"createTime,omitempty"`
|
||||
|
||||
// Destination: Required. The export
|
||||
// destination:
|
||||
// "storage.googleapis.com/[GCS_BUCKET]"
|
||||
@@ -1152,7 +1227,7 @@ type LogSink struct {
|
||||
// /projects/[PROJECT_ID]/topics/[TOPIC_ID]"
|
||||
// The sink's writer_identity, set when the sink is created, must have
|
||||
// permission to write to the destination or else the log entries are
|
||||
// not exported. For more information, see Exporting Logs With Sinks.
|
||||
// not exported. For more information, see Exporting Logs with Sinks.
|
||||
Destination string `json:"destination,omitempty"`
|
||||
|
||||
// Filter: Optional. An advanced logs filter. The only exported log
|
||||
@@ -1199,13 +1274,17 @@ type LogSink struct {
|
||||
// "V1" - LogEntry version 1 format.
|
||||
OutputVersionFormat string `json:"outputVersionFormat,omitempty"`
|
||||
|
||||
// UpdateTime: Output only. The last update timestamp of the sink.This
|
||||
// field may not be present for older sinks.
|
||||
UpdateTime string `json:"updateTime,omitempty"`
|
||||
|
||||
// WriterIdentity: Output only. An IAM identity—a service account
|
||||
// or group—under which Logging writes the exported log entries to
|
||||
// the sink's destination. This field is set by sinks.create and
|
||||
// sinks.update, based on the setting of unique_writer_identity in those
|
||||
// sinks.update based on the value of unique_writer_identity in those
|
||||
// methods.Until you grant this identity write-access to the
|
||||
// destination, log entry exports from this sink will fail. For more
|
||||
// information, see Granting access for a resource. Consult the
|
||||
// information, see Granting Access for a Resource. Consult the
|
||||
// destination service's documentation to determine the appropriate IAM
|
||||
// roles to assign to the identity.
|
||||
WriterIdentity string `json:"writerIdentity,omitempty"`
|
||||
@@ -1214,7 +1293,7 @@ type LogSink struct {
|
||||
// server.
|
||||
googleapi.ServerResponse `json:"-"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "Destination") to
|
||||
// ForceSendFields is a list of field names (e.g. "CreateTime") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty values are omitted from API requests. However, any non-pointer,
|
||||
// non-interface field appearing in ForceSendFields will be sent to the
|
||||
@@ -1222,10 +1301,10 @@ type LogSink struct {
|
||||
// used to include empty fields in Patch requests.
|
||||
ForceSendFields []string `json:"-"`
|
||||
|
||||
// NullFields is a list of field names (e.g. "Destination") to include
|
||||
// in API requests with the JSON null value. By default, fields with
|
||||
// empty values are omitted from API requests. However, any field with
|
||||
// an empty value appearing in NullFields will be sent to the server as
|
||||
// NullFields is a list of field names (e.g. "CreateTime") to include in
|
||||
// API requests with the JSON null value. By default, fields with empty
|
||||
// values are omitted from API requests. However, any field with an
|
||||
// empty value appearing in NullFields will be sent to the server as
|
||||
// null. It is an error if a field in this list has a non-empty value.
|
||||
// This may be used to include null fields in Patch requests.
|
||||
NullFields []string `json:"-"`
|
||||
@@ -1960,8 +2039,9 @@ type EntriesListCall struct {
|
||||
header_ http.Header
|
||||
}
|
||||
|
||||
// List: Lists log entries. Use this method to retrieve log entries from
|
||||
// Logging. For ways to export log entries, see Exporting Logs.
|
||||
// List: Lists log entries. Use this method to retrieve log entries that
|
||||
// originated from a project/folder/organization/billing account. For
|
||||
// ways to export log entries, see Exporting Logs.
|
||||
func (r *EntriesService) List(listlogentriesrequest *ListLogEntriesRequest) *EntriesListCall {
|
||||
c := &EntriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
c.listlogentriesrequest = listlogentriesrequest
|
||||
@@ -2055,7 +2135,7 @@ func (c *EntriesListCall) Do(opts ...googleapi.CallOption) (*ListLogEntriesRespo
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Lists log entries. Use this method to retrieve log entries from Logging. For ways to export log entries, see Exporting Logs.",
|
||||
// "description": "Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways to export log entries, see Exporting Logs.",
|
||||
// "flatPath": "v2beta1/entries:list",
|
||||
// "httpMethod": "POST",
|
||||
// "id": "logging.entries.list",
|
||||
@@ -3824,7 +3904,7 @@ type ProjectsSinksUpdateCall struct {
|
||||
|
||||
// Update: Updates a sink. This method replaces the following fields in
|
||||
// the existing sink with values from the new sink: destination, and
|
||||
// filter. The updated sink might also have a new writer_identity; see
|
||||
// filter.The updated sink might also have a new writer_identity; see
|
||||
// the unique_writer_identity field.
|
||||
func (r *ProjectsSinksService) Update(sinkNameid string, logsink *LogSink) *ProjectsSinksUpdateCall {
|
||||
c := &ProjectsSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
@@ -3954,7 +4034,7 @@ func (c *ProjectsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, er
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writer_identity; see the unique_writer_identity field.",
|
||||
// "description": "Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field.",
|
||||
// "flatPath": "v2beta1/projects/{projectsId}/sinks/{sinksId}",
|
||||
// "httpMethod": "PUT",
|
||||
// "id": "logging.projects.sinks.update",
|
||||
|
2
vendor/google.golang.org/api/monitoring/v3/BUILD
generated
vendored
2
vendor/google.golang.org/api/monitoring/v3/BUILD
generated
vendored
@@ -9,6 +9,8 @@ go_library(
|
||||
deps = [
|
||||
"//vendor/google.golang.org/api/gensupport:go_default_library",
|
||||
"//vendor/google.golang.org/api/googleapi:go_default_library",
|
||||
"//vendor/google.golang.org/api/option:go_default_library",
|
||||
"//vendor/google.golang.org/api/transport/http:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
69
vendor/google.golang.org/api/monitoring/v3/monitoring-api.json
generated
vendored
69
vendor/google.golang.org/api/monitoring/v3/monitoring-api.json
generated
vendored
@@ -21,7 +21,7 @@
|
||||
"baseUrl": "https://monitoring.googleapis.com/",
|
||||
"batchPath": "batch",
|
||||
"canonicalName": "Monitoring",
|
||||
"description": "Manages your Stackdriver Monitoring data and configurations. Most projects must be associated with a Stackdriver account, with a few exceptions as noted on the individual method pages.",
|
||||
"description": "Manages your Stackdriver Monitoring data and configurations. Most projects must be associated with a Stackdriver account, with a few exceptions as noted on the individual method pages. The table entries below are presented in alphabetical order, not in order of common use. For explanations of the concepts found in the table entries, read the Stackdriver Monitoring documentation.",
|
||||
"discoveryVersion": "v1",
|
||||
"documentationLink": "https://cloud.google.com/monitoring/api/",
|
||||
"fullyEncodeReservedExpansion": true,
|
||||
@@ -369,6 +369,11 @@
|
||||
"pattern": "^projects/[^/]+/groups/[^/]+$",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
"recursive": {
|
||||
"description": "If this field is true, then the request means to delete a group with all its descendants. Otherwise, the request means to delete a group only when it has no descendants. The default value is false.",
|
||||
"location": "query",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"path": "v3/{+name}",
|
||||
@@ -1196,7 +1201,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"filter": {
|
||||
"description": "A monitoring filter that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example:\nmetric.type = \"compute.googleapis.com/instance/cpu/usage_time\" AND\n metric.label.instance_name = \"my-instance-name\"\n",
|
||||
"description": "A monitoring filter that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example:\nmetric.type = \"compute.googleapis.com/instance/cpu/usage_time\" AND\n metric.labels.instance_name = \"my-instance-name\"\n",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
@@ -1452,7 +1457,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"revision": "20181211",
|
||||
"revision": "20190604",
|
||||
"rootUrl": "https://monitoring.googleapis.com/",
|
||||
"schemas": {
|
||||
"Aggregation": {
|
||||
@@ -1946,7 +1951,7 @@
|
||||
"id": "Exemplar",
|
||||
"properties": {
|
||||
"attachments": {
|
||||
"description": "Contextual information about the example value. Examples are:Trace ID: type.googleapis.com/google.devtools.cloudtrace.v1.TraceLiteral string: type.googleapis.com/google.protobuf.StringValueLabels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabelsThere may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.",
|
||||
"description": "Contextual information about the example value. Examples are:Trace: type.googleapis.com/google.monitoring.v3.SpanContextLiteral string: type.googleapis.com/google.protobuf.StringValueLabels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabelsThere may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.",
|
||||
"items": {
|
||||
"additionalProperties": {
|
||||
"description": "Properties of the object. Contains field @type with type URL.",
|
||||
@@ -2187,7 +2192,7 @@
|
||||
"type": "boolean"
|
||||
},
|
||||
"path": {
|
||||
"description": "The path to the page to run the check against. Will be combined with the host (specified within the MonitoredResource) and port to construct the full URL. Optional (defaults to \"/\").",
|
||||
"description": "The path to the page to run the check against. Will be combined with the host (specified within the MonitoredResource) and port to construct the full URL. Optional (defaults to \"/\"). If the provided path does not begin with \"/\", it will be prepended automatically.",
|
||||
"type": "string"
|
||||
},
|
||||
"port": {
|
||||
@@ -2555,6 +2560,26 @@
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"launchStage": {
|
||||
"description": "Optional. The launch stage of the metric definition.",
|
||||
"enum": [
|
||||
"LAUNCH_STAGE_UNSPECIFIED",
|
||||
"EARLY_ACCESS",
|
||||
"ALPHA",
|
||||
"BETA",
|
||||
"GA",
|
||||
"DEPRECATED"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"Do not use this default value.",
|
||||
"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.",
|
||||
"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects whitelisted. Alpha releases don’t have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.",
|
||||
"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.",
|
||||
"GA features are open to all developers and are considered stable and fully qualified for production use.",
|
||||
"Deprecated features are scheduled to be shut down and removed. For more information, see the “Deprecation Policy” section of our Terms of Service (https://cloud.google.com/terms/) and the Google Cloud Platform Subject to the Deprecation Policy (https://cloud.google.com/terms/deprecation) documentation."
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"metadata": {
|
||||
"$ref": "MetricDescriptorMetadata",
|
||||
"description": "Optional. Metadata which can be used to guide usage of the metric."
|
||||
@@ -2622,7 +2647,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"launchStage": {
|
||||
"description": "The launch stage of the metric definition.",
|
||||
"description": "Deprecated. Please use the MetricDescriptor.launch_stage instead. The launch stage of the metric definition.",
|
||||
"enum": [
|
||||
"LAUNCH_STAGE_UNSPECIFIED",
|
||||
"EARLY_ACCESS",
|
||||
@@ -2733,7 +2758,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"MonitoredResourceDescriptor": {
|
||||
"description": "An object that describes the schema of a MonitoredResource object using a type name and a set of labels. For example, the monitored resource descriptor for Google Compute Engine VM instances has a type of \"gce_instance\" and specifies the use of the labels \"instance_id\" and \"zone\" to identify particular VM instances.Different APIs can support different monitored resource types. APIs generally provide a list method that returns the monitored resource descriptors used by the API.",
|
||||
"description": "An object that describes the schema of a MonitoredResource object using a type name and a set of labels. For example, the monitored resource descriptor for Google Compute Engine VM instances has a type of \"gce_instance\" and specifies the use of the labels \"instance_id\" and \"zone\" to identify particular VM instances.Different APIs can support different monitored resource types. APIs generally provide a list method that returns the monitored resource descriptors used by the API.Next ID: 10",
|
||||
"id": "MonitoredResourceDescriptor",
|
||||
"properties": {
|
||||
"description": {
|
||||
@@ -2751,6 +2776,26 @@
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"launchStage": {
|
||||
"description": "Optional. The launch stage of the monitored resource definition.",
|
||||
"enum": [
|
||||
"LAUNCH_STAGE_UNSPECIFIED",
|
||||
"EARLY_ACCESS",
|
||||
"ALPHA",
|
||||
"BETA",
|
||||
"GA",
|
||||
"DEPRECATED"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"Do not use this default value.",
|
||||
"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.",
|
||||
"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects whitelisted. Alpha releases don’t have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.",
|
||||
"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.",
|
||||
"GA features are open to all developers and are considered stable and fully qualified for production use.",
|
||||
"Deprecated features are scheduled to be shut down and removed. For more information, see the “Deprecation Policy” section of our Terms of Service (https://cloud.google.com/terms/) and the Google Cloud Platform Subject to the Deprecation Policy (https://cloud.google.com/terms/deprecation) documentation."
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"description": "Optional. The resource name of the monitored resource descriptor: \"projects/{project_id}/monitoredResourceDescriptors/{type}\" where {type} is the value of the type field in this object and {project_id} is a project ID that provides API-specific context for accessing the type. APIs that do not use project information can use the resource name format \"monitoredResourceDescriptors/{type}\".",
|
||||
"type": "string"
|
||||
@@ -2805,7 +2850,7 @@
|
||||
"id": "NotificationChannel",
|
||||
"properties": {
|
||||
"description": {
|
||||
"description": "An optional human-readable description of this notification channel. This description may provide additional details, beyond the display name, for the channel. This may not exceeed 1024 Unicode characters.",
|
||||
"description": "An optional human-readable description of this notification channel. This description may provide additional details, beyond the display name, for the channel. This may not exceed 1024 Unicode characters.",
|
||||
"type": "string"
|
||||
},
|
||||
"displayName": {
|
||||
@@ -3007,7 +3052,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"Status": {
|
||||
"description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be:\nSimple to use and understand for most users\nFlexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include:\nPartial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors.\nWorkflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting.\nBatch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response.\nAsynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message.\nLogging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.",
|
||||
"description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors).",
|
||||
"id": "Status",
|
||||
"properties": {
|
||||
"code": {
|
||||
@@ -3246,10 +3291,6 @@
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"isInternal": {
|
||||
"description": "If this is true, then checks are made only from the 'internal_checkers'. If it is false, then checks are made only from the 'selected_regions'. It is an error to provide 'selected_regions' when is_internal is true, or to provide 'internal_checkers' when is_internal is false.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"monitoredResource": {
|
||||
"$ref": "MonitoredResource",
|
||||
"description": "The monitored resource (https://cloud.google.com/monitoring/api/resources) associated with the configuration. The following monitored resource types are supported for uptime checks: uptime_url gce_instance gae_app aws_ec2_instance aws_elb_load_balancer"
|
||||
@@ -3259,7 +3300,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"period": {
|
||||
"description": "How often, in seconds, the uptime check is performed. Currently, the only supported values are 60s (1 minute), 300s (5 minutes), 600s (10 minutes), and 900s (15 minutes). Optional, defaults to 300s.",
|
||||
"description": "How often, in seconds, the uptime check is performed. Currently, the only supported values are 60s (1 minute), 300s (5 minutes), 600s (10 minutes), and 900s (15 minutes). Optional, defaults to 60s.",
|
||||
"format": "google-duration",
|
||||
"type": "string"
|
||||
},
|
||||
|
217
vendor/google.golang.org/api/monitoring/v3/monitoring-gen.go
generated
vendored
217
vendor/google.golang.org/api/monitoring/v3/monitoring-gen.go
generated
vendored
@@ -1,4 +1,4 @@
|
||||
// Copyright 2018 Google Inc. All rights reserved.
|
||||
// Copyright 2019 Google LLC.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
@@ -8,13 +8,39 @@
|
||||
//
|
||||
// This package is DEPRECATED. Use package cloud.google.com/go/monitoring/apiv3 instead.
|
||||
//
|
||||
// See https://cloud.google.com/monitoring/api/
|
||||
// For product documentation, see: https://cloud.google.com/monitoring/api/
|
||||
//
|
||||
// Creating a client
|
||||
//
|
||||
// Usage example:
|
||||
//
|
||||
// import "google.golang.org/api/monitoring/v3"
|
||||
// ...
|
||||
// monitoringService, err := monitoring.New(oauthHttpClient)
|
||||
// ctx := context.Background()
|
||||
// monitoringService, err := monitoring.NewService(ctx)
|
||||
//
|
||||
// In this example, Google Application Default Credentials are used for authentication.
|
||||
//
|
||||
// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
|
||||
//
|
||||
// Other authentication options
|
||||
//
|
||||
// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
|
||||
//
|
||||
// monitoringService, err := monitoring.NewService(ctx, option.WithScopes(monitoring.MonitoringWriteScope))
|
||||
//
|
||||
// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
|
||||
//
|
||||
// monitoringService, err := monitoring.NewService(ctx, option.WithAPIKey("AIza..."))
|
||||
//
|
||||
// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
|
||||
//
|
||||
// config := &oauth2.Config{...}
|
||||
// // ...
|
||||
// token, err := config.Exchange(ctx, ...)
|
||||
// monitoringService, err := monitoring.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
|
||||
//
|
||||
// See https://godoc.org/google.golang.org/api/option/ for details on options.
|
||||
package monitoring // import "google.golang.org/api/monitoring/v3"
|
||||
|
||||
import (
|
||||
@@ -31,6 +57,8 @@ import (
|
||||
|
||||
gensupport "google.golang.org/api/gensupport"
|
||||
googleapi "google.golang.org/api/googleapi"
|
||||
option "google.golang.org/api/option"
|
||||
htransport "google.golang.org/api/transport/http"
|
||||
)
|
||||
|
||||
// Always reference these packages, just in case the auto-generated code
|
||||
@@ -69,6 +97,35 @@ const (
|
||||
MonitoringWriteScope = "https://www.googleapis.com/auth/monitoring.write"
|
||||
)
|
||||
|
||||
// NewService creates a new Service.
|
||||
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
|
||||
scopesOption := option.WithScopes(
|
||||
"https://www.googleapis.com/auth/cloud-platform",
|
||||
"https://www.googleapis.com/auth/monitoring",
|
||||
"https://www.googleapis.com/auth/monitoring.read",
|
||||
"https://www.googleapis.com/auth/monitoring.write",
|
||||
)
|
||||
// NOTE: prepend, so we don't override user-specified scopes.
|
||||
opts = append([]option.ClientOption{scopesOption}, opts...)
|
||||
client, endpoint, err := htransport.NewClient(ctx, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
s, err := New(client)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if endpoint != "" {
|
||||
s.BasePath = endpoint
|
||||
}
|
||||
return s, nil
|
||||
}
|
||||
|
||||
// New creates a new Service. It uses the provided http.Client for requests.
|
||||
//
|
||||
// Deprecated: please use NewService instead.
|
||||
// To provide a custom HTTP client, use option.WithHTTPClient.
|
||||
// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
|
||||
func New(client *http.Client) (*Service, error) {
|
||||
if client == nil {
|
||||
return nil, errors.New("client is nil")
|
||||
@@ -1237,10 +1294,10 @@ type Empty struct {
|
||||
// origin, etc.
|
||||
type Exemplar struct {
|
||||
// Attachments: Contextual information about the example value. Examples
|
||||
// are:Trace ID:
|
||||
// type.googleapis.com/google.devtools.cloudtrace.v1.TraceLiteral
|
||||
// string: type.googleapis.com/google.protobuf.StringValueLabels dropped
|
||||
// during aggregation:
|
||||
// are:Trace:
|
||||
// type.googleapis.com/google.monitoring.v3.SpanContextLiteral string:
|
||||
// type.googleapis.com/google.protobuf.StringValueLabels dropped during
|
||||
// aggregation:
|
||||
// type.googleapis.com/google.monitoring.v3.DroppedLabelsThere may be
|
||||
// only a single attachment of any given message type in a single
|
||||
// exemplar, and this is enforced by the system.
|
||||
@@ -1651,7 +1708,8 @@ type HttpCheck struct {
|
||||
|
||||
// Path: The path to the page to run the check against. Will be combined
|
||||
// with the host (specified within the MonitoredResource) and port to
|
||||
// construct the full URL. Optional (defaults to "/").
|
||||
// construct the full URL. Optional (defaults to "/"). If the provided
|
||||
// path does not begin with "/", it will be prepended automatically.
|
||||
Path string `json:"path,omitempty"`
|
||||
|
||||
// Port: The port to the page to run the check against. Will be combined
|
||||
@@ -2368,6 +2426,39 @@ type MetricDescriptor struct {
|
||||
// failed.
|
||||
Labels []*LabelDescriptor `json:"labels,omitempty"`
|
||||
|
||||
// LaunchStage: Optional. The launch stage of the metric definition.
|
||||
//
|
||||
// Possible values:
|
||||
// "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value.
|
||||
// "EARLY_ACCESS" - Early Access features are limited to a closed
|
||||
// group of testers. To use these features, you must sign up in advance
|
||||
// and sign a Trusted Tester agreement (which includes confidentiality
|
||||
// provisions). These features may be unstable, changed in
|
||||
// backward-incompatible ways, and are not guaranteed to be released.
|
||||
// "ALPHA" - Alpha is a limited availability test for releases before
|
||||
// they are cleared for widespread use. By Alpha, all significant design
|
||||
// issues are resolved and we are in the process of verifying
|
||||
// functionality. Alpha customers need to apply for access, agree to
|
||||
// applicable terms, and have their projects whitelisted. Alpha releases
|
||||
// don’t have to be feature complete, no SLAs are provided, and there
|
||||
// are no technical support obligations, but they will be far enough
|
||||
// along that customers can actually use them in test environments or
|
||||
// for limited-use tests -- just like they would in normal production
|
||||
// cases.
|
||||
// "BETA" - Beta is the point at which we are ready to open a release
|
||||
// for any customer to use. There are no SLA or technical support
|
||||
// obligations in a Beta release. Products will be complete from a
|
||||
// feature perspective, but may have some open outstanding issues. Beta
|
||||
// releases are suitable for limited production use cases.
|
||||
// "GA" - GA features are open to all developers and are considered
|
||||
// stable and fully qualified for production use.
|
||||
// "DEPRECATED" - Deprecated features are scheduled to be shut down
|
||||
// and removed. For more information, see the “Deprecation Policy”
|
||||
// section of our Terms of Service (https://cloud.google.com/terms/) and
|
||||
// the Google Cloud Platform Subject to the Deprecation Policy
|
||||
// (https://cloud.google.com/terms/deprecation) documentation.
|
||||
LaunchStage string `json:"launchStage,omitempty"`
|
||||
|
||||
// Metadata: Optional. Metadata which can be used to guide usage of the
|
||||
// metric.
|
||||
Metadata *MetricDescriptorMetadata `json:"metadata,omitempty"`
|
||||
@@ -2506,7 +2597,8 @@ type MetricDescriptorMetadata struct {
|
||||
// available to be read, excluding data loss due to errors.
|
||||
IngestDelay string `json:"ingestDelay,omitempty"`
|
||||
|
||||
// LaunchStage: The launch stage of the metric definition.
|
||||
// LaunchStage: Deprecated. Please use the MetricDescriptor.launch_stage
|
||||
// instead. The launch stage of the metric definition.
|
||||
//
|
||||
// Possible values:
|
||||
// "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value.
|
||||
@@ -2753,7 +2845,7 @@ func (s *MonitoredResource) MarshalJSON() ([]byte, error) {
|
||||
// the labels "instance_id" and "zone" to identify particular VM
|
||||
// instances.Different APIs can support different monitored resource
|
||||
// types. APIs generally provide a list method that returns the
|
||||
// monitored resource descriptors used by the API.
|
||||
// monitored resource descriptors used by the API.Next ID: 10
|
||||
type MonitoredResourceDescriptor struct {
|
||||
// Description: Optional. A detailed description of the monitored
|
||||
// resource type that might be used in documentation.
|
||||
@@ -2771,6 +2863,40 @@ type MonitoredResourceDescriptor struct {
|
||||
// "zone".
|
||||
Labels []*LabelDescriptor `json:"labels,omitempty"`
|
||||
|
||||
// LaunchStage: Optional. The launch stage of the monitored resource
|
||||
// definition.
|
||||
//
|
||||
// Possible values:
|
||||
// "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value.
|
||||
// "EARLY_ACCESS" - Early Access features are limited to a closed
|
||||
// group of testers. To use these features, you must sign up in advance
|
||||
// and sign a Trusted Tester agreement (which includes confidentiality
|
||||
// provisions). These features may be unstable, changed in
|
||||
// backward-incompatible ways, and are not guaranteed to be released.
|
||||
// "ALPHA" - Alpha is a limited availability test for releases before
|
||||
// they are cleared for widespread use. By Alpha, all significant design
|
||||
// issues are resolved and we are in the process of verifying
|
||||
// functionality. Alpha customers need to apply for access, agree to
|
||||
// applicable terms, and have their projects whitelisted. Alpha releases
|
||||
// don’t have to be feature complete, no SLAs are provided, and there
|
||||
// are no technical support obligations, but they will be far enough
|
||||
// along that customers can actually use them in test environments or
|
||||
// for limited-use tests -- just like they would in normal production
|
||||
// cases.
|
||||
// "BETA" - Beta is the point at which we are ready to open a release
|
||||
// for any customer to use. There are no SLA or technical support
|
||||
// obligations in a Beta release. Products will be complete from a
|
||||
// feature perspective, but may have some open outstanding issues. Beta
|
||||
// releases are suitable for limited production use cases.
|
||||
// "GA" - GA features are open to all developers and are considered
|
||||
// stable and fully qualified for production use.
|
||||
// "DEPRECATED" - Deprecated features are scheduled to be shut down
|
||||
// and removed. For more information, see the “Deprecation Policy”
|
||||
// section of our Terms of Service (https://cloud.google.com/terms/) and
|
||||
// the Google Cloud Platform Subject to the Deprecation Policy
|
||||
// (https://cloud.google.com/terms/deprecation) documentation.
|
||||
LaunchStage string `json:"launchStage,omitempty"`
|
||||
|
||||
// Name: Optional. The resource name of the monitored resource
|
||||
// descriptor:
|
||||
// "projects/{project_id}/monitoredResourceDescriptors/{type}" where
|
||||
@@ -2897,7 +3023,7 @@ type NotificationChannel struct {
|
||||
// Description: An optional human-readable description of this
|
||||
// notification channel. This description may provide additional
|
||||
// details, beyond the display name, for the channel. This may not
|
||||
// exceeed 1024 Unicode characters.
|
||||
// exceed 1024 Unicode characters.
|
||||
Description string `json:"description,omitempty"`
|
||||
|
||||
// DisplayName: An optional human-readable name for this notification
|
||||
@@ -3313,43 +3439,11 @@ func (s *SpanContext) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// Status: The Status type defines a logical error model that is
|
||||
// suitable for different programming environments, including REST APIs
|
||||
// and RPC APIs. It is used by gRPC (https://github.com/grpc). The error
|
||||
// model is designed to be:
|
||||
// Simple to use and understand for most users
|
||||
// Flexible enough to meet unexpected needsOverviewThe Status message
|
||||
// contains three pieces of data: error code, error message, and error
|
||||
// details. The error code should be an enum value of google.rpc.Code,
|
||||
// but it may accept additional error codes if needed. The error message
|
||||
// should be a developer-facing English message that helps developers
|
||||
// understand and resolve the error. If a localized user-facing error
|
||||
// message is needed, put the localized message in the error details or
|
||||
// localize it in the client. The optional error details may contain
|
||||
// arbitrary information about the error. There is a predefined set of
|
||||
// error detail types in the package google.rpc that can be used for
|
||||
// common error conditions.Language mappingThe Status message is the
|
||||
// logical representation of the error model, but it is not necessarily
|
||||
// the actual wire format. When the Status message is exposed in
|
||||
// different client libraries and different wire protocols, it can be
|
||||
// mapped differently. For example, it will likely be mapped to some
|
||||
// exceptions in Java, but more likely mapped to some error codes in
|
||||
// C.Other usesThe error model and the Status message can be used in a
|
||||
// variety of environments, either with or without APIs, to provide a
|
||||
// consistent developer experience across different environments.Example
|
||||
// uses of this error model include:
|
||||
// Partial errors. If a service needs to return partial errors to the
|
||||
// client, it may embed the Status in the normal response to indicate
|
||||
// the partial errors.
|
||||
// Workflow errors. A typical workflow has multiple steps. Each step may
|
||||
// have a Status message for error reporting.
|
||||
// Batch operations. If a client uses batch request and batch response,
|
||||
// the Status message should be used directly inside batch response, one
|
||||
// for each error sub-response.
|
||||
// Asynchronous operations. If an API call embeds asynchronous operation
|
||||
// results in its response, the status of those operations should be
|
||||
// represented directly using the Status message.
|
||||
// Logging. If some API errors are stored in logs, the message Status
|
||||
// could be used directly after any stripping needed for
|
||||
// security/privacy reasons.
|
||||
// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each
|
||||
// Status message contains three pieces of data: error code, error
|
||||
// message, and error details.You can find out more about this error
|
||||
// model and how to work with it in the API Design Guide
|
||||
// (https://cloud.google.com/apis/design/errors).
|
||||
type Status struct {
|
||||
// Code: The status code, which should be an enum value of
|
||||
// google.rpc.Code.
|
||||
@@ -3728,13 +3822,6 @@ type UptimeCheckConfig struct {
|
||||
// owns this CheckConfig.
|
||||
InternalCheckers []*InternalChecker `json:"internalCheckers,omitempty"`
|
||||
|
||||
// IsInternal: If this is true, then checks are made only from the
|
||||
// 'internal_checkers'. If it is false, then checks are made only from
|
||||
// the 'selected_regions'. It is an error to provide 'selected_regions'
|
||||
// when is_internal is true, or to provide 'internal_checkers' when
|
||||
// is_internal is false.
|
||||
IsInternal bool `json:"isInternal,omitempty"`
|
||||
|
||||
// MonitoredResource: The monitored resource
|
||||
// (https://cloud.google.com/monitoring/api/resources) associated with
|
||||
// the configuration. The following monitored resource types are
|
||||
@@ -3752,7 +3839,7 @@ type UptimeCheckConfig struct {
|
||||
// Period: How often, in seconds, the uptime check is performed.
|
||||
// Currently, the only supported values are 60s (1 minute), 300s (5
|
||||
// minutes), 600s (10 minutes), and 900s (15 minutes). Optional,
|
||||
// defaults to 300s.
|
||||
// defaults to 60s.
|
||||
Period string `json:"period,omitempty"`
|
||||
|
||||
// ResourceGroup: The group resource associated with the configuration.
|
||||
@@ -5025,6 +5112,15 @@ func (r *ProjectsGroupsService) Delete(name string) *ProjectsGroupsDeleteCall {
|
||||
return c
|
||||
}
|
||||
|
||||
// Recursive sets the optional parameter "recursive": If this field is
|
||||
// true, then the request means to delete a group with all its
|
||||
// descendants. Otherwise, the request means to delete a group only when
|
||||
// it has no descendants. The default value is false.
|
||||
func (c *ProjectsGroupsDeleteCall) Recursive(recursive bool) *ProjectsGroupsDeleteCall {
|
||||
c.urlParams_.Set("recursive", fmt.Sprint(recursive))
|
||||
return c
|
||||
}
|
||||
|
||||
// Fields allows partial responses to be retrieved. See
|
||||
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
|
||||
// for more information.
|
||||
@@ -5124,6 +5220,11 @@ func (c *ProjectsGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, err
|
||||
// "pattern": "^projects/[^/]+/groups/[^/]+$",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// },
|
||||
// "recursive": {
|
||||
// "description": "If this field is true, then the request means to delete a group with all its descendants. Otherwise, the request means to delete a group only when it has no descendants. The default value is false.",
|
||||
// "location": "query",
|
||||
// "type": "boolean"
|
||||
// }
|
||||
// },
|
||||
// "path": "v3/{+name}",
|
||||
@@ -8774,7 +8875,7 @@ func (c *ProjectsTimeSeriesListCall) AggregationPerSeriesAligner(aggregationPerS
|
||||
// specify a single metric type, and can additionally specify metric
|
||||
// labels and other information. For example:
|
||||
// metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND
|
||||
// metric.label.instance_name = "my-instance-name"
|
||||
// metric.labels.instance_name = "my-instance-name"
|
||||
func (c *ProjectsTimeSeriesListCall) Filter(filter string) *ProjectsTimeSeriesListCall {
|
||||
c.urlParams_.Set("filter", filter)
|
||||
return c
|
||||
@@ -9001,7 +9102,7 @@ func (c *ProjectsTimeSeriesListCall) Do(opts ...googleapi.CallOption) (*ListTime
|
||||
// "type": "string"
|
||||
// },
|
||||
// "filter": {
|
||||
// "description": "A monitoring filter that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example:\nmetric.type = \"compute.googleapis.com/instance/cpu/usage_time\" AND\n metric.label.instance_name = \"my-instance-name\"\n",
|
||||
// "description": "A monitoring filter that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example:\nmetric.type = \"compute.googleapis.com/instance/cpu/usage_time\" AND\n metric.labels.instance_name = \"my-instance-name\"\n",
|
||||
// "location": "query",
|
||||
// "type": "string"
|
||||
// },
|
||||
|
33
vendor/google.golang.org/api/option/BUILD
generated
vendored
Normal file
33
vendor/google.golang.org/api/option/BUILD
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"credentials_go19.go",
|
||||
"credentials_notgo19.go",
|
||||
"option.go",
|
||||
],
|
||||
importmap = "k8s.io/kubernetes/vendor/google.golang.org/api/option",
|
||||
importpath = "google.golang.org/api/option",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//vendor/golang.org/x/oauth2:go_default_library",
|
||||
"//vendor/golang.org/x/oauth2/google:go_default_library",
|
||||
"//vendor/google.golang.org/api/internal:go_default_library",
|
||||
"//vendor/google.golang.org/grpc: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"],
|
||||
)
|
33
vendor/google.golang.org/api/option/credentials_go19.go
generated
vendored
Normal file
33
vendor/google.golang.org/api/option/credentials_go19.go
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
// Copyright 2018 Google LLC
|
||||
//
|
||||
// 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.
|
||||
|
||||
// +build go1.9
|
||||
|
||||
package option
|
||||
|
||||
import (
|
||||
"golang.org/x/oauth2/google"
|
||||
"google.golang.org/api/internal"
|
||||
)
|
||||
|
||||
type withCreds google.Credentials
|
||||
|
||||
func (w *withCreds) Apply(o *internal.DialSettings) {
|
||||
o.Credentials = (*google.Credentials)(w)
|
||||
}
|
||||
|
||||
// WithCredentials returns a ClientOption that authenticates API calls.
|
||||
func WithCredentials(creds *google.Credentials) ClientOption {
|
||||
return (*withCreds)(creds)
|
||||
}
|
32
vendor/google.golang.org/api/option/credentials_notgo19.go
generated
vendored
Normal file
32
vendor/google.golang.org/api/option/credentials_notgo19.go
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
// Copyright 2018 Google LLC
|
||||
//
|
||||
// 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.
|
||||
|
||||
// +build !go1.9
|
||||
|
||||
package option
|
||||
|
||||
import (
|
||||
"golang.org/x/oauth2/google"
|
||||
"google.golang.org/api/internal"
|
||||
)
|
||||
|
||||
type withCreds google.DefaultCredentials
|
||||
|
||||
func (w *withCreds) Apply(o *internal.DialSettings) {
|
||||
o.Credentials = (*google.DefaultCredentials)(w)
|
||||
}
|
||||
|
||||
func WithCredentials(creds *google.DefaultCredentials) ClientOption {
|
||||
return (*withCreds)(creds)
|
||||
}
|
235
vendor/google.golang.org/api/option/option.go
generated
vendored
Normal file
235
vendor/google.golang.org/api/option/option.go
generated
vendored
Normal file
@@ -0,0 +1,235 @@
|
||||
// Copyright 2017 Google LLC
|
||||
//
|
||||
// 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 option contains options for Google API clients.
|
||||
package option
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"golang.org/x/oauth2"
|
||||
"google.golang.org/api/internal"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
// A ClientOption is an option for a Google API client.
|
||||
type ClientOption interface {
|
||||
Apply(*internal.DialSettings)
|
||||
}
|
||||
|
||||
// WithTokenSource returns a ClientOption that specifies an OAuth2 token
|
||||
// source to be used as the basis for authentication.
|
||||
func WithTokenSource(s oauth2.TokenSource) ClientOption {
|
||||
return withTokenSource{s}
|
||||
}
|
||||
|
||||
type withTokenSource struct{ ts oauth2.TokenSource }
|
||||
|
||||
func (w withTokenSource) Apply(o *internal.DialSettings) {
|
||||
o.TokenSource = w.ts
|
||||
}
|
||||
|
||||
type withCredFile string
|
||||
|
||||
func (w withCredFile) Apply(o *internal.DialSettings) {
|
||||
o.CredentialsFile = string(w)
|
||||
}
|
||||
|
||||
// WithCredentialsFile returns a ClientOption that authenticates
|
||||
// API calls with the given service account or refresh token JSON
|
||||
// credentials file.
|
||||
func WithCredentialsFile(filename string) ClientOption {
|
||||
return withCredFile(filename)
|
||||
}
|
||||
|
||||
// WithServiceAccountFile returns a ClientOption that uses a Google service
|
||||
// account credentials file to authenticate.
|
||||
//
|
||||
// Deprecated: Use WithCredentialsFile instead.
|
||||
func WithServiceAccountFile(filename string) ClientOption {
|
||||
return WithCredentialsFile(filename)
|
||||
}
|
||||
|
||||
// WithCredentialsJSON returns a ClientOption that authenticates
|
||||
// API calls with the given service account or refresh token JSON
|
||||
// credentials.
|
||||
func WithCredentialsJSON(p []byte) ClientOption {
|
||||
return withCredentialsJSON(p)
|
||||
}
|
||||
|
||||
type withCredentialsJSON []byte
|
||||
|
||||
func (w withCredentialsJSON) Apply(o *internal.DialSettings) {
|
||||
o.CredentialsJSON = make([]byte, len(w))
|
||||
copy(o.CredentialsJSON, w)
|
||||
}
|
||||
|
||||
// WithEndpoint returns a ClientOption that overrides the default endpoint
|
||||
// to be used for a service.
|
||||
func WithEndpoint(url string) ClientOption {
|
||||
return withEndpoint(url)
|
||||
}
|
||||
|
||||
type withEndpoint string
|
||||
|
||||
func (w withEndpoint) Apply(o *internal.DialSettings) {
|
||||
o.Endpoint = string(w)
|
||||
}
|
||||
|
||||
// WithScopes returns a ClientOption that overrides the default OAuth2 scopes
|
||||
// to be used for a service.
|
||||
func WithScopes(scope ...string) ClientOption {
|
||||
return withScopes(scope)
|
||||
}
|
||||
|
||||
type withScopes []string
|
||||
|
||||
func (w withScopes) Apply(o *internal.DialSettings) {
|
||||
o.Scopes = make([]string, len(w))
|
||||
copy(o.Scopes, w)
|
||||
}
|
||||
|
||||
// WithUserAgent returns a ClientOption that sets the User-Agent.
|
||||
func WithUserAgent(ua string) ClientOption {
|
||||
return withUA(ua)
|
||||
}
|
||||
|
||||
type withUA string
|
||||
|
||||
func (w withUA) Apply(o *internal.DialSettings) { o.UserAgent = string(w) }
|
||||
|
||||
// WithHTTPClient returns a ClientOption that specifies the HTTP client to use
|
||||
// as the basis of communications. This option may only be used with services
|
||||
// that support HTTP as their communication transport. When used, the
|
||||
// WithHTTPClient option takes precedent over all other supplied options.
|
||||
func WithHTTPClient(client *http.Client) ClientOption {
|
||||
return withHTTPClient{client}
|
||||
}
|
||||
|
||||
type withHTTPClient struct{ client *http.Client }
|
||||
|
||||
func (w withHTTPClient) Apply(o *internal.DialSettings) {
|
||||
o.HTTPClient = w.client
|
||||
}
|
||||
|
||||
// WithGRPCConn returns a ClientOption that specifies the gRPC client
|
||||
// connection to use as the basis of communications. This option many only be
|
||||
// used with services that support gRPC as their communication transport. When
|
||||
// used, the WithGRPCConn option takes precedent over all other supplied
|
||||
// options.
|
||||
func WithGRPCConn(conn *grpc.ClientConn) ClientOption {
|
||||
return withGRPCConn{conn}
|
||||
}
|
||||
|
||||
type withGRPCConn struct{ conn *grpc.ClientConn }
|
||||
|
||||
func (w withGRPCConn) Apply(o *internal.DialSettings) {
|
||||
o.GRPCConn = w.conn
|
||||
}
|
||||
|
||||
// WithGRPCDialOption returns a ClientOption that appends a new grpc.DialOption
|
||||
// to an underlying gRPC dial. It does not work with WithGRPCConn.
|
||||
func WithGRPCDialOption(opt grpc.DialOption) ClientOption {
|
||||
return withGRPCDialOption{opt}
|
||||
}
|
||||
|
||||
type withGRPCDialOption struct{ opt grpc.DialOption }
|
||||
|
||||
func (w withGRPCDialOption) Apply(o *internal.DialSettings) {
|
||||
o.GRPCDialOpts = append(o.GRPCDialOpts, w.opt)
|
||||
}
|
||||
|
||||
// WithGRPCConnectionPool returns a ClientOption that creates a pool of gRPC
|
||||
// connections that requests will be balanced between.
|
||||
// This is an EXPERIMENTAL API and may be changed or removed in the future.
|
||||
func WithGRPCConnectionPool(size int) ClientOption {
|
||||
return withGRPCConnectionPool(size)
|
||||
}
|
||||
|
||||
type withGRPCConnectionPool int
|
||||
|
||||
func (w withGRPCConnectionPool) Apply(o *internal.DialSettings) {
|
||||
balancer := grpc.RoundRobin(internal.NewPoolResolver(int(w), o))
|
||||
o.GRPCDialOpts = append(o.GRPCDialOpts, grpc.WithBalancer(balancer))
|
||||
}
|
||||
|
||||
// WithAPIKey returns a ClientOption that specifies an API key to be used
|
||||
// as the basis for authentication.
|
||||
//
|
||||
// API Keys can only be used for JSON-over-HTTP APIs, including those under
|
||||
// the import path google.golang.org/api/....
|
||||
func WithAPIKey(apiKey string) ClientOption {
|
||||
return withAPIKey(apiKey)
|
||||
}
|
||||
|
||||
type withAPIKey string
|
||||
|
||||
func (w withAPIKey) Apply(o *internal.DialSettings) { o.APIKey = string(w) }
|
||||
|
||||
// WithAudiences returns a ClientOption that specifies an audience to be used
|
||||
// as the audience field ("aud") for the JWT token authentication.
|
||||
func WithAudiences(audience ...string) ClientOption {
|
||||
return withAudiences(audience)
|
||||
}
|
||||
|
||||
type withAudiences []string
|
||||
|
||||
func (w withAudiences) Apply(o *internal.DialSettings) {
|
||||
o.Audiences = make([]string, len(w))
|
||||
copy(o.Audiences, w)
|
||||
}
|
||||
|
||||
// WithoutAuthentication returns a ClientOption that specifies that no
|
||||
// authentication should be used. It is suitable only for testing and for
|
||||
// accessing public resources, like public Google Cloud Storage buckets.
|
||||
// It is an error to provide both WithoutAuthentication and any of WithAPIKey,
|
||||
// WithTokenSource, WithCredentialsFile or WithServiceAccountFile.
|
||||
func WithoutAuthentication() ClientOption {
|
||||
return withoutAuthentication{}
|
||||
}
|
||||
|
||||
type withoutAuthentication struct{}
|
||||
|
||||
func (w withoutAuthentication) Apply(o *internal.DialSettings) { o.NoAuth = true }
|
||||
|
||||
// WithQuotaProject returns a ClientOption that specifies the project used
|
||||
// for quota and billing purposes.
|
||||
//
|
||||
// For more information please read:
|
||||
// https://cloud.google.com/apis/docs/system-parameters
|
||||
func WithQuotaProject(quotaProject string) ClientOption {
|
||||
return withQuotaProject(quotaProject)
|
||||
}
|
||||
|
||||
type withQuotaProject string
|
||||
|
||||
func (w withQuotaProject) Apply(o *internal.DialSettings) {
|
||||
o.QuotaProject = string(w)
|
||||
}
|
||||
|
||||
// WithRequestReason returns a ClientOption that specifies a reason for
|
||||
// making the request, which is intended to be recorded in audit logging.
|
||||
// An example reason would be a support-case ticket number.
|
||||
//
|
||||
// For more information please read:
|
||||
// https://cloud.google.com/apis/docs/system-parameters
|
||||
func WithRequestReason(requestReason string) ClientOption {
|
||||
return withRequestReason(requestReason)
|
||||
}
|
||||
|
||||
type withRequestReason string
|
||||
|
||||
func (w withRequestReason) Apply(o *internal.DialSettings) {
|
||||
o.RequestReason = string(w)
|
||||
}
|
2
vendor/google.golang.org/api/pubsub/v1/BUILD
generated
vendored
2
vendor/google.golang.org/api/pubsub/v1/BUILD
generated
vendored
@@ -9,6 +9,8 @@ go_library(
|
||||
deps = [
|
||||
"//vendor/google.golang.org/api/gensupport:go_default_library",
|
||||
"//vendor/google.golang.org/api/googleapi:go_default_library",
|
||||
"//vendor/google.golang.org/api/option:go_default_library",
|
||||
"//vendor/google.golang.org/api/transport/http:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
59
vendor/google.golang.org/api/pubsub/v1/pubsub-api.json
generated
vendored
59
vendor/google.golang.org/api/pubsub/v1/pubsub-api.json
generated
vendored
@@ -111,7 +111,7 @@
|
||||
"snapshots": {
|
||||
"methods": {
|
||||
"create": {
|
||||
"description": "Creates a snapshot from the requested subscription. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\n\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.\u003cbr\u003e\u003cbr\u003e\nIf the snapshot already exists, returns `ALREADY_EXISTS`.\nIf the requested subscription doesn't exist, returns `NOT_FOUND`.\nIf the backlog in the subscription is too old -- and the resulting snapshot\nwould expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.\nSee also the `Snapshot.expire_time` field. If the name is not provided in\nthe request, the server will assign a random\nname for this snapshot on the same project as the subscription, conforming\nto the\n[resource name format](https://cloud.google.com/pubsub/docs/overview#names).\nThe generated name is populated in the returned Snapshot object. Note that\nfor REST API requests, you must specify a name in the request.",
|
||||
"description": "Creates a snapshot from the requested subscription. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\n\u003cbr\u003e\u003cbr\u003eIf the snapshot already exists, returns `ALREADY_EXISTS`.\nIf the requested subscription doesn't exist, returns `NOT_FOUND`.\nIf the backlog in the subscription is too old -- and the resulting snapshot\nwould expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.\nSee also the `Snapshot.expire_time` field. If the name is not provided in\nthe request, the server will assign a random\nname for this snapshot on the same project as the subscription, conforming\nto the\n[resource name\nformat](https://cloud.google.com/pubsub/docs/admin#resource_names). The\ngenerated name is populated in the returned Snapshot object. Note that for\nREST API requests, you must specify a name in the request.",
|
||||
"flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}",
|
||||
"httpMethod": "PUT",
|
||||
"id": "pubsub.projects.snapshots.create",
|
||||
@@ -140,7 +140,7 @@
|
||||
]
|
||||
},
|
||||
"delete": {
|
||||
"description": "Removes an existing snapshot. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.\nWhen the snapshot is deleted, all messages retained in the snapshot\nare immediately dropped. After a snapshot is deleted, a new one may be\ncreated with the same name, but the new one has no association with the old\nsnapshot or its subscription, unless the same subscription is specified.",
|
||||
"description": "Removes an existing snapshot. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\nWhen the snapshot is deleted, all messages retained in the snapshot\nare immediately dropped. After a snapshot is deleted, a new one may be\ncreated with the same name, but the new one has no association with the old\nsnapshot or its subscription, unless the same subscription is specified.",
|
||||
"flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}",
|
||||
"httpMethod": "DELETE",
|
||||
"id": "pubsub.projects.snapshots.delete",
|
||||
@@ -166,7 +166,7 @@
|
||||
]
|
||||
},
|
||||
"get": {
|
||||
"description": "Gets the configuration details of a snapshot. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow you to manage message acknowledgments in bulk. That\nis, you can set the acknowledgment state of messages in an existing\nsubscription to the state captured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.",
|
||||
"description": "Gets the configuration details of a snapshot. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow you to manage message acknowledgments in bulk. That\nis, you can set the acknowledgment state of messages in an existing\nsubscription to the state captured by a snapshot.",
|
||||
"flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}",
|
||||
"httpMethod": "GET",
|
||||
"id": "pubsub.projects.snapshots.get",
|
||||
@@ -218,7 +218,7 @@
|
||||
]
|
||||
},
|
||||
"list": {
|
||||
"description": "Lists the existing snapshots. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.",
|
||||
"description": "Lists the existing snapshots. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.",
|
||||
"flatPath": "v1/projects/{projectsId}/snapshots",
|
||||
"httpMethod": "GET",
|
||||
"id": "pubsub.projects.snapshots.list",
|
||||
@@ -255,7 +255,7 @@
|
||||
]
|
||||
},
|
||||
"patch": {
|
||||
"description": "Updates an existing snapshot. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.\nNote that certain properties of a snapshot are not modifiable.",
|
||||
"description": "Updates an existing snapshot. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.",
|
||||
"flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}",
|
||||
"httpMethod": "PATCH",
|
||||
"id": "pubsub.projects.snapshots.patch",
|
||||
@@ -375,7 +375,7 @@
|
||||
]
|
||||
},
|
||||
"create": {
|
||||
"description": "Creates a subscription to a given topic. See the\n\u003ca href=\"https://cloud.google.com/pubsub/docs/admin#resource_names\"\u003e\nresource name rules\u003c/a\u003e.\nIf the subscription already exists, returns `ALREADY_EXISTS`.\nIf the corresponding topic doesn't exist, returns `NOT_FOUND`.\n\nIf the name is not provided in the request, the server will assign a random\nname for this subscription on the same project as the topic, conforming\nto the\n[resource name format](https://cloud.google.com/pubsub/docs/overview#names).\nThe generated name is populated in the returned Subscription object.\nNote that for REST API requests, you must specify a name in the request.",
|
||||
"description": "Creates a subscription to a given topic. See the\n\u003ca href=\"https://cloud.google.com/pubsub/docs/admin#resource_names\"\u003e\nresource name rules\u003c/a\u003e.\nIf the subscription already exists, returns `ALREADY_EXISTS`.\nIf the corresponding topic doesn't exist, returns `NOT_FOUND`.\n\nIf the name is not provided in the request, the server will assign a random\nname for this subscription on the same project as the topic, conforming\nto the\n[resource name\nformat](https://cloud.google.com/pubsub/docs/admin#resource_names). The\ngenerated name is populated in the returned Subscription object. Note that\nfor REST API requests, you must specify a name in the request.",
|
||||
"flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}",
|
||||
"httpMethod": "PUT",
|
||||
"id": "pubsub.projects.subscriptions.create",
|
||||
@@ -635,7 +635,7 @@
|
||||
]
|
||||
},
|
||||
"seek": {
|
||||
"description": "Seeks an existing subscription to a point in time or to a given snapshot,\nwhichever is provided in the request. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot. Note that both the subscription and the snapshot\nmust be on the same topic.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.",
|
||||
"description": "Seeks an existing subscription to a point in time or to a given snapshot,\nwhichever is provided in the request. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot. Note that both the subscription and the snapshot\nmust be on the same topic.",
|
||||
"flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:seek",
|
||||
"httpMethod": "POST",
|
||||
"id": "pubsub.projects.subscriptions.seek",
|
||||
@@ -990,7 +990,7 @@
|
||||
"snapshots": {
|
||||
"methods": {
|
||||
"list": {
|
||||
"description": "Lists the names of the snapshots on this topic. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.",
|
||||
"description": "Lists the names of the snapshots on this topic. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.",
|
||||
"flatPath": "v1/projects/{projectsId}/topics/{topicsId}/snapshots",
|
||||
"httpMethod": "GET",
|
||||
"id": "pubsub.projects.topics.snapshots.list",
|
||||
@@ -1074,7 +1074,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"revision": "20181213",
|
||||
"revision": "20190429",
|
||||
"rootUrl": "https://pubsub.googleapis.com/",
|
||||
"schemas": {
|
||||
"AcknowledgeRequest": {
|
||||
@@ -1097,10 +1097,10 @@
|
||||
"properties": {
|
||||
"condition": {
|
||||
"$ref": "Expr",
|
||||
"description": "Unimplemented. The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently."
|
||||
"description": "The condition that is associated with this binding.\nNOTE: An unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently."
|
||||
},
|
||||
"members": {
|
||||
"description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n",
|
||||
"description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -1114,7 +1114,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"CreateSnapshotRequest": {
|
||||
"description": "Request for the `CreateSnapshot` method.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be changed in\nbackward-incompatible ways and is not recommended for production use.\nIt is not subject to any SLA or deprecation policy.",
|
||||
"description": "Request for the `CreateSnapshot` method.",
|
||||
"id": "CreateSnapshotRequest",
|
||||
"properties": {
|
||||
"labels": {
|
||||
@@ -1173,7 +1173,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"ListSnapshotsResponse": {
|
||||
"description": "Response for the `ListSnapshots` method.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.",
|
||||
"description": "Response for the `ListSnapshots` method.",
|
||||
"id": "ListSnapshotsResponse",
|
||||
"properties": {
|
||||
"nextPageToken": {
|
||||
@@ -1209,7 +1209,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"ListTopicSnapshotsResponse": {
|
||||
"description": "Response for the `ListTopicSnapshots` method.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.",
|
||||
"description": "Response for the `ListTopicSnapshots` method.",
|
||||
"id": "ListTopicSnapshotsResponse",
|
||||
"properties": {
|
||||
"nextPageToken": {
|
||||
@@ -1292,6 +1292,21 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"OidcToken": {
|
||||
"description": "Contains information needed for generating an\n[OpenID Connect\ntoken](https://developers.google.com/identity/protocols/OpenIDConnect).",
|
||||
"id": "OidcToken",
|
||||
"properties": {
|
||||
"audience": {
|
||||
"description": "Audience to be used when generating OIDC token. The audience claim\nidentifies the recipients that the JWT is intended for. The audience\nvalue is a single case-sensitive string. Having multiple values (array)\nfor the audience field is not supported. More info about the OIDC JWT\ntoken audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3\nNote: if not specified, the Push endpoint URL will be used.",
|
||||
"type": "string"
|
||||
},
|
||||
"serviceAccountEmail": {
|
||||
"description": "[Service account\nemail](https://cloud.google.com/iam/docs/service-accounts)\nto be used for generating the OIDC token. The caller (for\nCreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must\nhave the iam.serviceAccounts.actAs permission for the service account.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"Policy": {
|
||||
"description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**JSON Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\"\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\n**YAML Example**\n\n bindings:\n - members:\n - user:mike@example.com\n - group:admins@example.com\n - domain:google.com\n - serviceAccount:my-other-app@appspot.gserviceaccount.com\n role: roles/owner\n - members:\n - user:sean@example.com\n role: roles/viewer\n\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam/docs).",
|
||||
"id": "Policy",
|
||||
@@ -1413,6 +1428,10 @@
|
||||
"description": "Endpoint configuration attributes.\n\nEvery endpoint has a set of API supported attributes that can be used to\ncontrol different aspects of the message delivery.\n\nThe currently supported attribute is `x-goog-version`, which you can\nuse to change the format of the pushed message. This attribute\nindicates the version of the data expected by the endpoint. This\ncontrols the shape of the pushed message (i.e., its fields and metadata).\nThe endpoint version is based on the version of the Pub/Sub API.\n\nIf not present during the `CreateSubscription` call, it will default to\nthe version of the API used to make such call. If not present during a\n`ModifyPushConfig` call, its value will not be changed. `GetSubscription`\ncalls will always return a valid version, even if the subscription was\ncreated without this attribute.\n\nThe possible values for this attribute are:\n\n* `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.\n* `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.",
|
||||
"type": "object"
|
||||
},
|
||||
"oidcToken": {
|
||||
"$ref": "OidcToken",
|
||||
"description": "If specified, Pub/Sub will generate and attach an OIDC JWT token as an\n`Authorization` header in the HTTP request for every pushed message."
|
||||
},
|
||||
"pushEndpoint": {
|
||||
"description": "A URL locating the endpoint to which messages should be pushed.\nFor example, a Webhook endpoint might use \"https://example.com/push\".",
|
||||
"type": "string"
|
||||
@@ -1436,7 +1455,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"SeekRequest": {
|
||||
"description": "Request for the `Seek` method. \u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.",
|
||||
"description": "Request for the `Seek` method.",
|
||||
"id": "SeekRequest",
|
||||
"properties": {
|
||||
"snapshot": {
|
||||
@@ -1469,7 +1488,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"Snapshot": {
|
||||
"description": "A snapshot resource. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.",
|
||||
"description": "A snapshot resource. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.",
|
||||
"id": "Snapshot",
|
||||
"properties": {
|
||||
"expireTime": {
|
||||
@@ -1506,7 +1525,7 @@
|
||||
},
|
||||
"expirationPolicy": {
|
||||
"$ref": "ExpirationPolicy",
|
||||
"description": "A policy that specifies the conditions for this subscription's expiration.\nA subscription is considered active as long as any connected subscriber is\nsuccessfully consuming messages from the subscription or is issuing\noperations on the subscription. If `expiration_policy` is not set, a\n*default policy* with `ttl` of 31 days will be used. The minimum allowed\nvalue for `expiration_policy.ttl` is 1 day.\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy."
|
||||
"description": "A policy that specifies the conditions for this subscription's expiration.\nA subscription is considered active as long as any connected subscriber is\nsuccessfully consuming messages from the subscription or is issuing\noperations on the subscription. If `expiration_policy` is not set, a\n*default policy* with `ttl` of 31 days will be used. The minimum allowed\nvalue for `expiration_policy.ttl` is 1 day."
|
||||
},
|
||||
"labels": {
|
||||
"additionalProperties": {
|
||||
@@ -1516,7 +1535,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"messageRetentionDuration": {
|
||||
"description": "How long to retain unacknowledged messages in the subscription's backlog,\nfrom the moment a message is published.\nIf `retain_acked_messages` is true, then this also configures the retention\nof acknowledged messages, and thus configures how far back in time a `Seek`\ncan be done. Defaults to 7 days. Cannot be more than 7 days or less than 10\nminutes.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.",
|
||||
"description": "How long to retain unacknowledged messages in the subscription's backlog,\nfrom the moment a message is published.\nIf `retain_acked_messages` is true, then this also configures the retention\nof acknowledged messages, and thus configures how far back in time a `Seek`\ncan be done. Defaults to 7 days. Cannot be more than 7 days or less than 10\nminutes.",
|
||||
"format": "google-duration",
|
||||
"type": "string"
|
||||
},
|
||||
@@ -1529,7 +1548,7 @@
|
||||
"description": "If push delivery is used with this subscription, this field is\nused to configure it. An empty `pushConfig` signifies that the subscriber\nwill pull and ack messages using API methods."
|
||||
},
|
||||
"retainAckedMessages": {
|
||||
"description": "Indicates whether to retain acknowledged messages. If true, then\nmessages are not expunged from the subscription's backlog, even if they are\nacknowledged, until they fall out of the `message_retention_duration`\nwindow. This must be true if you would like to\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time\"\u003e\nSeek to a timestamp\u003c/a\u003e.\n\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.",
|
||||
"description": "Indicates whether to retain acknowledged messages. If true, then\nmessages are not expunged from the subscription's backlog, even if they are\nacknowledged, until they fall out of the `message_retention_duration`\nwindow. This must be true if you would like to\n\u003ca\nhref=\"https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time\"\u003e\nSeek to a timestamp\u003c/a\u003e.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"topic": {
|
||||
@@ -1586,7 +1605,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"UpdateSnapshotRequest": {
|
||||
"description": "Request for the UpdateSnapshot method.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.",
|
||||
"description": "Request for the UpdateSnapshot method.",
|
||||
"id": "UpdateSnapshotRequest",
|
||||
"properties": {
|
||||
"snapshot": {
|
||||
|
287
vendor/google.golang.org/api/pubsub/v1/pubsub-gen.go
generated
vendored
287
vendor/google.golang.org/api/pubsub/v1/pubsub-gen.go
generated
vendored
@@ -1,4 +1,4 @@
|
||||
// Copyright 2018 Google Inc. All rights reserved.
|
||||
// Copyright 2019 Google LLC.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
@@ -8,13 +8,39 @@
|
||||
//
|
||||
// This package is DEPRECATED. Use package cloud.google.com/go/pubsub instead.
|
||||
//
|
||||
// See https://cloud.google.com/pubsub/docs
|
||||
// For product documentation, see: https://cloud.google.com/pubsub/docs
|
||||
//
|
||||
// Creating a client
|
||||
//
|
||||
// Usage example:
|
||||
//
|
||||
// import "google.golang.org/api/pubsub/v1"
|
||||
// ...
|
||||
// pubsubService, err := pubsub.New(oauthHttpClient)
|
||||
// ctx := context.Background()
|
||||
// pubsubService, err := pubsub.NewService(ctx)
|
||||
//
|
||||
// In this example, Google Application Default Credentials are used for authentication.
|
||||
//
|
||||
// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
|
||||
//
|
||||
// Other authentication options
|
||||
//
|
||||
// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
|
||||
//
|
||||
// pubsubService, err := pubsub.NewService(ctx, option.WithScopes(pubsub.PubsubScope))
|
||||
//
|
||||
// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
|
||||
//
|
||||
// pubsubService, err := pubsub.NewService(ctx, option.WithAPIKey("AIza..."))
|
||||
//
|
||||
// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
|
||||
//
|
||||
// config := &oauth2.Config{...}
|
||||
// // ...
|
||||
// token, err := config.Exchange(ctx, ...)
|
||||
// pubsubService, err := pubsub.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
|
||||
//
|
||||
// See https://godoc.org/google.golang.org/api/option/ for details on options.
|
||||
package pubsub // import "google.golang.org/api/pubsub/v1"
|
||||
|
||||
import (
|
||||
@@ -31,6 +57,8 @@ import (
|
||||
|
||||
gensupport "google.golang.org/api/gensupport"
|
||||
googleapi "google.golang.org/api/googleapi"
|
||||
option "google.golang.org/api/option"
|
||||
htransport "google.golang.org/api/transport/http"
|
||||
)
|
||||
|
||||
// Always reference these packages, just in case the auto-generated code
|
||||
@@ -61,6 +89,33 @@ const (
|
||||
PubsubScope = "https://www.googleapis.com/auth/pubsub"
|
||||
)
|
||||
|
||||
// NewService creates a new Service.
|
||||
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
|
||||
scopesOption := option.WithScopes(
|
||||
"https://www.googleapis.com/auth/cloud-platform",
|
||||
"https://www.googleapis.com/auth/pubsub",
|
||||
)
|
||||
// NOTE: prepend, so we don't override user-specified scopes.
|
||||
opts = append([]option.ClientOption{scopesOption}, opts...)
|
||||
client, endpoint, err := htransport.NewClient(ctx, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
s, err := New(client)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if endpoint != "" {
|
||||
s.BasePath = endpoint
|
||||
}
|
||||
return s, nil
|
||||
}
|
||||
|
||||
// New creates a new Service. It uses the provided http.Client for requests.
|
||||
//
|
||||
// Deprecated: please use NewService instead.
|
||||
// To provide a custom HTTP client, use option.WithHTTPClient.
|
||||
// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
|
||||
func New(client *http.Client) (*Service, error) {
|
||||
if client == nil {
|
||||
return nil, errors.New("client is nil")
|
||||
@@ -186,9 +241,8 @@ func (s *AcknowledgeRequest) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// Binding: Associates `members` with a `role`.
|
||||
type Binding struct {
|
||||
// Condition: Unimplemented. The condition that is associated with this
|
||||
// binding.
|
||||
// NOTE: an unsatisfied condition will not allow user access via
|
||||
// Condition: The condition that is associated with this binding.
|
||||
// NOTE: An unsatisfied condition will not allow user access via
|
||||
// current
|
||||
// binding. Different bindings, including their conditions, are
|
||||
// examined
|
||||
@@ -222,7 +276,7 @@ type Binding struct {
|
||||
// For example, `admins@example.com`.
|
||||
//
|
||||
//
|
||||
// * `domain:{domain}`: A Google Apps domain name that represents all
|
||||
// * `domain:{domain}`: The G Suite domain (primary) that represents all
|
||||
// the
|
||||
// users of that domain. For example, `google.com` or
|
||||
// `example.com`.
|
||||
@@ -257,13 +311,7 @@ func (s *Binding) MarshalJSON() ([]byte, error) {
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// CreateSnapshotRequest: Request for the `CreateSnapshot`
|
||||
// method.<br><br>
|
||||
// <b>BETA:</b> This feature is part of a beta release. This API might
|
||||
// be changed in
|
||||
// backward-incompatible ways and is not recommended for production
|
||||
// use.
|
||||
// It is not subject to any SLA or deprecation policy.
|
||||
// CreateSnapshotRequest: Request for the `CreateSnapshot` method.
|
||||
type CreateSnapshotRequest struct {
|
||||
// Labels: See <a href="https://cloud.google.com/pubsub/docs/labels">
|
||||
// Creating and
|
||||
@@ -419,13 +467,7 @@ func (s *Expr) MarshalJSON() ([]byte, error) {
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// ListSnapshotsResponse: Response for the `ListSnapshots`
|
||||
// method.<br><br>
|
||||
// <b>BETA:</b> This feature is part of a beta release. This API might
|
||||
// be
|
||||
// changed in backward-incompatible ways and is not recommended for
|
||||
// production
|
||||
// use. It is not subject to any SLA or deprecation policy.
|
||||
// ListSnapshotsResponse: Response for the `ListSnapshots` method.
|
||||
type ListSnapshotsResponse struct {
|
||||
// NextPageToken: If not empty, indicates that there may be more
|
||||
// snapshot that match the
|
||||
@@ -503,12 +545,7 @@ func (s *ListSubscriptionsResponse) MarshalJSON() ([]byte, error) {
|
||||
}
|
||||
|
||||
// ListTopicSnapshotsResponse: Response for the `ListTopicSnapshots`
|
||||
// method.<br><br>
|
||||
// <b>BETA:</b> This feature is part of a beta release. This API might
|
||||
// be
|
||||
// changed in backward-incompatible ways and is not recommended for
|
||||
// production
|
||||
// use. It is not subject to any SLA or deprecation policy.
|
||||
// method.
|
||||
type ListTopicSnapshotsResponse struct {
|
||||
// NextPageToken: If not empty, indicates that there may be more
|
||||
// snapshots that match
|
||||
@@ -701,6 +738,59 @@ func (s *ModifyPushConfigRequest) MarshalJSON() ([]byte, error) {
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// OidcToken: Contains information needed for generating an
|
||||
// [OpenID
|
||||
// Connect
|
||||
// token](https://developers.google.com/identity/protocols/OpenID
|
||||
// Connect).
|
||||
type OidcToken struct {
|
||||
// Audience: Audience to be used when generating OIDC token. The
|
||||
// audience claim
|
||||
// identifies the recipients that the JWT is intended for. The
|
||||
// audience
|
||||
// value is a single case-sensitive string. Having multiple values
|
||||
// (array)
|
||||
// for the audience field is not supported. More info about the OIDC
|
||||
// JWT
|
||||
// token audience here:
|
||||
// https://tools.ietf.org/html/rfc7519#section-4.1.3
|
||||
// Note: if not specified, the Push endpoint URL will be used.
|
||||
Audience string `json:"audience,omitempty"`
|
||||
|
||||
// ServiceAccountEmail: [Service
|
||||
// account
|
||||
// email](https://cloud.google.com/iam/docs/service-accounts)
|
||||
// to be used for generating the OIDC token. The caller
|
||||
// (for
|
||||
// CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs)
|
||||
// must
|
||||
// have the iam.serviceAccounts.actAs permission for the service
|
||||
// account.
|
||||
ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "Audience") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty values are omitted from API requests. However, any non-pointer,
|
||||
// non-interface field appearing in ForceSendFields will be sent to the
|
||||
// server regardless of whether the field is empty or not. This may be
|
||||
// used to include empty fields in Patch requests.
|
||||
ForceSendFields []string `json:"-"`
|
||||
|
||||
// NullFields is a list of field names (e.g. "Audience") to include in
|
||||
// API requests with the JSON null value. By default, fields with empty
|
||||
// values are omitted from API requests. However, any field with an
|
||||
// empty value appearing in NullFields will be sent to the server as
|
||||
// null. It is an error if a field in this list has a non-empty value.
|
||||
// This may be used to include null fields in Patch requests.
|
||||
NullFields []string `json:"-"`
|
||||
}
|
||||
|
||||
func (s *OidcToken) MarshalJSON() ([]byte, error) {
|
||||
type NoMethod OidcToken
|
||||
raw := NoMethod(*s)
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// Policy: Defines an Identity and Access Management (IAM) policy. It is
|
||||
// used to
|
||||
// specify access control policies for Cloud Platform resources.
|
||||
@@ -1047,6 +1137,11 @@ type PushConfig struct {
|
||||
// API.
|
||||
Attributes map[string]string `json:"attributes,omitempty"`
|
||||
|
||||
// OidcToken: If specified, Pub/Sub will generate and attach an OIDC JWT
|
||||
// token as an
|
||||
// `Authorization` header in the HTTP request for every pushed message.
|
||||
OidcToken *OidcToken `json:"oidcToken,omitempty"`
|
||||
|
||||
// PushEndpoint: A URL locating the endpoint to which messages should be
|
||||
// pushed.
|
||||
// For example, a Webhook endpoint might use "https://example.com/push".
|
||||
@@ -1106,12 +1201,7 @@ func (s *ReceivedMessage) MarshalJSON() ([]byte, error) {
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// SeekRequest: Request for the `Seek` method. <br><br>
|
||||
// <b>BETA:</b> This feature is part of a beta release. This API might
|
||||
// be
|
||||
// changed in backward-incompatible ways and is not recommended for
|
||||
// production
|
||||
// use. It is not subject to any SLA or deprecation policy.
|
||||
// SeekRequest: Request for the `Seek` method.
|
||||
type SeekRequest struct {
|
||||
// Snapshot: The snapshot to seek to. The snapshot's topic must be the
|
||||
// same as that of
|
||||
@@ -1213,12 +1303,7 @@ func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
|
||||
// the
|
||||
// acknowledgment state of messages in an existing subscription to the
|
||||
// state
|
||||
// captured by a snapshot.<br><br>
|
||||
// <b>BETA:</b> This feature is part of a beta release. This API might
|
||||
// be
|
||||
// changed in backward-incompatible ways and is not recommended for
|
||||
// production
|
||||
// use. It is not subject to any SLA or deprecation policy.
|
||||
// captured by a snapshot.
|
||||
type Snapshot struct {
|
||||
// ExpireTime: The snapshot is guaranteed to exist up until this time.
|
||||
// A newly-created snapshot expires no later than 7 days from the time
|
||||
@@ -1324,11 +1409,6 @@ type Subscription struct {
|
||||
// *default policy* with `ttl` of 31 days will be used. The minimum
|
||||
// allowed
|
||||
// value for `expiration_policy.ttl` is 1 day.
|
||||
// <b>BETA:</b> This feature is part of a beta release. This API might
|
||||
// be
|
||||
// changed in backward-incompatible ways and is not recommended for
|
||||
// production
|
||||
// use. It is not subject to any SLA or deprecation policy.
|
||||
ExpirationPolicy *ExpirationPolicy `json:"expirationPolicy,omitempty"`
|
||||
|
||||
// Labels: See <a href="https://cloud.google.com/pubsub/docs/labels">
|
||||
@@ -1345,12 +1425,7 @@ type Subscription struct {
|
||||
// `Seek`
|
||||
// can be done. Defaults to 7 days. Cannot be more than 7 days or less
|
||||
// than 10
|
||||
// minutes.<br><br>
|
||||
// <b>BETA:</b> This feature is part of a beta release. This API might
|
||||
// be
|
||||
// changed in backward-incompatible ways and is not recommended for
|
||||
// production
|
||||
// use. It is not subject to any SLA or deprecation policy.
|
||||
// minutes.
|
||||
MessageRetentionDuration string `json:"messageRetentionDuration,omitempty"`
|
||||
|
||||
// Name: The name of the subscription. It must have the
|
||||
@@ -1379,17 +1454,12 @@ type Subscription struct {
|
||||
// they are
|
||||
// acknowledged, until they fall out of the
|
||||
// `message_retention_duration`
|
||||
// window. This must be true if you would like to
|
||||
// window. This must be true if you would like
|
||||
// to
|
||||
// <a
|
||||
// href="https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_t
|
||||
// ime">
|
||||
// href="https://cloud.google.com/pubsub/docs/replay-overview#seek_
|
||||
// to_a_time">
|
||||
// Seek to a timestamp</a>.
|
||||
// <br><br>
|
||||
// <b>BETA:</b> This feature is part of a beta release. This API might
|
||||
// be
|
||||
// changed in backward-incompatible ways and is not recommended for
|
||||
// production
|
||||
// use. It is not subject to any SLA or deprecation policy.
|
||||
RetainAckedMessages bool `json:"retainAckedMessages,omitempty"`
|
||||
|
||||
// Topic: The name of the topic from which this subscription is
|
||||
@@ -1545,13 +1615,7 @@ func (s *Topic) MarshalJSON() ([]byte, error) {
|
||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||
}
|
||||
|
||||
// UpdateSnapshotRequest: Request for the UpdateSnapshot
|
||||
// method.<br><br>
|
||||
// <b>BETA:</b> This feature is part of a beta release. This API might
|
||||
// be
|
||||
// changed in backward-incompatible ways and is not recommended for
|
||||
// production
|
||||
// use. It is not subject to any SLA or deprecation policy.
|
||||
// UpdateSnapshotRequest: Request for the UpdateSnapshot method.
|
||||
type UpdateSnapshotRequest struct {
|
||||
// Snapshot: The updated snapshot object.
|
||||
Snapshot *Snapshot `json:"snapshot,omitempty"`
|
||||
@@ -1679,13 +1743,7 @@ type ProjectsSnapshotsCreateCall struct {
|
||||
// acknowledgment state of messages in an existing subscription to the
|
||||
// state
|
||||
// captured by a snapshot.
|
||||
// <br><br>
|
||||
// <b>BETA:</b> This feature is part of a beta release. This API might
|
||||
// be
|
||||
// changed in backward-incompatible ways and is not recommended for
|
||||
// production
|
||||
// use. It is not subject to any SLA or deprecation policy.<br><br>
|
||||
// If the snapshot already exists, returns `ALREADY_EXISTS`.
|
||||
// <br><br>If the snapshot already exists, returns `ALREADY_EXISTS`.
|
||||
// If the requested subscription doesn't exist, returns `NOT_FOUND`.
|
||||
// If the backlog in the subscription is too old -- and the resulting
|
||||
// snapshot
|
||||
@@ -1697,11 +1755,13 @@ type ProjectsSnapshotsCreateCall struct {
|
||||
// name for this snapshot on the same project as the subscription,
|
||||
// conforming
|
||||
// to the
|
||||
// [resource name
|
||||
// format](https://cloud.google.com/pubsub/docs/overview#names).
|
||||
// The generated name is populated in the returned Snapshot object. Note
|
||||
// that
|
||||
// for REST API requests, you must specify a name in the request.
|
||||
// [resource
|
||||
// name
|
||||
// format](https://cloud.google.com/pubsub/docs/admin#resource_names
|
||||
// ). The
|
||||
// generated name is populated in the returned Snapshot object. Note
|
||||
// that for
|
||||
// REST API requests, you must specify a name in the request.
|
||||
func (r *ProjectsSnapshotsService) Create(name string, createsnapshotrequest *CreateSnapshotRequest) *ProjectsSnapshotsCreateCall {
|
||||
c := &ProjectsSnapshotsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
c.name = name
|
||||
@@ -1799,7 +1859,7 @@ func (c *ProjectsSnapshotsCreateCall) Do(opts ...googleapi.CallOption) (*Snapsho
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Creates a snapshot from the requested subscription. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\n\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.\u003cbr\u003e\u003cbr\u003e\nIf the snapshot already exists, returns `ALREADY_EXISTS`.\nIf the requested subscription doesn't exist, returns `NOT_FOUND`.\nIf the backlog in the subscription is too old -- and the resulting snapshot\nwould expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.\nSee also the `Snapshot.expire_time` field. If the name is not provided in\nthe request, the server will assign a random\nname for this snapshot on the same project as the subscription, conforming\nto the\n[resource name format](https://cloud.google.com/pubsub/docs/overview#names).\nThe generated name is populated in the returned Snapshot object. Note that\nfor REST API requests, you must specify a name in the request.",
|
||||
// "description": "Creates a snapshot from the requested subscription. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\n\u003cbr\u003e\u003cbr\u003eIf the snapshot already exists, returns `ALREADY_EXISTS`.\nIf the requested subscription doesn't exist, returns `NOT_FOUND`.\nIf the backlog in the subscription is too old -- and the resulting snapshot\nwould expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.\nSee also the `Snapshot.expire_time` field. If the name is not provided in\nthe request, the server will assign a random\nname for this snapshot on the same project as the subscription, conforming\nto the\n[resource name\nformat](https://cloud.google.com/pubsub/docs/admin#resource_names). The\ngenerated name is populated in the returned Snapshot object. Note that for\nREST API requests, you must specify a name in the request.",
|
||||
// "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}",
|
||||
// "httpMethod": "PUT",
|
||||
// "id": "pubsub.projects.snapshots.create",
|
||||
@@ -1850,11 +1910,6 @@ type ProjectsSnapshotsDeleteCall struct {
|
||||
// acknowledgment state of messages in an existing subscription to the
|
||||
// state
|
||||
// captured by a snapshot.<br><br>
|
||||
// <b>BETA:</b> This feature is part of a beta release. This API might
|
||||
// be
|
||||
// changed in backward-incompatible ways and is not recommended for
|
||||
// production
|
||||
// use. It is not subject to any SLA or deprecation policy.
|
||||
// When the snapshot is deleted, all messages retained in the
|
||||
// snapshot
|
||||
// are immediately dropped. After a snapshot is deleted, a new one may
|
||||
@@ -1954,7 +2009,7 @@ func (c *ProjectsSnapshotsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty,
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Removes an existing snapshot. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.\nWhen the snapshot is deleted, all messages retained in the snapshot\nare immediately dropped. After a snapshot is deleted, a new one may be\ncreated with the same name, but the new one has no association with the old\nsnapshot or its subscription, unless the same subscription is specified.",
|
||||
// "description": "Removes an existing snapshot. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\nWhen the snapshot is deleted, all messages retained in the snapshot\nare immediately dropped. After a snapshot is deleted, a new one may be\ncreated with the same name, but the new one has no association with the old\nsnapshot or its subscription, unless the same subscription is specified.",
|
||||
// "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}",
|
||||
// "httpMethod": "DELETE",
|
||||
// "id": "pubsub.projects.snapshots.delete",
|
||||
@@ -2002,13 +2057,7 @@ type ProjectsSnapshotsGetCall struct {
|
||||
// That
|
||||
// is, you can set the acknowledgment state of messages in an
|
||||
// existing
|
||||
// subscription to the state captured by a
|
||||
// snapshot.<br><br>
|
||||
// <b>BETA:</b> This feature is part of a beta release. This API might
|
||||
// be
|
||||
// changed in backward-incompatible ways and is not recommended for
|
||||
// production
|
||||
// use. It is not subject to any SLA or deprecation policy.
|
||||
// subscription to the state captured by a snapshot.
|
||||
func (r *ProjectsSnapshotsService) Get(snapshot string) *ProjectsSnapshotsGetCall {
|
||||
c := &ProjectsSnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
c.snapshot = snapshot
|
||||
@@ -2113,7 +2162,7 @@ func (c *ProjectsSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot,
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Gets the configuration details of a snapshot. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow you to manage message acknowledgments in bulk. That\nis, you can set the acknowledgment state of messages in an existing\nsubscription to the state captured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.",
|
||||
// "description": "Gets the configuration details of a snapshot. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow you to manage message acknowledgments in bulk. That\nis, you can set the acknowledgment state of messages in an existing\nsubscription to the state captured by a snapshot.",
|
||||
// "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}",
|
||||
// "httpMethod": "GET",
|
||||
// "id": "pubsub.projects.snapshots.get",
|
||||
@@ -2308,12 +2357,7 @@ type ProjectsSnapshotsListCall struct {
|
||||
// the
|
||||
// acknowledgment state of messages in an existing subscription to the
|
||||
// state
|
||||
// captured by a snapshot.<br><br>
|
||||
// <b>BETA:</b> This feature is part of a beta release. This API might
|
||||
// be
|
||||
// changed in backward-incompatible ways and is not recommended for
|
||||
// production
|
||||
// use. It is not subject to any SLA or deprecation policy.
|
||||
// captured by a snapshot.
|
||||
func (r *ProjectsSnapshotsService) List(project string) *ProjectsSnapshotsListCall {
|
||||
c := &ProjectsSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
c.project = project
|
||||
@@ -2435,7 +2479,7 @@ func (c *ProjectsSnapshotsListCall) Do(opts ...googleapi.CallOption) (*ListSnaps
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Lists the existing snapshots. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.",
|
||||
// "description": "Lists the existing snapshots. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.",
|
||||
// "flatPath": "v1/projects/{projectsId}/snapshots",
|
||||
// "httpMethod": "GET",
|
||||
// "id": "pubsub.projects.snapshots.list",
|
||||
@@ -2515,13 +2559,7 @@ type ProjectsSnapshotsPatchCall struct {
|
||||
// the
|
||||
// acknowledgment state of messages in an existing subscription to the
|
||||
// state
|
||||
// captured by a snapshot.<br><br>
|
||||
// <b>BETA:</b> This feature is part of a beta release. This API might
|
||||
// be
|
||||
// changed in backward-incompatible ways and is not recommended for
|
||||
// production
|
||||
// use. It is not subject to any SLA or deprecation policy.
|
||||
// Note that certain properties of a snapshot are not modifiable.
|
||||
// captured by a snapshot.
|
||||
func (r *ProjectsSnapshotsService) Patch(name string, updatesnapshotrequest *UpdateSnapshotRequest) *ProjectsSnapshotsPatchCall {
|
||||
c := &ProjectsSnapshotsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
c.name = name
|
||||
@@ -2619,7 +2657,7 @@ func (c *ProjectsSnapshotsPatchCall) Do(opts ...googleapi.CallOption) (*Snapshot
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Updates an existing snapshot. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.\nNote that certain properties of a snapshot are not modifiable.",
|
||||
// "description": "Updates an existing snapshot. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.",
|
||||
// "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}",
|
||||
// "httpMethod": "PATCH",
|
||||
// "id": "pubsub.projects.snapshots.patch",
|
||||
@@ -3116,12 +3154,13 @@ type ProjectsSubscriptionsCreateCall struct {
|
||||
// name for this subscription on the same project as the topic,
|
||||
// conforming
|
||||
// to the
|
||||
// [resource name
|
||||
// format](https://cloud.google.com/pubsub/docs/overview#names).
|
||||
// The generated name is populated in the returned Subscription
|
||||
// object.
|
||||
// Note that for REST API requests, you must specify a name in the
|
||||
// request.
|
||||
// [resource
|
||||
// name
|
||||
// format](https://cloud.google.com/pubsub/docs/admin#resource_names
|
||||
// ). The
|
||||
// generated name is populated in the returned Subscription object. Note
|
||||
// that
|
||||
// for REST API requests, you must specify a name in the request.
|
||||
func (r *ProjectsSubscriptionsService) Create(name string, subscription *Subscription) *ProjectsSubscriptionsCreateCall {
|
||||
c := &ProjectsSubscriptionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
c.name = name
|
||||
@@ -3219,7 +3258,7 @@ func (c *ProjectsSubscriptionsCreateCall) Do(opts ...googleapi.CallOption) (*Sub
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Creates a subscription to a given topic. See the\n\u003ca href=\"https://cloud.google.com/pubsub/docs/admin#resource_names\"\u003e\nresource name rules\u003c/a\u003e.\nIf the subscription already exists, returns `ALREADY_EXISTS`.\nIf the corresponding topic doesn't exist, returns `NOT_FOUND`.\n\nIf the name is not provided in the request, the server will assign a random\nname for this subscription on the same project as the topic, conforming\nto the\n[resource name format](https://cloud.google.com/pubsub/docs/overview#names).\nThe generated name is populated in the returned Subscription object.\nNote that for REST API requests, you must specify a name in the request.",
|
||||
// "description": "Creates a subscription to a given topic. See the\n\u003ca href=\"https://cloud.google.com/pubsub/docs/admin#resource_names\"\u003e\nresource name rules\u003c/a\u003e.\nIf the subscription already exists, returns `ALREADY_EXISTS`.\nIf the corresponding topic doesn't exist, returns `NOT_FOUND`.\n\nIf the name is not provided in the request, the server will assign a random\nname for this subscription on the same project as the topic, conforming\nto the\n[resource name\nformat](https://cloud.google.com/pubsub/docs/admin#resource_names). The\ngenerated name is populated in the returned Subscription object. Note that\nfor REST API requests, you must specify a name in the request.",
|
||||
// "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}",
|
||||
// "httpMethod": "PUT",
|
||||
// "id": "pubsub.projects.subscriptions.create",
|
||||
@@ -4480,12 +4519,7 @@ type ProjectsSubscriptionsSeekCall struct {
|
||||
// state
|
||||
// captured by a snapshot. Note that both the subscription and the
|
||||
// snapshot
|
||||
// must be on the same topic.<br><br>
|
||||
// <b>BETA:</b> This feature is part of a beta release. This API might
|
||||
// be
|
||||
// changed in backward-incompatible ways and is not recommended for
|
||||
// production
|
||||
// use. It is not subject to any SLA or deprecation policy.
|
||||
// must be on the same topic.
|
||||
func (r *ProjectsSubscriptionsService) Seek(subscription string, seekrequest *SeekRequest) *ProjectsSubscriptionsSeekCall {
|
||||
c := &ProjectsSubscriptionsSeekCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
c.subscription = subscription
|
||||
@@ -4583,7 +4617,7 @@ func (c *ProjectsSubscriptionsSeekCall) Do(opts ...googleapi.CallOption) (*SeekR
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Seeks an existing subscription to a point in time or to a given snapshot,\nwhichever is provided in the request. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot. Note that both the subscription and the snapshot\nmust be on the same topic.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.",
|
||||
// "description": "Seeks an existing subscription to a point in time or to a given snapshot,\nwhichever is provided in the request. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot. Note that both the subscription and the snapshot\nmust be on the same topic.",
|
||||
// "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:seek",
|
||||
// "httpMethod": "POST",
|
||||
// "id": "pubsub.projects.subscriptions.seek",
|
||||
@@ -6269,12 +6303,7 @@ type ProjectsTopicsSnapshotsListCall struct {
|
||||
// the
|
||||
// acknowledgment state of messages in an existing subscription to the
|
||||
// state
|
||||
// captured by a snapshot.<br><br>
|
||||
// <b>BETA:</b> This feature is part of a beta release. This API might
|
||||
// be
|
||||
// changed in backward-incompatible ways and is not recommended for
|
||||
// production
|
||||
// use. It is not subject to any SLA or deprecation policy.
|
||||
// captured by a snapshot.
|
||||
func (r *ProjectsTopicsSnapshotsService) List(topic string) *ProjectsTopicsSnapshotsListCall {
|
||||
c := &ProjectsTopicsSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
c.topic = topic
|
||||
@@ -6396,7 +6425,7 @@ func (c *ProjectsTopicsSnapshotsListCall) Do(opts ...googleapi.CallOption) (*Lis
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Lists the names of the snapshots on this topic. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.",
|
||||
// "description": "Lists the names of the snapshots on this topic. Snapshots are used in\n\u003ca href=\"https://cloud.google.com/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e\noperations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.",
|
||||
// "flatPath": "v1/projects/{projectsId}/topics/{topicsId}/snapshots",
|
||||
// "httpMethod": "GET",
|
||||
// "id": "pubsub.projects.topics.snapshots.list",
|
||||
|
2
vendor/google.golang.org/api/tpu/v1/BUILD
generated
vendored
2
vendor/google.golang.org/api/tpu/v1/BUILD
generated
vendored
@@ -9,6 +9,8 @@ go_library(
|
||||
deps = [
|
||||
"//vendor/google.golang.org/api/gensupport:go_default_library",
|
||||
"//vendor/google.golang.org/api/googleapi:go_default_library",
|
||||
"//vendor/google.golang.org/api/option:go_default_library",
|
||||
"//vendor/google.golang.org/api/transport/http:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
34
vendor/google.golang.org/api/tpu/v1/tpu-api.json
generated
vendored
34
vendor/google.golang.org/api/tpu/v1/tpu-api.json
generated
vendored
@@ -658,7 +658,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"revision": "20181010",
|
||||
"revision": "20190509",
|
||||
"rootUrl": "https://tpu.googleapis.com/",
|
||||
"schemas": {
|
||||
"AcceleratorType": {
|
||||
@@ -855,14 +855,18 @@
|
||||
"enum": [
|
||||
"HEALTH_UNSPECIFIED",
|
||||
"HEALTHY",
|
||||
"UNHEALTHY",
|
||||
"TIMEOUT"
|
||||
"DEPRECATED_UNHEALTHY",
|
||||
"TIMEOUT",
|
||||
"UNHEALTHY_TENSORFLOW",
|
||||
"UNHEALTHY_MAINTENANCE"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"Health status is unknown: not initialized or failed to retrieve.",
|
||||
"The resource is healthy.",
|
||||
"The resource is unhealthy.",
|
||||
"The resource is unresponsive."
|
||||
"The resource is unresponsive.",
|
||||
"The in-guest ML stack is unhealthy.",
|
||||
"The node is under maintenance/priority boost caused rescheduling and\nwill resume running once rescheduled."
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
@@ -890,7 +894,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"networkEndpoints": {
|
||||
"description": "Output only. The network endpoints where TPU workers can be accessed and sent work.\nIt is recommended that Tensorflow clients of the node reach out to the 0th\nentry in this map first.",
|
||||
"description": "Output only. The network endpoints where TPU workers can be accessed and\nsent work. It is recommended that Tensorflow clients of the node reach out\nto the 0th entry in this map first.",
|
||||
"items": {
|
||||
"$ref": "NetworkEndpoint"
|
||||
},
|
||||
@@ -921,7 +925,10 @@
|
||||
"STOPPING",
|
||||
"STARTING",
|
||||
"PREEMPTED",
|
||||
"TERMINATED"
|
||||
"TERMINATED",
|
||||
"HIDING",
|
||||
"HIDDEN",
|
||||
"UNHIDING"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"TPU node state is not known/set.",
|
||||
@@ -931,11 +938,14 @@
|
||||
"TPU node is undergoing reimaging.",
|
||||
"TPU node is being deleted.",
|
||||
"TPU node is being repaired and may be unusable. Details can be\nfound in the `help_description` field.",
|
||||
"7 - Reserved. Was SUSPENDED.\nTPU node is stopped.",
|
||||
"TPU node is stopped.",
|
||||
"TPU node is currently stopping.",
|
||||
"TPU node is currently starting.",
|
||||
"TPU node has been preempted. Only applies to Preemptible TPU Nodes.",
|
||||
"TPU node has been terminated due to maintenance or has reached the end of\nits life cycle (for preemptible nodes)."
|
||||
"TPU node has been terminated due to maintenance or has reached the end of\nits life cycle (for preemptible nodes).",
|
||||
"TPU node is currently hiding.",
|
||||
"TPU node has been hidden.",
|
||||
"TPU node is currently unhiding."
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
@@ -967,7 +977,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"name": {
|
||||
"description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.",
|
||||
"description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should be a resource name ending with `operations/{unique_id}`.",
|
||||
"type": "string"
|
||||
},
|
||||
"response": {
|
||||
@@ -1034,6 +1044,10 @@
|
||||
"properties": {
|
||||
"preemptible": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"reserved": {
|
||||
"description": "Whether the node is created under a reservation.",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
@@ -1045,7 +1059,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"Status": {
|
||||
"description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.",
|
||||
"description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error\nmessage, and error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.",
|
||||
"id": "Status",
|
||||
"properties": {
|
||||
"code": {
|
||||
|
98
vendor/google.golang.org/api/tpu/v1/tpu-gen.go
generated
vendored
98
vendor/google.golang.org/api/tpu/v1/tpu-gen.go
generated
vendored
@@ -1,4 +1,4 @@
|
||||
// Copyright 2018 Google Inc. All rights reserved.
|
||||
// Copyright 2019 Google LLC.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
@@ -6,13 +6,35 @@
|
||||
|
||||
// Package tpu provides access to the Cloud TPU API.
|
||||
//
|
||||
// See https://cloud.google.com/tpu/
|
||||
// For product documentation, see: https://cloud.google.com/tpu/
|
||||
//
|
||||
// Creating a client
|
||||
//
|
||||
// Usage example:
|
||||
//
|
||||
// import "google.golang.org/api/tpu/v1"
|
||||
// ...
|
||||
// tpuService, err := tpu.New(oauthHttpClient)
|
||||
// ctx := context.Background()
|
||||
// tpuService, err := tpu.NewService(ctx)
|
||||
//
|
||||
// In this example, Google Application Default Credentials are used for authentication.
|
||||
//
|
||||
// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
|
||||
//
|
||||
// Other authentication options
|
||||
//
|
||||
// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
|
||||
//
|
||||
// tpuService, err := tpu.NewService(ctx, option.WithAPIKey("AIza..."))
|
||||
//
|
||||
// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
|
||||
//
|
||||
// config := &oauth2.Config{...}
|
||||
// // ...
|
||||
// token, err := config.Exchange(ctx, ...)
|
||||
// tpuService, err := tpu.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
|
||||
//
|
||||
// See https://godoc.org/google.golang.org/api/option/ for details on options.
|
||||
package tpu // import "google.golang.org/api/tpu/v1"
|
||||
|
||||
import (
|
||||
@@ -29,6 +51,8 @@ import (
|
||||
|
||||
gensupport "google.golang.org/api/gensupport"
|
||||
googleapi "google.golang.org/api/googleapi"
|
||||
option "google.golang.org/api/option"
|
||||
htransport "google.golang.org/api/transport/http"
|
||||
)
|
||||
|
||||
// Always reference these packages, just in case the auto-generated code
|
||||
@@ -56,6 +80,32 @@ const (
|
||||
CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
|
||||
)
|
||||
|
||||
// NewService creates a new Service.
|
||||
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
|
||||
scopesOption := option.WithScopes(
|
||||
"https://www.googleapis.com/auth/cloud-platform",
|
||||
)
|
||||
// NOTE: prepend, so we don't override user-specified scopes.
|
||||
opts = append([]option.ClientOption{scopesOption}, opts...)
|
||||
client, endpoint, err := htransport.NewClient(ctx, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
s, err := New(client)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if endpoint != "" {
|
||||
s.BasePath = endpoint
|
||||
}
|
||||
return s, nil
|
||||
}
|
||||
|
||||
// New creates a new Service. It uses the provided http.Client for requests.
|
||||
//
|
||||
// Deprecated: please use NewService instead.
|
||||
// To provide a custom HTTP client, use option.WithHTTPClient.
|
||||
// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
|
||||
func New(client *http.Client) (*Service, error) {
|
||||
if client == nil {
|
||||
return nil, errors.New("client is nil")
|
||||
@@ -510,8 +560,12 @@ type Node struct {
|
||||
// "HEALTH_UNSPECIFIED" - Health status is unknown: not initialized or
|
||||
// failed to retrieve.
|
||||
// "HEALTHY" - The resource is healthy.
|
||||
// "UNHEALTHY" - The resource is unhealthy.
|
||||
// "DEPRECATED_UNHEALTHY" - The resource is unhealthy.
|
||||
// "TIMEOUT" - The resource is unresponsive.
|
||||
// "UNHEALTHY_TENSORFLOW" - The in-guest ML stack is unhealthy.
|
||||
// "UNHEALTHY_MAINTENANCE" - The node is under maintenance/priority
|
||||
// boost caused rescheduling and
|
||||
// will resume running once rescheduled.
|
||||
Health string `json:"health,omitempty"`
|
||||
|
||||
// HealthDescription: Output only.
|
||||
@@ -542,10 +596,10 @@ type Node struct {
|
||||
Network string `json:"network,omitempty"`
|
||||
|
||||
// NetworkEndpoints: Output only. The network endpoints where TPU
|
||||
// workers can be accessed and sent work.
|
||||
// It is recommended that Tensorflow clients of the node reach out to
|
||||
// the 0th
|
||||
// entry in this map first.
|
||||
// workers can be accessed and
|
||||
// sent work. It is recommended that Tensorflow clients of the node
|
||||
// reach out
|
||||
// to the 0th entry in this map first.
|
||||
NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"`
|
||||
|
||||
// Port: Output only.
|
||||
@@ -579,8 +633,7 @@ type Node struct {
|
||||
// "REPAIRING" - TPU node is being repaired and may be unusable.
|
||||
// Details can be
|
||||
// found in the `help_description` field.
|
||||
// "STOPPED" - 7 - Reserved. Was SUSPENDED.
|
||||
// TPU node is stopped.
|
||||
// "STOPPED" - TPU node is stopped.
|
||||
// "STOPPING" - TPU node is currently stopping.
|
||||
// "STARTING" - TPU node is currently starting.
|
||||
// "PREEMPTED" - TPU node has been preempted. Only applies to
|
||||
@@ -588,6 +641,9 @@ type Node struct {
|
||||
// "TERMINATED" - TPU node has been terminated due to maintenance or
|
||||
// has reached the end of
|
||||
// its life cycle (for preemptible nodes).
|
||||
// "HIDING" - TPU node is currently hiding.
|
||||
// "HIDDEN" - TPU node has been hidden.
|
||||
// "UNHIDING" - TPU node is currently unhiding.
|
||||
State string `json:"state,omitempty"`
|
||||
|
||||
// TensorflowVersion: The version of Tensorflow running in the
|
||||
@@ -651,7 +707,8 @@ type Operation struct {
|
||||
// service that
|
||||
// originally returns it. If you use the default HTTP mapping,
|
||||
// the
|
||||
// `name` should have the format of `operations/some/unique/name`.
|
||||
// `name` should be a resource name ending with
|
||||
// `operations/{unique_id}`.
|
||||
Name string `json:"name,omitempty"`
|
||||
|
||||
// Response: The normal response of the operation in case of success.
|
||||
@@ -785,6 +842,9 @@ func (s *ReimageNodeRequest) MarshalJSON() ([]byte, error) {
|
||||
type SchedulingConfig struct {
|
||||
Preemptible bool `json:"preemptible,omitempty"`
|
||||
|
||||
// Reserved: Whether the node is created under a reservation.
|
||||
Reserved bool `json:"reserved,omitempty"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "Preemptible") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty values are omitted from API requests. However, any non-pointer,
|
||||
@@ -813,20 +873,20 @@ type StartNodeRequest struct {
|
||||
}
|
||||
|
||||
// Status: The `Status` type defines a logical error model that is
|
||||
// suitable for different
|
||||
// programming environments, including REST APIs and RPC APIs. It is
|
||||
// used by
|
||||
// [gRPC](https://github.com/grpc). The error model is designed to
|
||||
// be:
|
||||
// suitable for
|
||||
// different programming environments, including REST APIs and RPC APIs.
|
||||
// It is
|
||||
// used by [gRPC](https://github.com/grpc). The error model is designed
|
||||
// to be:
|
||||
//
|
||||
// - Simple to use and understand for most users
|
||||
// - Flexible enough to meet unexpected needs
|
||||
//
|
||||
// # Overview
|
||||
//
|
||||
// The `Status` message contains three pieces of data: error code, error
|
||||
// message,
|
||||
// and error details. The error code should be an enum value
|
||||
// The `Status` message contains three pieces of data: error code,
|
||||
// error
|
||||
// message, and error details. The error code should be an enum value
|
||||
// of
|
||||
// google.rpc.Code, but it may accept additional error codes if needed.
|
||||
// The
|
||||
|
34
vendor/google.golang.org/api/transport/http/BUILD
generated
vendored
Normal file
34
vendor/google.golang.org/api/transport/http/BUILD
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["dial.go"],
|
||||
importmap = "k8s.io/kubernetes/vendor/google.golang.org/api/transport/http",
|
||||
importpath = "google.golang.org/api/transport/http",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//vendor/go.opencensus.io/plugin/ochttp:go_default_library",
|
||||
"//vendor/golang.org/x/oauth2:go_default_library",
|
||||
"//vendor/google.golang.org/api/googleapi/transport:go_default_library",
|
||||
"//vendor/google.golang.org/api/internal:go_default_library",
|
||||
"//vendor/google.golang.org/api/option:go_default_library",
|
||||
"//vendor/google.golang.org/api/transport/http/internal/propagation:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "package-srcs",
|
||||
srcs = glob(["**"]),
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "all-srcs",
|
||||
srcs = [
|
||||
":package-srcs",
|
||||
"//vendor/google.golang.org/api/transport/http/internal/propagation:all-srcs",
|
||||
],
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
161
vendor/google.golang.org/api/transport/http/dial.go
generated
vendored
Normal file
161
vendor/google.golang.org/api/transport/http/dial.go
generated
vendored
Normal file
@@ -0,0 +1,161 @@
|
||||
// Copyright 2015 Google LLC
|
||||
//
|
||||
// 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 http supports network connections to HTTP servers.
|
||||
// This package is not intended for use by end developers. Use the
|
||||
// google.golang.org/api/option package to configure API clients.
|
||||
package http
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"net/http"
|
||||
|
||||
"go.opencensus.io/plugin/ochttp"
|
||||
"golang.org/x/oauth2"
|
||||
"google.golang.org/api/googleapi/transport"
|
||||
"google.golang.org/api/internal"
|
||||
"google.golang.org/api/option"
|
||||
"google.golang.org/api/transport/http/internal/propagation"
|
||||
)
|
||||
|
||||
// NewClient returns an HTTP client for use communicating with a Google cloud
|
||||
// service, configured with the given ClientOptions. It also returns the endpoint
|
||||
// for the service as specified in the options.
|
||||
func NewClient(ctx context.Context, opts ...option.ClientOption) (*http.Client, string, error) {
|
||||
settings, err := newSettings(opts)
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
// TODO(cbro): consider injecting the User-Agent even if an explicit HTTP client is provided?
|
||||
if settings.HTTPClient != nil {
|
||||
return settings.HTTPClient, settings.Endpoint, nil
|
||||
}
|
||||
trans, err := newTransport(ctx, defaultBaseTransport(ctx), settings)
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
return &http.Client{Transport: trans}, settings.Endpoint, nil
|
||||
}
|
||||
|
||||
// NewTransport creates an http.RoundTripper for use communicating with a Google
|
||||
// cloud service, configured with the given ClientOptions. Its RoundTrip method delegates to base.
|
||||
func NewTransport(ctx context.Context, base http.RoundTripper, opts ...option.ClientOption) (http.RoundTripper, error) {
|
||||
settings, err := newSettings(opts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if settings.HTTPClient != nil {
|
||||
return nil, errors.New("transport/http: WithHTTPClient passed to NewTransport")
|
||||
}
|
||||
return newTransport(ctx, base, settings)
|
||||
}
|
||||
|
||||
func newTransport(ctx context.Context, base http.RoundTripper, settings *internal.DialSettings) (http.RoundTripper, error) {
|
||||
trans := base
|
||||
trans = parameterTransport{
|
||||
base: trans,
|
||||
userAgent: settings.UserAgent,
|
||||
quotaProject: settings.QuotaProject,
|
||||
requestReason: settings.RequestReason,
|
||||
}
|
||||
trans = addOCTransport(trans)
|
||||
switch {
|
||||
case settings.NoAuth:
|
||||
// Do nothing.
|
||||
case settings.APIKey != "":
|
||||
trans = &transport.APIKey{
|
||||
Transport: trans,
|
||||
Key: settings.APIKey,
|
||||
}
|
||||
default:
|
||||
creds, err := internal.Creds(ctx, settings)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
trans = &oauth2.Transport{
|
||||
Base: trans,
|
||||
Source: creds.TokenSource,
|
||||
}
|
||||
}
|
||||
return trans, nil
|
||||
}
|
||||
|
||||
func newSettings(opts []option.ClientOption) (*internal.DialSettings, error) {
|
||||
var o internal.DialSettings
|
||||
for _, opt := range opts {
|
||||
opt.Apply(&o)
|
||||
}
|
||||
if err := o.Validate(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if o.GRPCConn != nil {
|
||||
return nil, errors.New("unsupported gRPC connection specified")
|
||||
}
|
||||
return &o, nil
|
||||
}
|
||||
|
||||
type parameterTransport struct {
|
||||
userAgent string
|
||||
quotaProject string
|
||||
requestReason string
|
||||
|
||||
base http.RoundTripper
|
||||
}
|
||||
|
||||
func (t parameterTransport) RoundTrip(req *http.Request) (*http.Response, error) {
|
||||
rt := t.base
|
||||
if rt == nil {
|
||||
return nil, errors.New("transport: no Transport specified")
|
||||
}
|
||||
if t.userAgent == "" {
|
||||
return rt.RoundTrip(req)
|
||||
}
|
||||
newReq := *req
|
||||
newReq.Header = make(http.Header)
|
||||
for k, vv := range req.Header {
|
||||
newReq.Header[k] = vv
|
||||
}
|
||||
// TODO(cbro): append to existing User-Agent header?
|
||||
newReq.Header.Set("User-Agent", t.userAgent)
|
||||
|
||||
// Attach system parameters into the header
|
||||
if t.quotaProject != "" {
|
||||
newReq.Header.Set("X-Goog-User-Project", t.quotaProject)
|
||||
}
|
||||
if t.requestReason != "" {
|
||||
newReq.Header.Set("X-Goog-Request-Reason", t.requestReason)
|
||||
}
|
||||
|
||||
return rt.RoundTrip(&newReq)
|
||||
}
|
||||
|
||||
// Set at init time by dial_appengine.go. If nil, we're not on App Engine.
|
||||
var appengineUrlfetchHook func(context.Context) http.RoundTripper
|
||||
|
||||
// defaultBaseTransport returns the base HTTP transport.
|
||||
// On App Engine, this is urlfetch.Transport, otherwise it's http.DefaultTransport.
|
||||
func defaultBaseTransport(ctx context.Context) http.RoundTripper {
|
||||
if appengineUrlfetchHook != nil {
|
||||
return appengineUrlfetchHook(ctx)
|
||||
}
|
||||
return http.DefaultTransport
|
||||
}
|
||||
|
||||
func addOCTransport(trans http.RoundTripper) http.RoundTripper {
|
||||
return &ochttp.Transport{
|
||||
Base: trans,
|
||||
Propagation: &propagation.HTTPFormat{},
|
||||
}
|
||||
}
|
30
vendor/google.golang.org/api/transport/http/dial_appengine.go
generated
vendored
Normal file
30
vendor/google.golang.org/api/transport/http/dial_appengine.go
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
// Copyright 2016 Google LLC
|
||||
//
|
||||
// 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.
|
||||
|
||||
// +build appengine
|
||||
|
||||
package http
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"google.golang.org/appengine/urlfetch"
|
||||
)
|
||||
|
||||
func init() {
|
||||
appengineUrlfetchHook = func(ctx context.Context) http.RoundTripper {
|
||||
return &urlfetch.Transport{Context: ctx}
|
||||
}
|
||||
}
|
27
vendor/google.golang.org/api/transport/http/internal/propagation/BUILD
generated
vendored
Normal file
27
vendor/google.golang.org/api/transport/http/internal/propagation/BUILD
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["http.go"],
|
||||
importmap = "k8s.io/kubernetes/vendor/google.golang.org/api/transport/http/internal/propagation",
|
||||
importpath = "google.golang.org/api/transport/http/internal/propagation",
|
||||
visibility = ["//vendor/google.golang.org/api/transport/http:__subpackages__"],
|
||||
deps = [
|
||||
"//vendor/go.opencensus.io/trace:go_default_library",
|
||||
"//vendor/go.opencensus.io/trace/propagation: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"],
|
||||
)
|
96
vendor/google.golang.org/api/transport/http/internal/propagation/http.go
generated
vendored
Normal file
96
vendor/google.golang.org/api/transport/http/internal/propagation/http.go
generated
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
// Copyright 2018 Google LLC
|
||||
//
|
||||
// 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.
|
||||
|
||||
// +build go1.8
|
||||
|
||||
// Package propagation implements X-Cloud-Trace-Context header propagation used
|
||||
// by Google Cloud products.
|
||||
package propagation
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"go.opencensus.io/trace"
|
||||
"go.opencensus.io/trace/propagation"
|
||||
)
|
||||
|
||||
const (
|
||||
httpHeaderMaxSize = 200
|
||||
httpHeader = `X-Cloud-Trace-Context`
|
||||
)
|
||||
|
||||
var _ propagation.HTTPFormat = (*HTTPFormat)(nil)
|
||||
|
||||
// HTTPFormat implements propagation.HTTPFormat to propagate
|
||||
// traces in HTTP headers for Google Cloud Platform and Stackdriver Trace.
|
||||
type HTTPFormat struct{}
|
||||
|
||||
// SpanContextFromRequest extracts a Stackdriver Trace span context from incoming requests.
|
||||
func (f *HTTPFormat) SpanContextFromRequest(req *http.Request) (sc trace.SpanContext, ok bool) {
|
||||
h := req.Header.Get(httpHeader)
|
||||
// See https://cloud.google.com/trace/docs/faq for the header HTTPFormat.
|
||||
// Return if the header is empty or missing, or if the header is unreasonably
|
||||
// large, to avoid making unnecessary copies of a large string.
|
||||
if h == "" || len(h) > httpHeaderMaxSize {
|
||||
return trace.SpanContext{}, false
|
||||
}
|
||||
|
||||
// Parse the trace id field.
|
||||
slash := strings.Index(h, `/`)
|
||||
if slash == -1 {
|
||||
return trace.SpanContext{}, false
|
||||
}
|
||||
tid, h := h[:slash], h[slash+1:]
|
||||
|
||||
buf, err := hex.DecodeString(tid)
|
||||
if err != nil {
|
||||
return trace.SpanContext{}, false
|
||||
}
|
||||
copy(sc.TraceID[:], buf)
|
||||
|
||||
// Parse the span id field.
|
||||
spanstr := h
|
||||
semicolon := strings.Index(h, `;`)
|
||||
if semicolon != -1 {
|
||||
spanstr, h = h[:semicolon], h[semicolon+1:]
|
||||
}
|
||||
sid, err := strconv.ParseUint(spanstr, 10, 64)
|
||||
if err != nil {
|
||||
return trace.SpanContext{}, false
|
||||
}
|
||||
binary.BigEndian.PutUint64(sc.SpanID[:], sid)
|
||||
|
||||
// Parse the options field, options field is optional.
|
||||
if !strings.HasPrefix(h, "o=") {
|
||||
return sc, true
|
||||
}
|
||||
o, err := strconv.ParseUint(h[2:], 10, 64)
|
||||
if err != nil {
|
||||
return trace.SpanContext{}, false
|
||||
}
|
||||
sc.TraceOptions = trace.TraceOptions(o)
|
||||
return sc, true
|
||||
}
|
||||
|
||||
// SpanContextToRequest modifies the given request to include a Stackdriver Trace header.
|
||||
func (f *HTTPFormat) SpanContextToRequest(sc trace.SpanContext, req *http.Request) {
|
||||
sid := binary.BigEndian.Uint64(sc.SpanID[:])
|
||||
header := fmt.Sprintf("%s/%d;o=%d", hex.EncodeToString(sc.TraceID[:]), sid, int64(sc.TraceOptions))
|
||||
req.Header.Set(httpHeader, header)
|
||||
}
|
Reference in New Issue
Block a user