go.mod: remove replace and update github.com/gogo/googleapis v1.4.1

gogo/googleapis has a single dependency (github.com/gogo/protobuf), which is
currently the same version as we use, and we have a separate replace for that
dependency, so removing this override should not make a difference there.

gogo/googleapis v1.4.1 Includes updated protos with the gogo/protobuf fixes for
[CVE-2021-3121](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3121)

Change logs and diffs for each release:

- v1.3.3
  generate grpc service for google/longrunning/operations.proto
  full diff: https://github.com/gogo/googleapis/compare/v1.3.2...v1.3.3
- v1.4.0
  Add google geo type
  full diff: https://github.com/gogo/googleapis/compare/v1.3.3...v1.4.0
- v1.4.1
  This release contains sources generated with the version of gogo/protobuf
  containing a fix for the "skippy peanut butter" issue.
  full diff: https://github.com/gogo/googleapis/compare/v1.4.0...v1.4.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2021-04-19 13:40:48 +02:00
parent f8585d632a
commit 36612d692f
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
11 changed files with 780 additions and 260 deletions

3
go.mod
View File

@ -27,7 +27,7 @@ require (
github.com/docker/go-units v0.4.0 github.com/docker/go-units v0.4.0
github.com/emicklei/go-restful/v3 v3.7.3 github.com/emicklei/go-restful/v3 v3.7.3
github.com/fsnotify/fsnotify v1.5.1 github.com/fsnotify/fsnotify v1.5.1
github.com/gogo/googleapis v1.4.0 github.com/gogo/googleapis v1.4.1
github.com/gogo/protobuf v1.3.2 github.com/gogo/protobuf v1.3.2
github.com/google/go-cmp v0.5.6 github.com/google/go-cmp v0.5.6
github.com/google/uuid v1.2.0 github.com/google/uuid v1.2.0
@ -135,7 +135,6 @@ require (
// When updating replace rules, make sure to also update the rules in integration/client/go.mod and api/go.mod // When updating replace rules, make sure to also update the rules in integration/client/go.mod and api/go.mod
replace ( replace (
github.com/gogo/googleapis => github.com/gogo/googleapis v1.3.2
// urfave/cli must be <= v1.22.1 due to a regression: https://github.com/urfave/cli/issues/1092 // urfave/cli must be <= v1.22.1 due to a regression: https://github.com/urfave/cli/issues/1092
github.com/urfave/cli => github.com/urfave/cli v1.22.1 github.com/urfave/cli => github.com/urfave/cli v1.22.1
google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63 google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63

6
go.sum
View File

@ -411,8 +411,10 @@ github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/godbus/dbus/v5 v5.0.6 h1:mkgN1ofwASrYnJ5W6U/BxG15eXXXjirgZc7CLqkcaro= github.com/godbus/dbus/v5 v5.0.6 h1:mkgN1ofwASrYnJ5W6U/BxG15eXXXjirgZc7CLqkcaro=
github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/gogo/googleapis v1.3.2 h1:kX1es4djPJrsDhY7aZKJy7aZasdcB5oSOEphMjSB53c= github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU=
github.com/gogo/googleapis v1.3.2/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c=
github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0=
github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=

View File

@ -31,7 +31,6 @@ replace (
// Replace rules below must be kept in sync with the main go.mod file at the // Replace rules below must be kept in sync with the main go.mod file at the
// root, because that's the actual version expected by the "containerd/containerd" // root, because that's the actual version expected by the "containerd/containerd"
// dependency above. // dependency above.
github.com/gogo/googleapis => github.com/gogo/googleapis v1.3.2
// urfave/cli must be <= v1.22.1 due to a regression: https://github.com/urfave/cli/issues/1092 // urfave/cli must be <= v1.22.1 due to a regression: https://github.com/urfave/cli/issues/1092
github.com/urfave/cli => github.com/urfave/cli v1.22.1 github.com/urfave/cli => github.com/urfave/cli v1.22.1
google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63 google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63

View File

@ -261,8 +261,8 @@ github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/godbus/dbus/v5 v5.0.6 h1:mkgN1ofwASrYnJ5W6U/BxG15eXXXjirgZc7CLqkcaro= github.com/godbus/dbus/v5 v5.0.6 h1:mkgN1ofwASrYnJ5W6U/BxG15eXXXjirgZc7CLqkcaro=
github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/gogo/googleapis v1.3.2 h1:kX1es4djPJrsDhY7aZKJy7aZasdcB5oSOEphMjSB53c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0=
github.com/gogo/googleapis v1.3.2/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=

View File

@ -21,7 +21,7 @@ var _ = math.Inf
// proto package needs to be updated. // proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// The canonical error codes for Google APIs. // The canonical error codes for gRPC APIs.
// //
// //
// Sometimes multiple error codes may apply. Services should return // Sometimes multiple error codes may apply. Services should return
@ -156,7 +156,8 @@ const (
INTERNAL Code = 13 INTERNAL Code = 13
// The service is currently unavailable. This is most likely a // The service is currently unavailable. This is most likely a
// transient condition, which can be corrected by retrying with // transient condition, which can be corrected by retrying with
// a backoff. // a backoff. Note that it is not always safe to retry
// non-idempotent operations.
// //
// See the guidelines above for deciding between `FAILED_PRECONDITION`, // See the guidelines above for deciding between `FAILED_PRECONDITION`,
// `ABORTED`, and `UNAVAILABLE`. // `ABORTED`, and `UNAVAILABLE`.

View File

@ -1,4 +1,4 @@
// Copyright 2017 Google Inc. // Copyright 2020 Google LLC
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@ -22,7 +22,7 @@ option java_outer_classname = "CodeProto";
option java_package = "com.google.rpc"; option java_package = "com.google.rpc";
option objc_class_prefix = "RPC"; option objc_class_prefix = "RPC";
// The canonical error codes for Google APIs. // The canonical error codes for gRPC APIs.
// //
// //
// Sometimes multiple error codes may apply. Services should return // Sometimes multiple error codes may apply. Services should return
@ -170,7 +170,8 @@ enum Code {
// The service is currently unavailable. This is most likely a // The service is currently unavailable. This is most likely a
// transient condition, which can be corrected by retrying with // transient condition, which can be corrected by retrying with
// a backoff. // a backoff. Note that it is not always safe to retry
// non-idempotent operations.
// //
// See the guidelines above for deciding between `FAILED_PRECONDITION`, // See the guidelines above for deciding between `FAILED_PRECONDITION`,
// `ABORTED`, and `UNAVAILABLE`. // `ABORTED`, and `UNAVAILABLE`.

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
// Copyright 2017 Google Inc. // Copyright 2020 Google LLC
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@ -35,7 +35,7 @@ option objc_class_prefix = "RPC";
// receiving the error response before retrying. If retrying requests also // receiving the error response before retrying. If retrying requests also
// fail, clients should use an exponential backoff scheme to gradually increase // fail, clients should use an exponential backoff scheme to gradually increase
// the delay between retries based on `retry_delay`, until either a maximum // the delay between retries based on `retry_delay`, until either a maximum
// number of retires have been reached or a maximum retry delay cap has been // number of retries have been reached or a maximum retry delay cap has been
// reached. // reached.
message RetryInfo { message RetryInfo {
// Clients should wait at least this long between retrying the same request. // Clients should wait at least this long between retrying the same request.
@ -60,7 +60,7 @@ message DebugInfo {
// a service could respond with the project id and set `service_disabled` // a service could respond with the project id and set `service_disabled`
// to true. // to true.
// //
// Also see RetryDetail and Help types for other details about handling a // Also see RetryInfo and Help types for other details about handling a
// quota failure. // quota failure.
message QuotaFailure { message QuotaFailure {
// A message type used to describe a single quota violation. For example, a // A message type used to describe a single quota violation. For example, a
@ -85,6 +85,56 @@ message QuotaFailure {
repeated Violation violations = 1; repeated Violation violations = 1;
} }
// Describes the cause of the error with structured details.
//
// Example of an error when contacting the "pubsub.googleapis.com" API when it
// is not enabled:
//
// { "reason": "API_DISABLED"
// "domain": "googleapis.com"
// "metadata": {
// "resource": "projects/123",
// "service": "pubsub.googleapis.com"
// }
// }
//
// This response indicates that the pubsub.googleapis.com API is not enabled.
//
// Example of an error that is returned when attempting to create a Spanner
// instance in a region that is out of stock:
//
// { "reason": "STOCKOUT"
// "domain": "spanner.googleapis.com",
// "metadata": {
// "availableRegions": "us-central1,us-east2"
// }
// }
message ErrorInfo {
// The reason of the error. This is a constant value that identifies the
// proximate cause of the error. Error reasons are unique within a particular
// domain of errors. This should be at most 63 characters and match
// /[A-Z0-9_]+/.
string reason = 1;
// The logical grouping to which the "reason" belongs. The error domain
// is typically the registered service name of the tool or product that
// generates the error. Example: "pubsub.googleapis.com". If the error is
// generated by some common infrastructure, the error domain must be a
// globally unique value that identifies the infrastructure. For Google API
// infrastructure, the error domain is "googleapis.com".
string domain = 2;
// Additional structured details about this error.
//
// Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in
// length. When identifying the current value of an exceeded limit, the units
// should be contained in the key, not the value. For example, rather than
// {"instanceLimit": "100/request"}, should be returned as,
// {"instanceLimitPerRequest": "100"}, if the client exceeds the number of
// instances that can be created in a single (batch) request.
map<string, string> metadata = 3;
}
// Describes what preconditions have failed. // Describes what preconditions have failed.
// //
// For example, if an RPC failed because it required the Terms of Service to be // For example, if an RPC failed because it required the Terms of Service to be
@ -94,13 +144,13 @@ message PreconditionFailure {
// A message type used to describe a single precondition failure. // A message type used to describe a single precondition failure.
message Violation { message Violation {
// The type of PreconditionFailure. We recommend using a service-specific // The type of PreconditionFailure. We recommend using a service-specific
// enum type to define the supported precondition violation types. For // enum type to define the supported precondition violation subjects. For
// example, "TOS" for "Terms of Service violation". // example, "TOS" for "Terms of Service violation".
string type = 1; string type = 1;
// The subject, relative to the type, that failed. // The subject, relative to the type, that failed.
// For example, "google.com/cloud" relative to the "TOS" type would // For example, "google.com/cloud" relative to the "TOS" type would indicate
// indicate which terms of service is being referenced. // which terms of service is being referenced.
string subject = 2; string subject = 2;
// A description of how the precondition failed. Developers can use this // A description of how the precondition failed. Developers can use this
@ -153,8 +203,7 @@ message ResourceInfo {
// The name of the resource being accessed. For example, a shared calendar // The name of the resource being accessed. For example, a shared calendar
// name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current // name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
// error is // error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
// [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
string resource_name = 2; string resource_name = 2;
// The owner of the resource (optional). // The owner of the resource (optional).

View File

@ -28,65 +28,17 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// The `Status` type defines a logical error model that is suitable for // The `Status` type defines a logical error model that is suitable for
// different programming environments, including REST APIs and RPC APIs. It is // 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: // used by [gRPC](https://github.com/grpc). Each `Status` message contains
// three pieces of data: error code, error message, and error details.
// //
// - Simple to use and understand for most users // You can find out more about this error model and how to work with it in the
// - Flexible enough to meet unexpected needs // [API Design Guide](https://cloud.google.com/apis/design/errors).
//
// # Overview
//
// 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][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 mapping
//
// The `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 uses
//
// The 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.
type Status struct { type Status struct {
// The status code, which should be an enum value of // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
// [google.rpc.Code][google.rpc.Code].
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
// A developer-facing error message, which should be in English. Any // A developer-facing error message, which should be in English. Any
// user-facing error message should be localized and sent in the // user-facing error message should be localized and sent in the
// [google.rpc.Status.details][google.rpc.Status.details] field, or localized // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
// by the client.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
// A list of messages that carry the error details. There is a common set of // A list of messages that carry the error details. There is a common set of
// message types for APIs to use. // message types for APIs to use.
@ -159,7 +111,7 @@ func init() {
func init() { proto.RegisterFile("google/rpc/status.proto", fileDescriptor_24d244abaf643bfe) } func init() { proto.RegisterFile("google/rpc/status.proto", fileDescriptor_24d244abaf643bfe) }
var fileDescriptor_24d244abaf643bfe = []byte{ var fileDescriptor_24d244abaf643bfe = []byte{
// 235 bytes of a gzipped FileDescriptorProto // 238 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4f, 0xcf, 0xcf, 0x4f, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4f, 0xcf, 0xcf, 0x4f,
0xcf, 0x49, 0xd5, 0x2f, 0x2a, 0x48, 0xd6, 0x2f, 0x2e, 0x49, 0x2c, 0x29, 0x2d, 0xd6, 0x2b, 0x28, 0xcf, 0x49, 0xd5, 0x2f, 0x2a, 0x48, 0xd6, 0x2f, 0x2e, 0x49, 0x2c, 0x29, 0x2d, 0xd6, 0x2b, 0x28,
0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x82, 0x48, 0xe8, 0x15, 0x15, 0x24, 0x4b, 0x49, 0x42, 0x15, 0x81, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x82, 0x48, 0xe8, 0x15, 0x15, 0x24, 0x4b, 0x49, 0x42, 0x15, 0x81,
@ -168,13 +120,13 @@ var fileDescriptor_24d244abaf643bfe = []byte{
0xc0, 0x6c, 0x21, 0x09, 0x2e, 0xf6, 0xdc, 0xd4, 0xe2, 0xe2, 0xc4, 0xf4, 0x54, 0x09, 0x26, 0x05, 0xc0, 0x6c, 0x21, 0x09, 0x2e, 0xf6, 0xdc, 0xd4, 0xe2, 0xe2, 0xc4, 0xf4, 0x54, 0x09, 0x26, 0x05,
0x46, 0x0d, 0xce, 0x20, 0x18, 0x57, 0x48, 0x8f, 0x8b, 0x3d, 0x25, 0xb5, 0x24, 0x31, 0x33, 0xa7, 0x46, 0x0d, 0xce, 0x20, 0x18, 0x57, 0x48, 0x8f, 0x8b, 0x3d, 0x25, 0xb5, 0x24, 0x31, 0x33, 0xa7,
0x58, 0x82, 0x59, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x44, 0x0f, 0x6a, 0x21, 0xcc, 0x12, 0x3d, 0xc7, 0x58, 0x82, 0x59, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x44, 0x0f, 0x6a, 0x21, 0xcc, 0x12, 0x3d, 0xc7,
0xbc, 0xca, 0x20, 0x98, 0x22, 0xa7, 0xb8, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x3c, 0x94, 0x63, 0xf8, 0xbc, 0xca, 0x20, 0x98, 0x22, 0xa7, 0xc4, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x3c, 0x94, 0x63, 0xf8,
0xf0, 0x50, 0x8e, 0xf1, 0xc7, 0x43, 0x39, 0xc6, 0x86, 0x47, 0x72, 0x8c, 0x2b, 0x1e, 0xc9, 0x31, 0xf0, 0x50, 0x8e, 0xf1, 0xc7, 0x43, 0x39, 0xc6, 0x86, 0x47, 0x72, 0x8c, 0x2b, 0x1e, 0xc9, 0x31,
0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x2f, 0x1e, 0xc9, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x2f, 0x1e, 0xc9,
0x31, 0x7c, 0x00, 0x89, 0x3f, 0x96, 0x63, 0x3c, 0xf1, 0x58, 0x8e, 0x91, 0x8b, 0x2f, 0x39, 0x3f, 0x31, 0x7c, 0x00, 0x89, 0x3f, 0x96, 0x63, 0x3c, 0xf1, 0x58, 0x8e, 0x91, 0x8b, 0x2f, 0x39, 0x3f,
0x57, 0x0f, 0xe1, 0x11, 0x27, 0x6e, 0x88, 0x5b, 0x03, 0x40, 0x56, 0x04, 0x30, 0x46, 0x31, 0x17, 0x57, 0x0f, 0xe1, 0x11, 0x27, 0x6e, 0x88, 0x5b, 0x03, 0x40, 0x56, 0x04, 0x30, 0x46, 0x31, 0x17,
0x15, 0x24, 0x2f, 0x62, 0x62, 0x0e, 0x0a, 0x70, 0x4e, 0x62, 0x03, 0x5b, 0x6b, 0x0c, 0x08, 0x00, 0x15, 0x24, 0xff, 0x60, 0x64, 0x5c, 0xc4, 0xc4, 0x1c, 0x14, 0xe0, 0x9c, 0xc4, 0x06, 0xb6, 0xd9,
0x00, 0xff, 0xff, 0xaa, 0x06, 0xa1, 0xaa, 0x10, 0x01, 0x00, 0x00, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x16, 0xcd, 0x7b, 0x60, 0x13, 0x01, 0x00, 0x00,
} }
func (this *Status) Compare(that interface{}) int { func (this *Status) Compare(that interface{}) int {
@ -626,10 +578,7 @@ func (m *Status) Unmarshal(dAtA []byte) error {
if err != nil { if err != nil {
return err return err
} }
if skippy < 0 { if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthStatus
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthStatus return ErrInvalidLengthStatus
} }
if (iNdEx + skippy) > l { if (iNdEx + skippy) > l {

View File

@ -1,4 +1,4 @@
// Copyright 2017 Google Inc. // Copyright 2020 Google LLC
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@ -18,6 +18,7 @@ package google.rpc;
import "google/protobuf/any.proto"; import "google/protobuf/any.proto";
option cc_enable_arenas = true;
option go_package = "rpc"; option go_package = "rpc";
option java_multiple_files = true; option java_multiple_files = true;
option java_outer_classname = "StatusProto"; option java_outer_classname = "StatusProto";
@ -26,66 +27,18 @@ option objc_class_prefix = "RPC";
// The `Status` type defines a logical error model that is suitable for // The `Status` type defines a logical error model that is suitable for
// different programming environments, including REST APIs and RPC APIs. It is // 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: // used by [gRPC](https://github.com/grpc). Each `Status` message contains
// three pieces of data: error code, error message, and error details.
// //
// - Simple to use and understand for most users // You can find out more about this error model and how to work with it in the
// - Flexible enough to meet unexpected needs // [API Design Guide](https://cloud.google.com/apis/design/errors).
//
// # Overview
//
// 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][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 mapping
//
// The `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 uses
//
// The 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.
message Status { message Status {
// The status code, which should be an enum value of // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
// [google.rpc.Code][google.rpc.Code].
int32 code = 1; int32 code = 1;
// A developer-facing error message, which should be in English. Any // A developer-facing error message, which should be in English. Any
// user-facing error message should be localized and sent in the // user-facing error message should be localized and sent in the
// [google.rpc.Status.details][google.rpc.Status.details] field, or localized // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
// by the client.
string message = 2; string message = 2;
// A list of messages that carry the error details. There is a common set of // A list of messages that carry the error details. There is a common set of

3
vendor/modules.txt vendored
View File

@ -194,7 +194,7 @@ github.com/go-logr/stdr
# github.com/godbus/dbus/v5 v5.0.6 # github.com/godbus/dbus/v5 v5.0.6
## explicit; go 1.12 ## explicit; go 1.12
github.com/godbus/dbus/v5 github.com/godbus/dbus/v5
# github.com/gogo/googleapis v1.4.0 => github.com/gogo/googleapis v1.3.2 # github.com/gogo/googleapis v1.4.1
## explicit; go 1.12 ## explicit; go 1.12
github.com/gogo/googleapis/google/rpc github.com/gogo/googleapis/google/rpc
# github.com/gogo/protobuf v1.3.2 # github.com/gogo/protobuf v1.3.2
@ -754,6 +754,5 @@ sigs.k8s.io/structured-merge-diff/v4/value
# sigs.k8s.io/yaml v1.2.0 # sigs.k8s.io/yaml v1.2.0
## explicit; go 1.12 ## explicit; go 1.12
sigs.k8s.io/yaml sigs.k8s.io/yaml
# github.com/gogo/googleapis => github.com/gogo/googleapis v1.3.2
# github.com/urfave/cli => github.com/urfave/cli v1.22.1 # github.com/urfave/cli => github.com/urfave/cli v1.22.1
# google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63 # google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63