diff --git a/vendor.conf b/vendor.conf index f0d060ceaa..d6be6d3b38 100755 --- a/vendor.conf +++ b/vendor.conf @@ -23,7 +23,7 @@ github.com/docker/go-units 519db1ee28dcc9fd2474ae59fca2 github.com/docker/swarmkit 49e35619b18200845c9365c1e953440c28868002 github.com/evanphx/json-patch 72bf35d0ff611848c1dc9df0f976c81192392fa5 # v4.1.0 github.com/gofrs/flock 392e7fae8f1b0bdbd67dad7237d23f618feb6dbb # v0.7.1 -github.com/gogo/googleapis d31c731455cb061f42baff3bda55bad0118b126b # v1.2.0 +github.com/gogo/googleapis 01e0f9cca9b92166042241267ee2a5cdf5cff46c # v1.3.2 github.com/gogo/protobuf ba06b47c162d49f2af050fb4c75bcbc86a159d5c # v1.2.1 github.com/golang/glog 23def4e6c14b4da8ac2ed8007337bc5eb5007998 github.com/golang/protobuf aa810b61a9c79d51363740d207bb46cf8e620ed5 # v1.2.0 diff --git a/vendor/github.com/gogo/googleapis/go.mod b/vendor/github.com/gogo/googleapis/go.mod index 4cdef556e3..89be4cf878 100644 --- a/vendor/github.com/gogo/googleapis/go.mod +++ b/vendor/github.com/gogo/googleapis/go.mod @@ -2,4 +2,4 @@ module github.com/gogo/googleapis go 1.12 -require github.com/gogo/protobuf v1.2.1 +require github.com/gogo/protobuf v1.3.1 diff --git a/vendor/github.com/gogo/googleapis/google/rpc/code.pb.go b/vendor/github.com/gogo/googleapis/google/rpc/code.pb.go index e2c94aeceb..1f4d4d4322 100644 --- a/vendor/github.com/gogo/googleapis/google/rpc/code.pb.go +++ b/vendor/github.com/gogo/googleapis/google/rpc/code.pb.go @@ -19,7 +19,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // The canonical error codes for Google APIs. // diff --git a/vendor/github.com/gogo/googleapis/google/rpc/error_details.pb.go b/vendor/github.com/gogo/googleapis/google/rpc/error_details.pb.go index 657f1dac14..07d251d4b1 100644 --- a/vendor/github.com/gogo/googleapis/google/rpc/error_details.pb.go +++ b/vendor/github.com/gogo/googleapis/google/rpc/error_details.pb.go @@ -10,6 +10,7 @@ import ( types "github.com/gogo/protobuf/types" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" ) @@ -23,7 +24,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Describes when the clients can retry a failed request. Clients could ignore // the recommendation here or retry when this information is missing from error @@ -59,7 +60,7 @@ func (m *RetryInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_RetryInfo.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -113,7 +114,7 @@ func (m *DebugInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_DebugInfo.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -182,7 +183,7 @@ func (m *QuotaFailure) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_QuotaFailure.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -245,7 +246,7 @@ func (m *QuotaFailure_Violation) XXX_Marshal(b []byte, deterministic bool) ([]by return xxx_messageInfo_QuotaFailure_Violation.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -308,7 +309,7 @@ func (m *PreconditionFailure) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_PreconditionFailure.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -371,7 +372,7 @@ func (m *PreconditionFailure_Violation) XXX_Marshal(b []byte, deterministic bool return xxx_messageInfo_PreconditionFailure_Violation.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -438,7 +439,7 @@ func (m *BadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_BadRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -494,7 +495,7 @@ func (m *BadRequest_FieldViolation) XXX_Marshal(b []byte, deterministic bool) ([ return xxx_messageInfo_BadRequest_FieldViolation.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -558,7 +559,7 @@ func (m *RequestInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_RequestInfo.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -632,7 +633,7 @@ func (m *ResourceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_ResourceInfo.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -709,7 +710,7 @@ func (m *Help) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Help.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -763,7 +764,7 @@ func (m *Help_Link) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Help_Link.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -827,7 +828,7 @@ func (m *LocalizedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return xxx_messageInfo_LocalizedMessage.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -2093,7 +2094,7 @@ func valueToGoStringErrorDetails(v interface{}, typ string) string { func (m *RetryInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2101,30 +2102,38 @@ func (m *RetryInfo) Marshal() (dAtA []byte, err error) { } func (m *RetryInfo) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RetryInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.RetryDelay != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(m.RetryDelay.Size())) - n1, err := m.RetryDelay.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if m.RetryDelay != nil { + { + size, err := m.RetryDelay.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintErrorDetails(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *DebugInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2132,41 +2141,42 @@ func (m *DebugInfo) Marshal() (dAtA []byte, err error) { } func (m *DebugInfo) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DebugInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.StackEntries) > 0 { - for _, s := range m.StackEntries { - dAtA[i] = 0xa - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Detail) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Detail) + copy(dAtA[i:], m.Detail) i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Detail))) - i += copy(dAtA[i:], m.Detail) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.StackEntries) > 0 { + for iNdEx := len(m.StackEntries) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.StackEntries[iNdEx]) + copy(dAtA[i:], m.StackEntries[iNdEx]) + i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.StackEntries[iNdEx]))) + i-- + dAtA[i] = 0xa + } } - return i, nil + return len(dAtA) - i, nil } func (m *QuotaFailure) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2174,32 +2184,40 @@ func (m *QuotaFailure) Marshal() (dAtA []byte, err error) { } func (m *QuotaFailure) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuotaFailure) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Violations) > 0 { - for _, msg := range m.Violations { - dAtA[i] = 0xa - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Violations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Violations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintErrorDetails(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *QuotaFailure_Violation) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2207,32 +2225,40 @@ func (m *QuotaFailure_Violation) Marshal() (dAtA []byte, err error) { } func (m *QuotaFailure_Violation) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuotaFailure_Violation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Subject) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Subject))) - i += copy(dAtA[i:], m.Subject) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Description) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Description) + copy(dAtA[i:], m.Description) i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Description))) - i += copy(dAtA[i:], m.Description) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Subject) > 0 { + i -= len(m.Subject) + copy(dAtA[i:], m.Subject) + i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Subject))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *PreconditionFailure) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2240,32 +2266,40 @@ func (m *PreconditionFailure) Marshal() (dAtA []byte, err error) { } func (m *PreconditionFailure) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PreconditionFailure) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Violations) > 0 { - for _, msg := range m.Violations { - dAtA[i] = 0xa - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Violations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Violations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintErrorDetails(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *PreconditionFailure_Violation) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2273,38 +2307,47 @@ func (m *PreconditionFailure_Violation) Marshal() (dAtA []byte, err error) { } func (m *PreconditionFailure_Violation) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PreconditionFailure_Violation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Type) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Type))) - i += copy(dAtA[i:], m.Type) - } - if len(m.Subject) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Subject))) - i += copy(dAtA[i:], m.Subject) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Description) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.Description) + copy(dAtA[i:], m.Description) i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Description))) - i += copy(dAtA[i:], m.Description) + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Subject) > 0 { + i -= len(m.Subject) + copy(dAtA[i:], m.Subject) + i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Subject))) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *BadRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2312,32 +2355,40 @@ func (m *BadRequest) Marshal() (dAtA []byte, err error) { } func (m *BadRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BadRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.FieldViolations) > 0 { - for _, msg := range m.FieldViolations { - dAtA[i] = 0xa - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.FieldViolations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.FieldViolations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintErrorDetails(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *BadRequest_FieldViolation) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2345,32 +2396,40 @@ func (m *BadRequest_FieldViolation) Marshal() (dAtA []byte, err error) { } func (m *BadRequest_FieldViolation) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BadRequest_FieldViolation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Field) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Field))) - i += copy(dAtA[i:], m.Field) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Description) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Description) + copy(dAtA[i:], m.Description) i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Description))) - i += copy(dAtA[i:], m.Description) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Field) > 0 { + i -= len(m.Field) + copy(dAtA[i:], m.Field) + i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Field))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *RequestInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2378,32 +2437,40 @@ func (m *RequestInfo) Marshal() (dAtA []byte, err error) { } func (m *RequestInfo) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RequestInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.RequestId) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.RequestId))) - i += copy(dAtA[i:], m.RequestId) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.ServingData) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.ServingData) + copy(dAtA[i:], m.ServingData) i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.ServingData))) - i += copy(dAtA[i:], m.ServingData) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.RequestId) > 0 { + i -= len(m.RequestId) + copy(dAtA[i:], m.RequestId) + i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.RequestId))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *ResourceInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2411,44 +2478,54 @@ func (m *ResourceInfo) Marshal() (dAtA []byte, err error) { } func (m *ResourceInfo) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ResourceType) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.ResourceType))) - i += copy(dAtA[i:], m.ResourceType) - } - if len(m.ResourceName) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.ResourceName))) - i += copy(dAtA[i:], m.ResourceName) - } - if len(m.Owner) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Owner))) - i += copy(dAtA[i:], m.Owner) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Description) > 0 { - dAtA[i] = 0x22 - i++ + i -= len(m.Description) + copy(dAtA[i:], m.Description) i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Description))) - i += copy(dAtA[i:], m.Description) + i-- + dAtA[i] = 0x22 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x1a } - return i, nil + if len(m.ResourceName) > 0 { + i -= len(m.ResourceName) + copy(dAtA[i:], m.ResourceName) + i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.ResourceName))) + i-- + dAtA[i] = 0x12 + } + if len(m.ResourceType) > 0 { + i -= len(m.ResourceType) + copy(dAtA[i:], m.ResourceType) + i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.ResourceType))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *Help) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2456,32 +2533,40 @@ func (m *Help) Marshal() (dAtA []byte, err error) { } func (m *Help) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Help) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Links) > 0 { - for _, msg := range m.Links { - dAtA[i] = 0xa - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Links) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Links[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintErrorDetails(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *Help_Link) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2489,32 +2574,40 @@ func (m *Help_Link) Marshal() (dAtA []byte, err error) { } func (m *Help_Link) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Help_Link) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Description) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Description))) - i += copy(dAtA[i:], m.Description) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Url) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Url) + copy(dAtA[i:], m.Url) i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Url))) - i += copy(dAtA[i:], m.Url) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *LocalizedMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2522,40 +2615,50 @@ func (m *LocalizedMessage) Marshal() (dAtA []byte, err error) { } func (m *LocalizedMessage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LocalizedMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Locale) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Locale))) - i += copy(dAtA[i:], m.Locale) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Message) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Message) + copy(dAtA[i:], m.Message) i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Message))) - i += copy(dAtA[i:], m.Message) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Locale) > 0 { + i -= len(m.Locale) + copy(dAtA[i:], m.Locale) + i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Locale))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintErrorDetails(dAtA []byte, offset int, v uint64) int { + offset -= sovErrorDetails(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func NewPopulatedRetryInfo(r randyErrorDetails, easy bool) *RetryInfo { this := &RetryInfo{} - if r.Intn(10) != 0 { + if r.Intn(5) != 0 { this.RetryDelay = types.NewPopulatedDuration(r, easy) } if !easy && r.Intn(10) != 0 { @@ -2580,7 +2683,7 @@ func NewPopulatedDebugInfo(r randyErrorDetails, easy bool) *DebugInfo { func NewPopulatedQuotaFailure(r randyErrorDetails, easy bool) *QuotaFailure { this := &QuotaFailure{} - if r.Intn(10) != 0 { + if r.Intn(5) != 0 { v2 := r.Intn(5) this.Violations = make([]*QuotaFailure_Violation, v2) for i := 0; i < v2; i++ { @@ -2605,7 +2708,7 @@ func NewPopulatedQuotaFailure_Violation(r randyErrorDetails, easy bool) *QuotaFa func NewPopulatedPreconditionFailure(r randyErrorDetails, easy bool) *PreconditionFailure { this := &PreconditionFailure{} - if r.Intn(10) != 0 { + if r.Intn(5) != 0 { v3 := r.Intn(5) this.Violations = make([]*PreconditionFailure_Violation, v3) for i := 0; i < v3; i++ { @@ -2631,7 +2734,7 @@ func NewPopulatedPreconditionFailure_Violation(r randyErrorDetails, easy bool) * func NewPopulatedBadRequest(r randyErrorDetails, easy bool) *BadRequest { this := &BadRequest{} - if r.Intn(10) != 0 { + if r.Intn(5) != 0 { v4 := r.Intn(5) this.FieldViolations = make([]*BadRequest_FieldViolation, v4) for i := 0; i < v4; i++ { @@ -2678,7 +2781,7 @@ func NewPopulatedResourceInfo(r randyErrorDetails, easy bool) *ResourceInfo { func NewPopulatedHelp(r randyErrorDetails, easy bool) *Help { this := &Help{} - if r.Intn(10) != 0 { + if r.Intn(5) != 0 { v5 := r.Intn(5) this.Links = make([]*Help_Link, v5) for i := 0; i < v5; i++ { @@ -3046,14 +3149,7 @@ func (m *LocalizedMessage) Size() (n int) { } func sovErrorDetails(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozErrorDetails(x uint64) (n int) { return sovErrorDetails(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -3085,8 +3181,13 @@ func (this *QuotaFailure) String() string { if this == nil { return "nil" } + repeatedStringForViolations := "[]*QuotaFailure_Violation{" + for _, f := range this.Violations { + repeatedStringForViolations += strings.Replace(fmt.Sprintf("%v", f), "QuotaFailure_Violation", "QuotaFailure_Violation", 1) + "," + } + repeatedStringForViolations += "}" s := strings.Join([]string{`&QuotaFailure{`, - `Violations:` + strings.Replace(fmt.Sprintf("%v", this.Violations), "QuotaFailure_Violation", "QuotaFailure_Violation", 1) + `,`, + `Violations:` + repeatedStringForViolations + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -3108,8 +3209,13 @@ func (this *PreconditionFailure) String() string { if this == nil { return "nil" } + repeatedStringForViolations := "[]*PreconditionFailure_Violation{" + for _, f := range this.Violations { + repeatedStringForViolations += strings.Replace(fmt.Sprintf("%v", f), "PreconditionFailure_Violation", "PreconditionFailure_Violation", 1) + "," + } + repeatedStringForViolations += "}" s := strings.Join([]string{`&PreconditionFailure{`, - `Violations:` + strings.Replace(fmt.Sprintf("%v", this.Violations), "PreconditionFailure_Violation", "PreconditionFailure_Violation", 1) + `,`, + `Violations:` + repeatedStringForViolations + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -3132,8 +3238,13 @@ func (this *BadRequest) String() string { if this == nil { return "nil" } + repeatedStringForFieldViolations := "[]*BadRequest_FieldViolation{" + for _, f := range this.FieldViolations { + repeatedStringForFieldViolations += strings.Replace(fmt.Sprintf("%v", f), "BadRequest_FieldViolation", "BadRequest_FieldViolation", 1) + "," + } + repeatedStringForFieldViolations += "}" s := strings.Join([]string{`&BadRequest{`, - `FieldViolations:` + strings.Replace(fmt.Sprintf("%v", this.FieldViolations), "BadRequest_FieldViolation", "BadRequest_FieldViolation", 1) + `,`, + `FieldViolations:` + repeatedStringForFieldViolations + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -3181,8 +3292,13 @@ func (this *Help) String() string { if this == nil { return "nil" } + repeatedStringForLinks := "[]*Help_Link{" + for _, f := range this.Links { + repeatedStringForLinks += strings.Replace(fmt.Sprintf("%v", f), "Help_Link", "Help_Link", 1) + "," + } + repeatedStringForLinks += "}" s := strings.Join([]string{`&Help{`, - `Links:` + strings.Replace(fmt.Sprintf("%v", this.Links), "Help_Link", "Help_Link", 1) + `,`, + `Links:` + repeatedStringForLinks + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -4705,6 +4821,7 @@ func (m *LocalizedMessage) Unmarshal(dAtA []byte) error { func skipErrorDetails(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -4736,10 +4853,8 @@ func skipErrorDetails(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -4760,55 +4875,30 @@ func skipErrorDetails(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthErrorDetails } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthErrorDetails - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipErrorDetails(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthErrorDetails - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupErrorDetails + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthErrorDetails + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthErrorDetails = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowErrorDetails = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthErrorDetails = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowErrorDetails = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupErrorDetails = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/gogo/googleapis/google/rpc/status.pb.go b/vendor/github.com/gogo/googleapis/google/rpc/status.pb.go index 65fc30f4a2..59793ba380 100644 --- a/vendor/github.com/gogo/googleapis/google/rpc/status.pb.go +++ b/vendor/github.com/gogo/googleapis/google/rpc/status.pb.go @@ -10,6 +10,7 @@ import ( types "github.com/gogo/protobuf/types" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" ) @@ -23,7 +24,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // The `Status` type defines a logical error model that is suitable for // different programming environments, including REST APIs and RPC APIs. It is @@ -108,7 +109,7 @@ func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Status.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -295,7 +296,7 @@ func valueToGoStringStatus(v interface{}, typ string) string { func (m *Status) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -303,47 +304,58 @@ func (m *Status) Marshal() (dAtA []byte, err error) { } func (m *Status) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Status) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Code != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintStatus(dAtA, i, uint64(m.Code)) - } - if len(m.Message) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintStatus(dAtA, i, uint64(len(m.Message))) - i += copy(dAtA[i:], m.Message) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Details) > 0 { - for _, msg := range m.Details { - dAtA[i] = 0x1a - i++ - i = encodeVarintStatus(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Details) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Details[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStatus(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0x1a } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintStatus(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x12 } - return i, nil + if m.Code != 0 { + i = encodeVarintStatus(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func encodeVarintStatus(dAtA []byte, offset int, v uint64) int { + offset -= sovStatus(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func NewPopulatedStatus(r randyStatus, easy bool) *Status { this := &Status{} @@ -352,7 +364,7 @@ func NewPopulatedStatus(r randyStatus, easy bool) *Status { this.Code *= -1 } this.Message = string(randStringStatus(r)) - if r.Intn(10) != 0 { + if r.Intn(5) != 0 { v1 := r.Intn(5) this.Details = make([]*types.Any, v1) for i := 0; i < v1; i++ { @@ -463,14 +475,7 @@ func (m *Status) Size() (n int) { } func sovStatus(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozStatus(x uint64) (n int) { return sovStatus(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -479,10 +484,15 @@ func (this *Status) String() string { if this == nil { return "nil" } + repeatedStringForDetails := "[]*Any{" + for _, f := range this.Details { + repeatedStringForDetails += strings.Replace(fmt.Sprintf("%v", f), "Any", "types.Any", 1) + "," + } + repeatedStringForDetails += "}" s := strings.Join([]string{`&Status{`, `Code:` + fmt.Sprintf("%v", this.Code) + `,`, `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `Details:` + strings.Replace(fmt.Sprintf("%v", this.Details), "Any", "types.Any", 1) + `,`, + `Details:` + repeatedStringForDetails + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -638,6 +648,7 @@ func (m *Status) Unmarshal(dAtA []byte) error { func skipStatus(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -669,10 +680,8 @@ func skipStatus(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -693,55 +702,30 @@ func skipStatus(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthStatus } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthStatus - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStatus - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipStatus(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthStatus - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupStatus + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthStatus + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthStatus = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowStatus = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthStatus = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowStatus = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupStatus = fmt.Errorf("proto: unexpected end of group") )