Update vendored packages for changes
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
		
							
								
								
									
										101
									
								
								vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										101
									
								
								vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,101 @@ | ||||
| // Protocol Buffers for Go with Gadgets | ||||
| // | ||||
| // Copyright (c) 2013, The GoGo Authors. All rights reserved. | ||||
| // http://github.com/gogo/protobuf | ||||
| // | ||||
| // Redistribution and use in source and binary forms, with or without | ||||
| // modification, are permitted provided that the following conditions are | ||||
| // met: | ||||
| // | ||||
| //     * Redistributions of source code must retain the above copyright | ||||
| // notice, this list of conditions and the following disclaimer. | ||||
| //     * Redistributions in binary form must reproduce the above | ||||
| // copyright notice, this list of conditions and the following disclaimer | ||||
| // in the documentation and/or other materials provided with the | ||||
| // distribution. | ||||
| // | ||||
| // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||||
| // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||||
| // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||||
| // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||||
| // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||||
| // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||||
| // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||||
| // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||||
| // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||||
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||||
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package sortkeys | ||||
|  | ||||
| import ( | ||||
| 	"sort" | ||||
| ) | ||||
|  | ||||
| func Strings(l []string) { | ||||
| 	sort.Strings(l) | ||||
| } | ||||
|  | ||||
| func Float64s(l []float64) { | ||||
| 	sort.Float64s(l) | ||||
| } | ||||
|  | ||||
| func Float32s(l []float32) { | ||||
| 	sort.Sort(Float32Slice(l)) | ||||
| } | ||||
|  | ||||
| func Int64s(l []int64) { | ||||
| 	sort.Sort(Int64Slice(l)) | ||||
| } | ||||
|  | ||||
| func Int32s(l []int32) { | ||||
| 	sort.Sort(Int32Slice(l)) | ||||
| } | ||||
|  | ||||
| func Uint64s(l []uint64) { | ||||
| 	sort.Sort(Uint64Slice(l)) | ||||
| } | ||||
|  | ||||
| func Uint32s(l []uint32) { | ||||
| 	sort.Sort(Uint32Slice(l)) | ||||
| } | ||||
|  | ||||
| func Bools(l []bool) { | ||||
| 	sort.Sort(BoolSlice(l)) | ||||
| } | ||||
|  | ||||
| type BoolSlice []bool | ||||
|  | ||||
| func (p BoolSlice) Len() int           { return len(p) } | ||||
| func (p BoolSlice) Less(i, j int) bool { return p[j] } | ||||
| func (p BoolSlice) Swap(i, j int)      { p[i], p[j] = p[j], p[i] } | ||||
|  | ||||
| type Int64Slice []int64 | ||||
|  | ||||
| func (p Int64Slice) Len() int           { return len(p) } | ||||
| func (p Int64Slice) Less(i, j int) bool { return p[i] < p[j] } | ||||
| func (p Int64Slice) Swap(i, j int)      { p[i], p[j] = p[j], p[i] } | ||||
|  | ||||
| type Int32Slice []int32 | ||||
|  | ||||
| func (p Int32Slice) Len() int           { return len(p) } | ||||
| func (p Int32Slice) Less(i, j int) bool { return p[i] < p[j] } | ||||
| func (p Int32Slice) Swap(i, j int)      { p[i], p[j] = p[j], p[i] } | ||||
|  | ||||
| type Uint64Slice []uint64 | ||||
|  | ||||
| func (p Uint64Slice) Len() int           { return len(p) } | ||||
| func (p Uint64Slice) Less(i, j int) bool { return p[i] < p[j] } | ||||
| func (p Uint64Slice) Swap(i, j int)      { p[i], p[j] = p[j], p[i] } | ||||
|  | ||||
| type Uint32Slice []uint32 | ||||
|  | ||||
| func (p Uint32Slice) Len() int           { return len(p) } | ||||
| func (p Uint32Slice) Less(i, j int) bool { return p[i] < p[j] } | ||||
| func (p Uint32Slice) Swap(i, j int)      { p[i], p[j] = p[j], p[i] } | ||||
|  | ||||
| type Float32Slice []float32 | ||||
|  | ||||
| func (p Float32Slice) Len() int           { return len(p) } | ||||
| func (p Float32Slice) Less(i, j int) bool { return p[i] < p[j] } | ||||
| func (p Float32Slice) Swap(i, j int)      { p[i], p[j] = p[j], p[i] } | ||||
							
								
								
									
										135
									
								
								vendor/github.com/gogo/protobuf/types/any.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										135
									
								
								vendor/github.com/gogo/protobuf/types/any.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,135 @@ | ||||
| // Go support for Protocol Buffers - Google's data interchange format | ||||
| // | ||||
| // Copyright 2016 The Go Authors.  All rights reserved. | ||||
| // https://github.com/golang/protobuf | ||||
| // | ||||
| // Redistribution and use in source and binary forms, with or without | ||||
| // modification, are permitted provided that the following conditions are | ||||
| // met: | ||||
| // | ||||
| //     * Redistributions of source code must retain the above copyright | ||||
| // notice, this list of conditions and the following disclaimer. | ||||
| //     * Redistributions in binary form must reproduce the above | ||||
| // copyright notice, this list of conditions and the following disclaimer | ||||
| // in the documentation and/or other materials provided with the | ||||
| // distribution. | ||||
| //     * Neither the name of Google Inc. nor the names of its | ||||
| // contributors may be used to endorse or promote products derived from | ||||
| // this software without specific prior written permission. | ||||
| // | ||||
| // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||||
| // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||||
| // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||||
| // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||||
| // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||||
| // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||||
| // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||||
| // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||||
| // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||||
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||||
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package types | ||||
|  | ||||
| // This file implements functions to marshal proto.Message to/from | ||||
| // google.protobuf.Any message. | ||||
|  | ||||
| import ( | ||||
| 	"fmt" | ||||
| 	"reflect" | ||||
| 	"strings" | ||||
|  | ||||
| 	"github.com/gogo/protobuf/proto" | ||||
| ) | ||||
|  | ||||
| const googleApis = "type.googleapis.com/" | ||||
|  | ||||
| // AnyMessageName returns the name of the message contained in a google.protobuf.Any message. | ||||
| // | ||||
| // Note that regular type assertions should be done using the Is | ||||
| // function. AnyMessageName is provided for less common use cases like filtering a | ||||
| // sequence of Any messages based on a set of allowed message type names. | ||||
| func AnyMessageName(any *Any) (string, error) { | ||||
| 	slash := strings.LastIndex(any.TypeUrl, "/") | ||||
| 	if slash < 0 { | ||||
| 		return "", fmt.Errorf("message type url %q is invalid", any.TypeUrl) | ||||
| 	} | ||||
| 	return any.TypeUrl[slash+1:], nil | ||||
| } | ||||
|  | ||||
| // MarshalAny takes the protocol buffer and encodes it into google.protobuf.Any. | ||||
| func MarshalAny(pb proto.Message) (*Any, error) { | ||||
| 	value, err := proto.Marshal(pb) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	return &Any{TypeUrl: googleApis + proto.MessageName(pb), Value: value}, nil | ||||
| } | ||||
|  | ||||
| // DynamicAny is a value that can be passed to UnmarshalAny to automatically | ||||
| // allocate a proto.Message for the type specified in a google.protobuf.Any | ||||
| // message. The allocated message is stored in the embedded proto.Message. | ||||
| // | ||||
| // Example: | ||||
| // | ||||
| //   var x ptypes.DynamicAny | ||||
| //   if err := ptypes.UnmarshalAny(a, &x); err != nil { ... } | ||||
| //   fmt.Printf("unmarshaled message: %v", x.Message) | ||||
| type DynamicAny struct { | ||||
| 	proto.Message | ||||
| } | ||||
|  | ||||
| // Empty returns a new proto.Message of the type specified in a | ||||
| // google.protobuf.Any message. It returns an error if corresponding message | ||||
| // type isn't linked in. | ||||
| func EmptyAny(any *Any) (proto.Message, error) { | ||||
| 	aname, err := AnyMessageName(any) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
|  | ||||
| 	t := proto.MessageType(aname) | ||||
| 	if t == nil { | ||||
| 		return nil, fmt.Errorf("any: message type %q isn't linked in", aname) | ||||
| 	} | ||||
| 	return reflect.New(t.Elem()).Interface().(proto.Message), nil | ||||
| } | ||||
|  | ||||
| // UnmarshalAny parses the protocol buffer representation in a google.protobuf.Any | ||||
| // message and places the decoded result in pb. It returns an error if type of | ||||
| // contents of Any message does not match type of pb message. | ||||
| // | ||||
| // pb can be a proto.Message, or a *DynamicAny. | ||||
| func UnmarshalAny(any *Any, pb proto.Message) error { | ||||
| 	if d, ok := pb.(*DynamicAny); ok { | ||||
| 		if d.Message == nil { | ||||
| 			var err error | ||||
| 			d.Message, err = EmptyAny(any) | ||||
| 			if err != nil { | ||||
| 				return err | ||||
| 			} | ||||
| 		} | ||||
| 		return UnmarshalAny(any, d.Message) | ||||
| 	} | ||||
|  | ||||
| 	aname, err := AnyMessageName(any) | ||||
| 	if err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	mname := proto.MessageName(pb) | ||||
| 	if aname != mname { | ||||
| 		return fmt.Errorf("mismatched message type: got %q want %q", aname, mname) | ||||
| 	} | ||||
| 	return proto.Unmarshal(any.Value, pb) | ||||
| } | ||||
|  | ||||
| // Is returns true if any value contains a given message type. | ||||
| func Is(any *Any, pb proto.Message) bool { | ||||
| 	aname, err := AnyMessageName(any) | ||||
| 	if err != nil { | ||||
| 		return false | ||||
| 	} | ||||
|  | ||||
| 	return aname == proto.MessageName(pb) | ||||
| } | ||||
							
								
								
									
										687
									
								
								vendor/github.com/gogo/protobuf/types/any.pb.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										687
									
								
								vendor/github.com/gogo/protobuf/types/any.pb.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,687 @@ | ||||
| // Code generated by protoc-gen-gogo. | ||||
| // source: any.proto | ||||
| // DO NOT EDIT! | ||||
|  | ||||
| /* | ||||
| 	Package types is a generated protocol buffer package. | ||||
|  | ||||
| 	It is generated from these files: | ||||
| 		any.proto | ||||
|  | ||||
| 	It has these top-level messages: | ||||
| 		Any | ||||
| */ | ||||
| package types | ||||
|  | ||||
| import proto "github.com/gogo/protobuf/proto" | ||||
| import fmt "fmt" | ||||
| import math "math" | ||||
|  | ||||
| import bytes "bytes" | ||||
|  | ||||
| import strings "strings" | ||||
| import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" | ||||
| import sort "sort" | ||||
| import strconv "strconv" | ||||
| import reflect "reflect" | ||||
|  | ||||
| import io "io" | ||||
|  | ||||
| // Reference imports to suppress errors if they are not otherwise used. | ||||
| var _ = proto.Marshal | ||||
| var _ = fmt.Errorf | ||||
| var _ = math.Inf | ||||
|  | ||||
| // This is a compile-time assertion to ensure that this generated file | ||||
| // 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 | ||||
|  | ||||
| // `Any` contains an arbitrary serialized protocol buffer message along with a | ||||
| // URL that describes the type of the serialized message. | ||||
| // | ||||
| // Protobuf library provides support to pack/unpack Any values in the form | ||||
| // of utility functions or additional generated methods of the Any type. | ||||
| // | ||||
| // Example 1: Pack and unpack a message in C++. | ||||
| // | ||||
| //     Foo foo = ...; | ||||
| //     Any any; | ||||
| //     any.PackFrom(foo); | ||||
| //     ... | ||||
| //     if (any.UnpackTo(&foo)) { | ||||
| //       ... | ||||
| //     } | ||||
| // | ||||
| // Example 2: Pack and unpack a message in Java. | ||||
| // | ||||
| //     Foo foo = ...; | ||||
| //     Any any = Any.pack(foo); | ||||
| //     ... | ||||
| //     if (any.is(Foo.class)) { | ||||
| //       foo = any.unpack(Foo.class); | ||||
| //     } | ||||
| // | ||||
| //  Example 3: Pack and unpack a message in Python. | ||||
| // | ||||
| //     foo = Foo(...) | ||||
| //     any = Any() | ||||
| //     any.Pack(foo) | ||||
| //     ... | ||||
| //     if any.Is(Foo.DESCRIPTOR): | ||||
| //       any.Unpack(foo) | ||||
| //       ... | ||||
| // | ||||
| // The pack methods provided by protobuf library will by default use | ||||
| // 'type.googleapis.com/full.type.name' as the type URL and the unpack | ||||
| // methods only use the fully qualified type name after the last '/' | ||||
| // in the type URL, for example "foo.bar.com/x/y.z" will yield type | ||||
| // name "y.z". | ||||
| // | ||||
| // | ||||
| // JSON | ||||
| // ==== | ||||
| // The JSON representation of an `Any` value uses the regular | ||||
| // representation of the deserialized, embedded message, with an | ||||
| // additional field `@type` which contains the type URL. Example: | ||||
| // | ||||
| //     package google.profile; | ||||
| //     message Person { | ||||
| //       string first_name = 1; | ||||
| //       string last_name = 2; | ||||
| //     } | ||||
| // | ||||
| //     { | ||||
| //       "@type": "type.googleapis.com/google.profile.Person", | ||||
| //       "firstName": <string>, | ||||
| //       "lastName": <string> | ||||
| //     } | ||||
| // | ||||
| // If the embedded message type is well-known and has a custom JSON | ||||
| // representation, that representation will be embedded adding a field | ||||
| // `value` which holds the custom JSON in addition to the `@type` | ||||
| // field. Example (for message [google.protobuf.Duration][]): | ||||
| // | ||||
| //     { | ||||
| //       "@type": "type.googleapis.com/google.protobuf.Duration", | ||||
| //       "value": "1.212s" | ||||
| //     } | ||||
| // | ||||
| type Any struct { | ||||
| 	// A URL/resource name whose content describes the type of the | ||||
| 	// serialized protocol buffer message. | ||||
| 	// | ||||
| 	// For URLs which use the scheme `http`, `https`, or no scheme, the | ||||
| 	// following restrictions and interpretations apply: | ||||
| 	// | ||||
| 	// * If no scheme is provided, `https` is assumed. | ||||
| 	// * The last segment of the URL's path must represent the fully | ||||
| 	//   qualified name of the type (as in `path/google.protobuf.Duration`). | ||||
| 	//   The name should be in a canonical form (e.g., leading "." is | ||||
| 	//   not accepted). | ||||
| 	// * An HTTP GET on the URL must yield a [google.protobuf.Type][] | ||||
| 	//   value in binary format, or produce an error. | ||||
| 	// * Applications are allowed to cache lookup results based on the | ||||
| 	//   URL, or have them precompiled into a binary to avoid any | ||||
| 	//   lookup. Therefore, binary compatibility needs to be preserved | ||||
| 	//   on changes to types. (Use versioned type names to manage | ||||
| 	//   breaking changes.) | ||||
| 	// | ||||
| 	// Schemes other than `http`, `https` (or the empty scheme) might be | ||||
| 	// used with implementation specific semantics. | ||||
| 	// | ||||
| 	TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` | ||||
| 	// Must be a valid serialized protocol buffer of the above specified type. | ||||
| 	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` | ||||
| } | ||||
|  | ||||
| func (m *Any) Reset()                    { *m = Any{} } | ||||
| func (*Any) ProtoMessage()               {} | ||||
| func (*Any) Descriptor() ([]byte, []int) { return fileDescriptorAny, []int{0} } | ||||
| func (*Any) XXX_WellKnownType() string   { return "Any" } | ||||
|  | ||||
| func (m *Any) GetTypeUrl() string { | ||||
| 	if m != nil { | ||||
| 		return m.TypeUrl | ||||
| 	} | ||||
| 	return "" | ||||
| } | ||||
|  | ||||
| func (m *Any) GetValue() []byte { | ||||
| 	if m != nil { | ||||
| 		return m.Value | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| func init() { | ||||
| 	proto.RegisterType((*Any)(nil), "google.protobuf.Any") | ||||
| } | ||||
| func (this *Any) Compare(that interface{}) int { | ||||
| 	if that == nil { | ||||
| 		if this == nil { | ||||
| 			return 0 | ||||
| 		} | ||||
| 		return 1 | ||||
| 	} | ||||
|  | ||||
| 	that1, ok := that.(*Any) | ||||
| 	if !ok { | ||||
| 		that2, ok := that.(Any) | ||||
| 		if ok { | ||||
| 			that1 = &that2 | ||||
| 		} else { | ||||
| 			return 1 | ||||
| 		} | ||||
| 	} | ||||
| 	if that1 == nil { | ||||
| 		if this == nil { | ||||
| 			return 0 | ||||
| 		} | ||||
| 		return 1 | ||||
| 	} else if this == nil { | ||||
| 		return -1 | ||||
| 	} | ||||
| 	if this.TypeUrl != that1.TypeUrl { | ||||
| 		if this.TypeUrl < that1.TypeUrl { | ||||
| 			return -1 | ||||
| 		} | ||||
| 		return 1 | ||||
| 	} | ||||
| 	if c := bytes.Compare(this.Value, that1.Value); c != 0 { | ||||
| 		return c | ||||
| 	} | ||||
| 	return 0 | ||||
| } | ||||
| func (this *Any) Equal(that interface{}) bool { | ||||
| 	if that == nil { | ||||
| 		if this == nil { | ||||
| 			return true | ||||
| 		} | ||||
| 		return false | ||||
| 	} | ||||
|  | ||||
| 	that1, ok := that.(*Any) | ||||
| 	if !ok { | ||||
| 		that2, ok := that.(Any) | ||||
| 		if ok { | ||||
| 			that1 = &that2 | ||||
| 		} else { | ||||
| 			return false | ||||
| 		} | ||||
| 	} | ||||
| 	if that1 == nil { | ||||
| 		if this == nil { | ||||
| 			return true | ||||
| 		} | ||||
| 		return false | ||||
| 	} else if this == nil { | ||||
| 		return false | ||||
| 	} | ||||
| 	if this.TypeUrl != that1.TypeUrl { | ||||
| 		return false | ||||
| 	} | ||||
| 	if !bytes.Equal(this.Value, that1.Value) { | ||||
| 		return false | ||||
| 	} | ||||
| 	return true | ||||
| } | ||||
| func (this *Any) GoString() string { | ||||
| 	if this == nil { | ||||
| 		return "nil" | ||||
| 	} | ||||
| 	s := make([]string, 0, 6) | ||||
| 	s = append(s, "&types.Any{") | ||||
| 	s = append(s, "TypeUrl: "+fmt.Sprintf("%#v", this.TypeUrl)+",\n") | ||||
| 	s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") | ||||
| 	s = append(s, "}") | ||||
| 	return strings.Join(s, "") | ||||
| } | ||||
| func valueToGoStringAny(v interface{}, typ string) string { | ||||
| 	rv := reflect.ValueOf(v) | ||||
| 	if rv.IsNil() { | ||||
| 		return "nil" | ||||
| 	} | ||||
| 	pv := reflect.Indirect(rv).Interface() | ||||
| 	return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) | ||||
| } | ||||
| func extensionToGoStringAny(m github_com_gogo_protobuf_proto.Message) string { | ||||
| 	e := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(m) | ||||
| 	if e == nil { | ||||
| 		return "nil" | ||||
| 	} | ||||
| 	s := "proto.NewUnsafeXXX_InternalExtensions(map[int32]proto.Extension{" | ||||
| 	keys := make([]int, 0, len(e)) | ||||
| 	for k := range e { | ||||
| 		keys = append(keys, int(k)) | ||||
| 	} | ||||
| 	sort.Ints(keys) | ||||
| 	ss := []string{} | ||||
| 	for _, k := range keys { | ||||
| 		ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) | ||||
| 	} | ||||
| 	s += strings.Join(ss, ",") + "})" | ||||
| 	return s | ||||
| } | ||||
| func (m *Any) Marshal() (dAtA []byte, err error) { | ||||
| 	size := m.Size() | ||||
| 	dAtA = make([]byte, size) | ||||
| 	n, err := m.MarshalTo(dAtA) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	return dAtA[:n], nil | ||||
| } | ||||
|  | ||||
| func (m *Any) MarshalTo(dAtA []byte) (int, error) { | ||||
| 	var i int | ||||
| 	_ = i | ||||
| 	var l int | ||||
| 	_ = l | ||||
| 	if len(m.TypeUrl) > 0 { | ||||
| 		dAtA[i] = 0xa | ||||
| 		i++ | ||||
| 		i = encodeVarintAny(dAtA, i, uint64(len(m.TypeUrl))) | ||||
| 		i += copy(dAtA[i:], m.TypeUrl) | ||||
| 	} | ||||
| 	if len(m.Value) > 0 { | ||||
| 		dAtA[i] = 0x12 | ||||
| 		i++ | ||||
| 		i = encodeVarintAny(dAtA, i, uint64(len(m.Value))) | ||||
| 		i += copy(dAtA[i:], m.Value) | ||||
| 	} | ||||
| 	return i, nil | ||||
| } | ||||
|  | ||||
| func encodeFixed64Any(dAtA []byte, offset int, v uint64) int { | ||||
| 	dAtA[offset] = uint8(v) | ||||
| 	dAtA[offset+1] = uint8(v >> 8) | ||||
| 	dAtA[offset+2] = uint8(v >> 16) | ||||
| 	dAtA[offset+3] = uint8(v >> 24) | ||||
| 	dAtA[offset+4] = uint8(v >> 32) | ||||
| 	dAtA[offset+5] = uint8(v >> 40) | ||||
| 	dAtA[offset+6] = uint8(v >> 48) | ||||
| 	dAtA[offset+7] = uint8(v >> 56) | ||||
| 	return offset + 8 | ||||
| } | ||||
| func encodeFixed32Any(dAtA []byte, offset int, v uint32) int { | ||||
| 	dAtA[offset] = uint8(v) | ||||
| 	dAtA[offset+1] = uint8(v >> 8) | ||||
| 	dAtA[offset+2] = uint8(v >> 16) | ||||
| 	dAtA[offset+3] = uint8(v >> 24) | ||||
| 	return offset + 4 | ||||
| } | ||||
| func encodeVarintAny(dAtA []byte, offset int, v uint64) int { | ||||
| 	for v >= 1<<7 { | ||||
| 		dAtA[offset] = uint8(v&0x7f | 0x80) | ||||
| 		v >>= 7 | ||||
| 		offset++ | ||||
| 	} | ||||
| 	dAtA[offset] = uint8(v) | ||||
| 	return offset + 1 | ||||
| } | ||||
| func NewPopulatedAny(r randyAny, easy bool) *Any { | ||||
| 	this := &Any{} | ||||
| 	this.TypeUrl = string(randStringAny(r)) | ||||
| 	v1 := r.Intn(100) | ||||
| 	this.Value = make([]byte, v1) | ||||
| 	for i := 0; i < v1; i++ { | ||||
| 		this.Value[i] = byte(r.Intn(256)) | ||||
| 	} | ||||
| 	if !easy && r.Intn(10) != 0 { | ||||
| 	} | ||||
| 	return this | ||||
| } | ||||
|  | ||||
| type randyAny interface { | ||||
| 	Float32() float32 | ||||
| 	Float64() float64 | ||||
| 	Int63() int64 | ||||
| 	Int31() int32 | ||||
| 	Uint32() uint32 | ||||
| 	Intn(n int) int | ||||
| } | ||||
|  | ||||
| func randUTF8RuneAny(r randyAny) rune { | ||||
| 	ru := r.Intn(62) | ||||
| 	if ru < 10 { | ||||
| 		return rune(ru + 48) | ||||
| 	} else if ru < 36 { | ||||
| 		return rune(ru + 55) | ||||
| 	} | ||||
| 	return rune(ru + 61) | ||||
| } | ||||
| func randStringAny(r randyAny) string { | ||||
| 	v2 := r.Intn(100) | ||||
| 	tmps := make([]rune, v2) | ||||
| 	for i := 0; i < v2; i++ { | ||||
| 		tmps[i] = randUTF8RuneAny(r) | ||||
| 	} | ||||
| 	return string(tmps) | ||||
| } | ||||
| func randUnrecognizedAny(r randyAny, maxFieldNumber int) (dAtA []byte) { | ||||
| 	l := r.Intn(5) | ||||
| 	for i := 0; i < l; i++ { | ||||
| 		wire := r.Intn(4) | ||||
| 		if wire == 3 { | ||||
| 			wire = 5 | ||||
| 		} | ||||
| 		fieldNumber := maxFieldNumber + r.Intn(100) | ||||
| 		dAtA = randFieldAny(dAtA, r, fieldNumber, wire) | ||||
| 	} | ||||
| 	return dAtA | ||||
| } | ||||
| func randFieldAny(dAtA []byte, r randyAny, fieldNumber int, wire int) []byte { | ||||
| 	key := uint32(fieldNumber)<<3 | uint32(wire) | ||||
| 	switch wire { | ||||
| 	case 0: | ||||
| 		dAtA = encodeVarintPopulateAny(dAtA, uint64(key)) | ||||
| 		v3 := r.Int63() | ||||
| 		if r.Intn(2) == 0 { | ||||
| 			v3 *= -1 | ||||
| 		} | ||||
| 		dAtA = encodeVarintPopulateAny(dAtA, uint64(v3)) | ||||
| 	case 1: | ||||
| 		dAtA = encodeVarintPopulateAny(dAtA, uint64(key)) | ||||
| 		dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) | ||||
| 	case 2: | ||||
| 		dAtA = encodeVarintPopulateAny(dAtA, uint64(key)) | ||||
| 		ll := r.Intn(100) | ||||
| 		dAtA = encodeVarintPopulateAny(dAtA, uint64(ll)) | ||||
| 		for j := 0; j < ll; j++ { | ||||
| 			dAtA = append(dAtA, byte(r.Intn(256))) | ||||
| 		} | ||||
| 	default: | ||||
| 		dAtA = encodeVarintPopulateAny(dAtA, uint64(key)) | ||||
| 		dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) | ||||
| 	} | ||||
| 	return dAtA | ||||
| } | ||||
| func encodeVarintPopulateAny(dAtA []byte, v uint64) []byte { | ||||
| 	for v >= 1<<7 { | ||||
| 		dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) | ||||
| 		v >>= 7 | ||||
| 	} | ||||
| 	dAtA = append(dAtA, uint8(v)) | ||||
| 	return dAtA | ||||
| } | ||||
| func (m *Any) Size() (n int) { | ||||
| 	var l int | ||||
| 	_ = l | ||||
| 	l = len(m.TypeUrl) | ||||
| 	if l > 0 { | ||||
| 		n += 1 + l + sovAny(uint64(l)) | ||||
| 	} | ||||
| 	l = len(m.Value) | ||||
| 	if l > 0 { | ||||
| 		n += 1 + l + sovAny(uint64(l)) | ||||
| 	} | ||||
| 	return n | ||||
| } | ||||
|  | ||||
| func sovAny(x uint64) (n int) { | ||||
| 	for { | ||||
| 		n++ | ||||
| 		x >>= 7 | ||||
| 		if x == 0 { | ||||
| 			break | ||||
| 		} | ||||
| 	} | ||||
| 	return n | ||||
| } | ||||
| func sozAny(x uint64) (n int) { | ||||
| 	return sovAny(uint64((x << 1) ^ uint64((int64(x) >> 63)))) | ||||
| } | ||||
| func (this *Any) String() string { | ||||
| 	if this == nil { | ||||
| 		return "nil" | ||||
| 	} | ||||
| 	s := strings.Join([]string{`&Any{`, | ||||
| 		`TypeUrl:` + fmt.Sprintf("%v", this.TypeUrl) + `,`, | ||||
| 		`Value:` + fmt.Sprintf("%v", this.Value) + `,`, | ||||
| 		`}`, | ||||
| 	}, "") | ||||
| 	return s | ||||
| } | ||||
| func valueToStringAny(v interface{}) string { | ||||
| 	rv := reflect.ValueOf(v) | ||||
| 	if rv.IsNil() { | ||||
| 		return "nil" | ||||
| 	} | ||||
| 	pv := reflect.Indirect(rv).Interface() | ||||
| 	return fmt.Sprintf("*%v", pv) | ||||
| } | ||||
| func (m *Any) Unmarshal(dAtA []byte) error { | ||||
| 	l := len(dAtA) | ||||
| 	iNdEx := 0 | ||||
| 	for iNdEx < l { | ||||
| 		preIndex := iNdEx | ||||
| 		var wire uint64 | ||||
| 		for shift := uint(0); ; shift += 7 { | ||||
| 			if shift >= 64 { | ||||
| 				return ErrIntOverflowAny | ||||
| 			} | ||||
| 			if iNdEx >= l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			b := dAtA[iNdEx] | ||||
| 			iNdEx++ | ||||
| 			wire |= (uint64(b) & 0x7F) << shift | ||||
| 			if b < 0x80 { | ||||
| 				break | ||||
| 			} | ||||
| 		} | ||||
| 		fieldNum := int32(wire >> 3) | ||||
| 		wireType := int(wire & 0x7) | ||||
| 		if wireType == 4 { | ||||
| 			return fmt.Errorf("proto: Any: wiretype end group for non-group") | ||||
| 		} | ||||
| 		if fieldNum <= 0 { | ||||
| 			return fmt.Errorf("proto: Any: illegal tag %d (wire type %d)", fieldNum, wire) | ||||
| 		} | ||||
| 		switch fieldNum { | ||||
| 		case 1: | ||||
| 			if wireType != 2 { | ||||
| 				return fmt.Errorf("proto: wrong wireType = %d for field TypeUrl", wireType) | ||||
| 			} | ||||
| 			var stringLen uint64 | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return ErrIntOverflowAny | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				b := dAtA[iNdEx] | ||||
| 				iNdEx++ | ||||
| 				stringLen |= (uint64(b) & 0x7F) << shift | ||||
| 				if b < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 			intStringLen := int(stringLen) | ||||
| 			if intStringLen < 0 { | ||||
| 				return ErrInvalidLengthAny | ||||
| 			} | ||||
| 			postIndex := iNdEx + intStringLen | ||||
| 			if postIndex > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			m.TypeUrl = string(dAtA[iNdEx:postIndex]) | ||||
| 			iNdEx = postIndex | ||||
| 		case 2: | ||||
| 			if wireType != 2 { | ||||
| 				return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) | ||||
| 			} | ||||
| 			var byteLen int | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return ErrIntOverflowAny | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				b := dAtA[iNdEx] | ||||
| 				iNdEx++ | ||||
| 				byteLen |= (int(b) & 0x7F) << shift | ||||
| 				if b < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 			if byteLen < 0 { | ||||
| 				return ErrInvalidLengthAny | ||||
| 			} | ||||
| 			postIndex := iNdEx + byteLen | ||||
| 			if postIndex > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) | ||||
| 			if m.Value == nil { | ||||
| 				m.Value = []byte{} | ||||
| 			} | ||||
| 			iNdEx = postIndex | ||||
| 		default: | ||||
| 			iNdEx = preIndex | ||||
| 			skippy, err := skipAny(dAtA[iNdEx:]) | ||||
| 			if err != nil { | ||||
| 				return err | ||||
| 			} | ||||
| 			if skippy < 0 { | ||||
| 				return ErrInvalidLengthAny | ||||
| 			} | ||||
| 			if (iNdEx + skippy) > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			iNdEx += skippy | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	if iNdEx > l { | ||||
| 		return io.ErrUnexpectedEOF | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
| func skipAny(dAtA []byte) (n int, err error) { | ||||
| 	l := len(dAtA) | ||||
| 	iNdEx := 0 | ||||
| 	for iNdEx < l { | ||||
| 		var wire uint64 | ||||
| 		for shift := uint(0); ; shift += 7 { | ||||
| 			if shift >= 64 { | ||||
| 				return 0, ErrIntOverflowAny | ||||
| 			} | ||||
| 			if iNdEx >= l { | ||||
| 				return 0, io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			b := dAtA[iNdEx] | ||||
| 			iNdEx++ | ||||
| 			wire |= (uint64(b) & 0x7F) << shift | ||||
| 			if b < 0x80 { | ||||
| 				break | ||||
| 			} | ||||
| 		} | ||||
| 		wireType := int(wire & 0x7) | ||||
| 		switch wireType { | ||||
| 		case 0: | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return 0, ErrIntOverflowAny | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return 0, io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				iNdEx++ | ||||
| 				if dAtA[iNdEx-1] < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 			return iNdEx, nil | ||||
| 		case 1: | ||||
| 			iNdEx += 8 | ||||
| 			return iNdEx, nil | ||||
| 		case 2: | ||||
| 			var length int | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return 0, ErrIntOverflowAny | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return 0, io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				b := dAtA[iNdEx] | ||||
| 				iNdEx++ | ||||
| 				length |= (int(b) & 0x7F) << shift | ||||
| 				if b < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 			iNdEx += length | ||||
| 			if length < 0 { | ||||
| 				return 0, ErrInvalidLengthAny | ||||
| 			} | ||||
| 			return iNdEx, nil | ||||
| 		case 3: | ||||
| 			for { | ||||
| 				var innerWire uint64 | ||||
| 				var start int = iNdEx | ||||
| 				for shift := uint(0); ; shift += 7 { | ||||
| 					if shift >= 64 { | ||||
| 						return 0, ErrIntOverflowAny | ||||
| 					} | ||||
| 					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 := skipAny(dAtA[start:]) | ||||
| 				if err != nil { | ||||
| 					return 0, err | ||||
| 				} | ||||
| 				iNdEx = start + next | ||||
| 			} | ||||
| 			return iNdEx, nil | ||||
| 		case 4: | ||||
| 			return iNdEx, nil | ||||
| 		case 5: | ||||
| 			iNdEx += 4 | ||||
| 			return iNdEx, nil | ||||
| 		default: | ||||
| 			return 0, fmt.Errorf("proto: illegal wireType %d", wireType) | ||||
| 		} | ||||
| 	} | ||||
| 	panic("unreachable") | ||||
| } | ||||
|  | ||||
| var ( | ||||
| 	ErrInvalidLengthAny = fmt.Errorf("proto: negative length found during unmarshaling") | ||||
| 	ErrIntOverflowAny   = fmt.Errorf("proto: integer overflow") | ||||
| ) | ||||
|  | ||||
| func init() { proto.RegisterFile("any.proto", fileDescriptorAny) } | ||||
|  | ||||
| var fileDescriptorAny = []byte{ | ||||
| 	// 208 bytes of a gzipped FileDescriptorProto | ||||
| 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x4c, 0xcc, 0xab, 0xd4, | ||||
| 	0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x4f, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0x85, 0xf0, 0x92, | ||||
| 	0x4a, 0xd3, 0x94, 0xcc, 0xb8, 0x98, 0x1d, 0xf3, 0x2a, 0x85, 0x24, 0xb9, 0x38, 0x4a, 0x2a, 0x0b, | ||||
| 	0x52, 0xe3, 0x4b, 0x8b, 0x72, 0x24, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0xd8, 0x41, 0xfc, 0xd0, | ||||
| 	0xa2, 0x1c, 0x21, 0x11, 0x2e, 0xd6, 0xb2, 0xc4, 0x9c, 0xd2, 0x54, 0x09, 0x26, 0x05, 0x46, 0x0d, | ||||
| 	0x9e, 0x20, 0x08, 0xc7, 0xa9, 0x89, 0xf1, 0xc2, 0x43, 0x39, 0x86, 0x1b, 0x0f, 0xe5, 0x18, 0x3e, | ||||
| 	0x3c, 0x94, 0x63, 0xfc, 0xf1, 0x50, 0x8e, 0xb1, 0xe1, 0x91, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, | ||||
| 	0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x8b, 0x47, 0x72, | ||||
| 	0x0c, 0x1f, 0x40, 0xe2, 0x8f, 0xe5, 0x18, 0xb9, 0x84, 0x93, 0xf3, 0x73, 0xf5, 0xd0, 0xec, 0x77, | ||||
| 	0xe2, 0x70, 0xcc, 0xab, 0x0c, 0x00, 0x71, 0x02, 0x18, 0xa3, 0x58, 0x41, 0x56, 0x16, 0x2f, 0x60, | ||||
| 	0x64, 0x5c, 0xc4, 0xc4, 0xec, 0x1e, 0xe0, 0xb4, 0x8a, 0x49, 0xce, 0x1d, 0xa2, 0x3a, 0x00, 0xaa, | ||||
| 	0x5a, 0x2f, 0x3c, 0x35, 0x27, 0xc7, 0x3b, 0x2f, 0xbf, 0x3c, 0x2f, 0x04, 0xa4, 0x32, 0x89, 0x0d, | ||||
| 	0x6c, 0x8c, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x63, 0x5d, 0x2d, 0x27, 0xe1, 0x00, 0x00, 0x00, | ||||
| } | ||||
							
								
								
									
										35
									
								
								vendor/github.com/gogo/protobuf/types/doc.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								vendor/github.com/gogo/protobuf/types/doc.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,35 @@ | ||||
| // Go support for Protocol Buffers - Google's data interchange format | ||||
| // | ||||
| // Copyright 2016 The Go Authors.  All rights reserved. | ||||
| // https://github.com/golang/protobuf | ||||
| // | ||||
| // Redistribution and use in source and binary forms, with or without | ||||
| // modification, are permitted provided that the following conditions are | ||||
| // met: | ||||
| // | ||||
| //     * Redistributions of source code must retain the above copyright | ||||
| // notice, this list of conditions and the following disclaimer. | ||||
| //     * Redistributions in binary form must reproduce the above | ||||
| // copyright notice, this list of conditions and the following disclaimer | ||||
| // in the documentation and/or other materials provided with the | ||||
| // distribution. | ||||
| //     * Neither the name of Google Inc. nor the names of its | ||||
| // contributors may be used to endorse or promote products derived from | ||||
| // this software without specific prior written permission. | ||||
| // | ||||
| // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||||
| // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||||
| // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||||
| // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||||
| // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||||
| // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||||
| // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||||
| // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||||
| // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||||
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||||
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| /* | ||||
| Package types contains code for interacting with well-known types. | ||||
| */ | ||||
| package types | ||||
							
								
								
									
										100
									
								
								vendor/github.com/gogo/protobuf/types/duration.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										100
									
								
								vendor/github.com/gogo/protobuf/types/duration.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,100 @@ | ||||
| // Go support for Protocol Buffers - Google's data interchange format | ||||
| // | ||||
| // Copyright 2016 The Go Authors.  All rights reserved. | ||||
| // https://github.com/golang/protobuf | ||||
| // | ||||
| // Redistribution and use in source and binary forms, with or without | ||||
| // modification, are permitted provided that the following conditions are | ||||
| // met: | ||||
| // | ||||
| //     * Redistributions of source code must retain the above copyright | ||||
| // notice, this list of conditions and the following disclaimer. | ||||
| //     * Redistributions in binary form must reproduce the above | ||||
| // copyright notice, this list of conditions and the following disclaimer | ||||
| // in the documentation and/or other materials provided with the | ||||
| // distribution. | ||||
| //     * Neither the name of Google Inc. nor the names of its | ||||
| // contributors may be used to endorse or promote products derived from | ||||
| // this software without specific prior written permission. | ||||
| // | ||||
| // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||||
| // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||||
| // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||||
| // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||||
| // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||||
| // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||||
| // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||||
| // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||||
| // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||||
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||||
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package types | ||||
|  | ||||
| // This file implements conversions between google.protobuf.Duration | ||||
| // and time.Duration. | ||||
|  | ||||
| import ( | ||||
| 	"errors" | ||||
| 	"fmt" | ||||
| 	"time" | ||||
| ) | ||||
|  | ||||
| const ( | ||||
| 	// Range of a Duration in seconds, as specified in | ||||
| 	// google/protobuf/duration.proto. This is about 10,000 years in seconds. | ||||
| 	maxSeconds = int64(10000 * 365.25 * 24 * 60 * 60) | ||||
| 	minSeconds = -maxSeconds | ||||
| ) | ||||
|  | ||||
| // validateDuration determines whether the Duration is valid according to the | ||||
| // definition in google/protobuf/duration.proto. A valid Duration | ||||
| // may still be too large to fit into a time.Duration (the range of Duration | ||||
| // is about 10,000 years, and the range of time.Duration is about 290). | ||||
| func validateDuration(d *Duration) error { | ||||
| 	if d == nil { | ||||
| 		return errors.New("duration: nil Duration") | ||||
| 	} | ||||
| 	if d.Seconds < minSeconds || d.Seconds > maxSeconds { | ||||
| 		return fmt.Errorf("duration: %#v: seconds out of range", d) | ||||
| 	} | ||||
| 	if d.Nanos <= -1e9 || d.Nanos >= 1e9 { | ||||
| 		return fmt.Errorf("duration: %#v: nanos out of range", d) | ||||
| 	} | ||||
| 	// Seconds and Nanos must have the same sign, unless d.Nanos is zero. | ||||
| 	if (d.Seconds < 0 && d.Nanos > 0) || (d.Seconds > 0 && d.Nanos < 0) { | ||||
| 		return fmt.Errorf("duration: %#v: seconds and nanos have different signs", d) | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| // DurationFromProto converts a Duration to a time.Duration. DurationFromProto | ||||
| // returns an error if the Duration is invalid or is too large to be | ||||
| // represented in a time.Duration. | ||||
| func DurationFromProto(p *Duration) (time.Duration, error) { | ||||
| 	if err := validateDuration(p); err != nil { | ||||
| 		return 0, err | ||||
| 	} | ||||
| 	d := time.Duration(p.Seconds) * time.Second | ||||
| 	if int64(d/time.Second) != p.Seconds { | ||||
| 		return 0, fmt.Errorf("duration: %#v is out of range for time.Duration", p) | ||||
| 	} | ||||
| 	if p.Nanos != 0 { | ||||
| 		d += time.Duration(p.Nanos) | ||||
| 		if (d < 0) != (p.Nanos < 0) { | ||||
| 			return 0, fmt.Errorf("duration: %#v is out of range for time.Duration", p) | ||||
| 		} | ||||
| 	} | ||||
| 	return d, nil | ||||
| } | ||||
|  | ||||
| // DurationProto converts a time.Duration to a Duration. | ||||
| func DurationProto(d time.Duration) *Duration { | ||||
| 	nanos := d.Nanoseconds() | ||||
| 	secs := nanos / 1e9 | ||||
| 	nanos -= secs * 1e9 | ||||
| 	return &Duration{ | ||||
| 		Seconds: secs, | ||||
| 		Nanos:   int32(nanos), | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										515
									
								
								vendor/github.com/gogo/protobuf/types/duration.pb.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										515
									
								
								vendor/github.com/gogo/protobuf/types/duration.pb.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,515 @@ | ||||
| // Code generated by protoc-gen-gogo. | ||||
| // source: duration.proto | ||||
| // DO NOT EDIT! | ||||
|  | ||||
| /* | ||||
| 	Package types is a generated protocol buffer package. | ||||
|  | ||||
| 	It is generated from these files: | ||||
| 		duration.proto | ||||
|  | ||||
| 	It has these top-level messages: | ||||
| 		Duration | ||||
| */ | ||||
| package types | ||||
|  | ||||
| import proto "github.com/gogo/protobuf/proto" | ||||
| import fmt "fmt" | ||||
| import math "math" | ||||
|  | ||||
| import strings "strings" | ||||
| import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" | ||||
| import sort "sort" | ||||
| import strconv "strconv" | ||||
| import reflect "reflect" | ||||
|  | ||||
| import io "io" | ||||
|  | ||||
| // Reference imports to suppress errors if they are not otherwise used. | ||||
| var _ = proto.Marshal | ||||
| var _ = fmt.Errorf | ||||
| var _ = math.Inf | ||||
|  | ||||
| // This is a compile-time assertion to ensure that this generated file | ||||
| // 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 | ||||
|  | ||||
| // A Duration represents a signed, fixed-length span of time represented | ||||
| // as a count of seconds and fractions of seconds at nanosecond | ||||
| // resolution. It is independent of any calendar and concepts like "day" | ||||
| // or "month". It is related to Timestamp in that the difference between | ||||
| // two Timestamp values is a Duration and it can be added or subtracted | ||||
| // from a Timestamp. Range is approximately +-10,000 years. | ||||
| // | ||||
| // Example 1: Compute Duration from two Timestamps in pseudo code. | ||||
| // | ||||
| //     Timestamp start = ...; | ||||
| //     Timestamp end = ...; | ||||
| //     Duration duration = ...; | ||||
| // | ||||
| //     duration.seconds = end.seconds - start.seconds; | ||||
| //     duration.nanos = end.nanos - start.nanos; | ||||
| // | ||||
| //     if (duration.seconds < 0 && duration.nanos > 0) { | ||||
| //       duration.seconds += 1; | ||||
| //       duration.nanos -= 1000000000; | ||||
| //     } else if (durations.seconds > 0 && duration.nanos < 0) { | ||||
| //       duration.seconds -= 1; | ||||
| //       duration.nanos += 1000000000; | ||||
| //     } | ||||
| // | ||||
| // Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. | ||||
| // | ||||
| //     Timestamp start = ...; | ||||
| //     Duration duration = ...; | ||||
| //     Timestamp end = ...; | ||||
| // | ||||
| //     end.seconds = start.seconds + duration.seconds; | ||||
| //     end.nanos = start.nanos + duration.nanos; | ||||
| // | ||||
| //     if (end.nanos < 0) { | ||||
| //       end.seconds -= 1; | ||||
| //       end.nanos += 1000000000; | ||||
| //     } else if (end.nanos >= 1000000000) { | ||||
| //       end.seconds += 1; | ||||
| //       end.nanos -= 1000000000; | ||||
| //     } | ||||
| // | ||||
| // | ||||
| type Duration struct { | ||||
| 	// Signed seconds of the span of time. Must be from -315,576,000,000 | ||||
| 	// to +315,576,000,000 inclusive. | ||||
| 	Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` | ||||
| 	// Signed fractions of a second at nanosecond resolution of the span | ||||
| 	// of time. Durations less than one second are represented with a 0 | ||||
| 	// `seconds` field and a positive or negative `nanos` field. For durations | ||||
| 	// of one second or more, a non-zero value for the `nanos` field must be | ||||
| 	// of the same sign as the `seconds` field. Must be from -999,999,999 | ||||
| 	// to +999,999,999 inclusive. | ||||
| 	Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` | ||||
| } | ||||
|  | ||||
| func (m *Duration) Reset()                    { *m = Duration{} } | ||||
| func (*Duration) ProtoMessage()               {} | ||||
| func (*Duration) Descriptor() ([]byte, []int) { return fileDescriptorDuration, []int{0} } | ||||
| func (*Duration) XXX_WellKnownType() string   { return "Duration" } | ||||
|  | ||||
| func (m *Duration) GetSeconds() int64 { | ||||
| 	if m != nil { | ||||
| 		return m.Seconds | ||||
| 	} | ||||
| 	return 0 | ||||
| } | ||||
|  | ||||
| func (m *Duration) GetNanos() int32 { | ||||
| 	if m != nil { | ||||
| 		return m.Nanos | ||||
| 	} | ||||
| 	return 0 | ||||
| } | ||||
|  | ||||
| func init() { | ||||
| 	proto.RegisterType((*Duration)(nil), "google.protobuf.Duration") | ||||
| } | ||||
| func (this *Duration) Compare(that interface{}) int { | ||||
| 	if that == nil { | ||||
| 		if this == nil { | ||||
| 			return 0 | ||||
| 		} | ||||
| 		return 1 | ||||
| 	} | ||||
|  | ||||
| 	that1, ok := that.(*Duration) | ||||
| 	if !ok { | ||||
| 		that2, ok := that.(Duration) | ||||
| 		if ok { | ||||
| 			that1 = &that2 | ||||
| 		} else { | ||||
| 			return 1 | ||||
| 		} | ||||
| 	} | ||||
| 	if that1 == nil { | ||||
| 		if this == nil { | ||||
| 			return 0 | ||||
| 		} | ||||
| 		return 1 | ||||
| 	} else if this == nil { | ||||
| 		return -1 | ||||
| 	} | ||||
| 	if this.Seconds != that1.Seconds { | ||||
| 		if this.Seconds < that1.Seconds { | ||||
| 			return -1 | ||||
| 		} | ||||
| 		return 1 | ||||
| 	} | ||||
| 	if this.Nanos != that1.Nanos { | ||||
| 		if this.Nanos < that1.Nanos { | ||||
| 			return -1 | ||||
| 		} | ||||
| 		return 1 | ||||
| 	} | ||||
| 	return 0 | ||||
| } | ||||
| func (this *Duration) Equal(that interface{}) bool { | ||||
| 	if that == nil { | ||||
| 		if this == nil { | ||||
| 			return true | ||||
| 		} | ||||
| 		return false | ||||
| 	} | ||||
|  | ||||
| 	that1, ok := that.(*Duration) | ||||
| 	if !ok { | ||||
| 		that2, ok := that.(Duration) | ||||
| 		if ok { | ||||
| 			that1 = &that2 | ||||
| 		} else { | ||||
| 			return false | ||||
| 		} | ||||
| 	} | ||||
| 	if that1 == nil { | ||||
| 		if this == nil { | ||||
| 			return true | ||||
| 		} | ||||
| 		return false | ||||
| 	} else if this == nil { | ||||
| 		return false | ||||
| 	} | ||||
| 	if this.Seconds != that1.Seconds { | ||||
| 		return false | ||||
| 	} | ||||
| 	if this.Nanos != that1.Nanos { | ||||
| 		return false | ||||
| 	} | ||||
| 	return true | ||||
| } | ||||
| func (this *Duration) GoString() string { | ||||
| 	if this == nil { | ||||
| 		return "nil" | ||||
| 	} | ||||
| 	s := make([]string, 0, 6) | ||||
| 	s = append(s, "&types.Duration{") | ||||
| 	s = append(s, "Seconds: "+fmt.Sprintf("%#v", this.Seconds)+",\n") | ||||
| 	s = append(s, "Nanos: "+fmt.Sprintf("%#v", this.Nanos)+",\n") | ||||
| 	s = append(s, "}") | ||||
| 	return strings.Join(s, "") | ||||
| } | ||||
| func valueToGoStringDuration(v interface{}, typ string) string { | ||||
| 	rv := reflect.ValueOf(v) | ||||
| 	if rv.IsNil() { | ||||
| 		return "nil" | ||||
| 	} | ||||
| 	pv := reflect.Indirect(rv).Interface() | ||||
| 	return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) | ||||
| } | ||||
| func extensionToGoStringDuration(m github_com_gogo_protobuf_proto.Message) string { | ||||
| 	e := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(m) | ||||
| 	if e == nil { | ||||
| 		return "nil" | ||||
| 	} | ||||
| 	s := "proto.NewUnsafeXXX_InternalExtensions(map[int32]proto.Extension{" | ||||
| 	keys := make([]int, 0, len(e)) | ||||
| 	for k := range e { | ||||
| 		keys = append(keys, int(k)) | ||||
| 	} | ||||
| 	sort.Ints(keys) | ||||
| 	ss := []string{} | ||||
| 	for _, k := range keys { | ||||
| 		ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) | ||||
| 	} | ||||
| 	s += strings.Join(ss, ",") + "})" | ||||
| 	return s | ||||
| } | ||||
| func (m *Duration) Marshal() (dAtA []byte, err error) { | ||||
| 	size := m.Size() | ||||
| 	dAtA = make([]byte, size) | ||||
| 	n, err := m.MarshalTo(dAtA) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	return dAtA[:n], nil | ||||
| } | ||||
|  | ||||
| func (m *Duration) MarshalTo(dAtA []byte) (int, error) { | ||||
| 	var i int | ||||
| 	_ = i | ||||
| 	var l int | ||||
| 	_ = l | ||||
| 	if m.Seconds != 0 { | ||||
| 		dAtA[i] = 0x8 | ||||
| 		i++ | ||||
| 		i = encodeVarintDuration(dAtA, i, uint64(m.Seconds)) | ||||
| 	} | ||||
| 	if m.Nanos != 0 { | ||||
| 		dAtA[i] = 0x10 | ||||
| 		i++ | ||||
| 		i = encodeVarintDuration(dAtA, i, uint64(m.Nanos)) | ||||
| 	} | ||||
| 	return i, nil | ||||
| } | ||||
|  | ||||
| func encodeFixed64Duration(dAtA []byte, offset int, v uint64) int { | ||||
| 	dAtA[offset] = uint8(v) | ||||
| 	dAtA[offset+1] = uint8(v >> 8) | ||||
| 	dAtA[offset+2] = uint8(v >> 16) | ||||
| 	dAtA[offset+3] = uint8(v >> 24) | ||||
| 	dAtA[offset+4] = uint8(v >> 32) | ||||
| 	dAtA[offset+5] = uint8(v >> 40) | ||||
| 	dAtA[offset+6] = uint8(v >> 48) | ||||
| 	dAtA[offset+7] = uint8(v >> 56) | ||||
| 	return offset + 8 | ||||
| } | ||||
| func encodeFixed32Duration(dAtA []byte, offset int, v uint32) int { | ||||
| 	dAtA[offset] = uint8(v) | ||||
| 	dAtA[offset+1] = uint8(v >> 8) | ||||
| 	dAtA[offset+2] = uint8(v >> 16) | ||||
| 	dAtA[offset+3] = uint8(v >> 24) | ||||
| 	return offset + 4 | ||||
| } | ||||
| func encodeVarintDuration(dAtA []byte, offset int, v uint64) int { | ||||
| 	for v >= 1<<7 { | ||||
| 		dAtA[offset] = uint8(v&0x7f | 0x80) | ||||
| 		v >>= 7 | ||||
| 		offset++ | ||||
| 	} | ||||
| 	dAtA[offset] = uint8(v) | ||||
| 	return offset + 1 | ||||
| } | ||||
| func (m *Duration) Size() (n int) { | ||||
| 	var l int | ||||
| 	_ = l | ||||
| 	if m.Seconds != 0 { | ||||
| 		n += 1 + sovDuration(uint64(m.Seconds)) | ||||
| 	} | ||||
| 	if m.Nanos != 0 { | ||||
| 		n += 1 + sovDuration(uint64(m.Nanos)) | ||||
| 	} | ||||
| 	return n | ||||
| } | ||||
|  | ||||
| func sovDuration(x uint64) (n int) { | ||||
| 	for { | ||||
| 		n++ | ||||
| 		x >>= 7 | ||||
| 		if x == 0 { | ||||
| 			break | ||||
| 		} | ||||
| 	} | ||||
| 	return n | ||||
| } | ||||
| func sozDuration(x uint64) (n int) { | ||||
| 	return sovDuration(uint64((x << 1) ^ uint64((int64(x) >> 63)))) | ||||
| } | ||||
| func (m *Duration) Unmarshal(dAtA []byte) error { | ||||
| 	l := len(dAtA) | ||||
| 	iNdEx := 0 | ||||
| 	for iNdEx < l { | ||||
| 		preIndex := iNdEx | ||||
| 		var wire uint64 | ||||
| 		for shift := uint(0); ; shift += 7 { | ||||
| 			if shift >= 64 { | ||||
| 				return ErrIntOverflowDuration | ||||
| 			} | ||||
| 			if iNdEx >= l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			b := dAtA[iNdEx] | ||||
| 			iNdEx++ | ||||
| 			wire |= (uint64(b) & 0x7F) << shift | ||||
| 			if b < 0x80 { | ||||
| 				break | ||||
| 			} | ||||
| 		} | ||||
| 		fieldNum := int32(wire >> 3) | ||||
| 		wireType := int(wire & 0x7) | ||||
| 		if wireType == 4 { | ||||
| 			return fmt.Errorf("proto: Duration: wiretype end group for non-group") | ||||
| 		} | ||||
| 		if fieldNum <= 0 { | ||||
| 			return fmt.Errorf("proto: Duration: illegal tag %d (wire type %d)", fieldNum, wire) | ||||
| 		} | ||||
| 		switch fieldNum { | ||||
| 		case 1: | ||||
| 			if wireType != 0 { | ||||
| 				return fmt.Errorf("proto: wrong wireType = %d for field Seconds", wireType) | ||||
| 			} | ||||
| 			m.Seconds = 0 | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return ErrIntOverflowDuration | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				b := dAtA[iNdEx] | ||||
| 				iNdEx++ | ||||
| 				m.Seconds |= (int64(b) & 0x7F) << shift | ||||
| 				if b < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 		case 2: | ||||
| 			if wireType != 0 { | ||||
| 				return fmt.Errorf("proto: wrong wireType = %d for field Nanos", wireType) | ||||
| 			} | ||||
| 			m.Nanos = 0 | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return ErrIntOverflowDuration | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				b := dAtA[iNdEx] | ||||
| 				iNdEx++ | ||||
| 				m.Nanos |= (int32(b) & 0x7F) << shift | ||||
| 				if b < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 		default: | ||||
| 			iNdEx = preIndex | ||||
| 			skippy, err := skipDuration(dAtA[iNdEx:]) | ||||
| 			if err != nil { | ||||
| 				return err | ||||
| 			} | ||||
| 			if skippy < 0 { | ||||
| 				return ErrInvalidLengthDuration | ||||
| 			} | ||||
| 			if (iNdEx + skippy) > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			iNdEx += skippy | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	if iNdEx > l { | ||||
| 		return io.ErrUnexpectedEOF | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
| func skipDuration(dAtA []byte) (n int, err error) { | ||||
| 	l := len(dAtA) | ||||
| 	iNdEx := 0 | ||||
| 	for iNdEx < l { | ||||
| 		var wire uint64 | ||||
| 		for shift := uint(0); ; shift += 7 { | ||||
| 			if shift >= 64 { | ||||
| 				return 0, ErrIntOverflowDuration | ||||
| 			} | ||||
| 			if iNdEx >= l { | ||||
| 				return 0, io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			b := dAtA[iNdEx] | ||||
| 			iNdEx++ | ||||
| 			wire |= (uint64(b) & 0x7F) << shift | ||||
| 			if b < 0x80 { | ||||
| 				break | ||||
| 			} | ||||
| 		} | ||||
| 		wireType := int(wire & 0x7) | ||||
| 		switch wireType { | ||||
| 		case 0: | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return 0, ErrIntOverflowDuration | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return 0, io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				iNdEx++ | ||||
| 				if dAtA[iNdEx-1] < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 			return iNdEx, nil | ||||
| 		case 1: | ||||
| 			iNdEx += 8 | ||||
| 			return iNdEx, nil | ||||
| 		case 2: | ||||
| 			var length int | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return 0, ErrIntOverflowDuration | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return 0, io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				b := dAtA[iNdEx] | ||||
| 				iNdEx++ | ||||
| 				length |= (int(b) & 0x7F) << shift | ||||
| 				if b < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 			iNdEx += length | ||||
| 			if length < 0 { | ||||
| 				return 0, ErrInvalidLengthDuration | ||||
| 			} | ||||
| 			return iNdEx, nil | ||||
| 		case 3: | ||||
| 			for { | ||||
| 				var innerWire uint64 | ||||
| 				var start int = iNdEx | ||||
| 				for shift := uint(0); ; shift += 7 { | ||||
| 					if shift >= 64 { | ||||
| 						return 0, ErrIntOverflowDuration | ||||
| 					} | ||||
| 					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 := skipDuration(dAtA[start:]) | ||||
| 				if err != nil { | ||||
| 					return 0, err | ||||
| 				} | ||||
| 				iNdEx = start + next | ||||
| 			} | ||||
| 			return iNdEx, nil | ||||
| 		case 4: | ||||
| 			return iNdEx, nil | ||||
| 		case 5: | ||||
| 			iNdEx += 4 | ||||
| 			return iNdEx, nil | ||||
| 		default: | ||||
| 			return 0, fmt.Errorf("proto: illegal wireType %d", wireType) | ||||
| 		} | ||||
| 	} | ||||
| 	panic("unreachable") | ||||
| } | ||||
|  | ||||
| var ( | ||||
| 	ErrInvalidLengthDuration = fmt.Errorf("proto: negative length found during unmarshaling") | ||||
| 	ErrIntOverflowDuration   = fmt.Errorf("proto: integer overflow") | ||||
| ) | ||||
|  | ||||
| func init() { proto.RegisterFile("duration.proto", fileDescriptorDuration) } | ||||
|  | ||||
| var fileDescriptorDuration = []byte{ | ||||
| 	// 203 bytes of a gzipped FileDescriptorProto | ||||
| 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x4b, 0x29, 0x2d, 0x4a, | ||||
| 	0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x4f, 0xcf, 0xcf, 0x4f, | ||||
| 	0xcf, 0x49, 0x85, 0xf0, 0x92, 0x4a, 0xd3, 0x94, 0xac, 0xb8, 0x38, 0x5c, 0xa0, 0x4a, 0x84, 0x24, | ||||
| 	0xb8, 0xd8, 0x8b, 0x53, 0x93, 0xf3, 0xf3, 0x52, 0x8a, 0x25, 0x18, 0x15, 0x18, 0x35, 0x98, 0x83, | ||||
| 	0x60, 0x5c, 0x21, 0x11, 0x2e, 0xd6, 0xbc, 0xc4, 0xbc, 0xfc, 0x62, 0x09, 0x26, 0x05, 0x46, 0x0d, | ||||
| 	0xd6, 0x20, 0x08, 0xc7, 0xa9, 0xfe, 0xc2, 0x43, 0x39, 0x86, 0x1b, 0x0f, 0xe5, 0x18, 0x3e, 0x3c, | ||||
| 	0x94, 0x63, 0x5c, 0xf1, 0x48, 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, | ||||
| 	0x3c, 0x92, 0x63, 0x7c, 0xf1, 0x48, 0x8e, 0xe1, 0xc3, 0x23, 0x39, 0xc6, 0x15, 0x8f, 0xe5, 0x18, | ||||
| 	0xb9, 0x84, 0x93, 0xf3, 0x73, 0xf5, 0xd0, 0xac, 0x76, 0xe2, 0x85, 0x59, 0x1c, 0x00, 0x12, 0x09, | ||||
| 	0x60, 0x8c, 0x62, 0x2d, 0xa9, 0x2c, 0x48, 0x2d, 0x5e, 0xc0, 0xc8, 0xb8, 0x88, 0x89, 0xd9, 0x3d, | ||||
| 	0xc0, 0x69, 0x15, 0x93, 0x9c, 0x3b, 0x44, 0x4b, 0x00, 0x54, 0x8b, 0x5e, 0x78, 0x6a, 0x4e, 0x8e, | ||||
| 	0x77, 0x5e, 0x7e, 0x79, 0x5e, 0x08, 0x48, 0x65, 0x12, 0x1b, 0xd8, 0x2c, 0x63, 0x40, 0x00, 0x00, | ||||
| 	0x00, 0xff, 0xff, 0xba, 0xfb, 0x15, 0xc9, 0xe6, 0x00, 0x00, 0x00, | ||||
| } | ||||
							
								
								
									
										100
									
								
								vendor/github.com/gogo/protobuf/types/duration_gogo.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										100
									
								
								vendor/github.com/gogo/protobuf/types/duration_gogo.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,100 @@ | ||||
| // Protocol Buffers for Go with Gadgets | ||||
| // | ||||
| // Copyright (c) 2016, The GoGo Authors. All rights reserved. | ||||
| // http://github.com/gogo/protobuf | ||||
| // | ||||
| // Redistribution and use in source and binary forms, with or without | ||||
| // modification, are permitted provided that the following conditions are | ||||
| // met: | ||||
| // | ||||
| //     * Redistributions of source code must retain the above copyright | ||||
| // notice, this list of conditions and the following disclaimer. | ||||
| //     * Redistributions in binary form must reproduce the above | ||||
| // copyright notice, this list of conditions and the following disclaimer | ||||
| // in the documentation and/or other materials provided with the | ||||
| // distribution. | ||||
| // | ||||
| // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||||
| // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||||
| // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||||
| // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||||
| // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||||
| // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||||
| // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||||
| // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||||
| // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||||
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||||
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package types | ||||
|  | ||||
| import ( | ||||
| 	"fmt" | ||||
| 	"time" | ||||
| ) | ||||
|  | ||||
| func NewPopulatedDuration(r interface { | ||||
| 	Int63() int64 | ||||
| }, easy bool) *Duration { | ||||
| 	this := &Duration{} | ||||
| 	maxSecs := time.Hour.Nanoseconds() / 1e9 | ||||
| 	max := 2 * maxSecs | ||||
| 	s := int64(r.Int63()) % max | ||||
| 	s -= maxSecs | ||||
| 	neg := int64(1) | ||||
| 	if s < 0 { | ||||
| 		neg = -1 | ||||
| 	} | ||||
| 	this.Seconds = s | ||||
| 	this.Nanos = int32(neg * (r.Int63() % 1e9)) | ||||
| 	return this | ||||
| } | ||||
|  | ||||
| func (d *Duration) String() string { | ||||
| 	td, err := DurationFromProto(d) | ||||
| 	if err != nil { | ||||
| 		return fmt.Sprintf("(%v)", err) | ||||
| 	} | ||||
| 	return td.String() | ||||
| } | ||||
|  | ||||
| func NewPopulatedStdDuration(r interface { | ||||
| 	Int63() int64 | ||||
| }, easy bool) *time.Duration { | ||||
| 	dur := NewPopulatedDuration(r, easy) | ||||
| 	d, err := DurationFromProto(dur) | ||||
| 	if err != nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	return &d | ||||
| } | ||||
|  | ||||
| func SizeOfStdDuration(d time.Duration) int { | ||||
| 	dur := DurationProto(d) | ||||
| 	return dur.Size() | ||||
| } | ||||
|  | ||||
| func StdDurationMarshal(d time.Duration) ([]byte, error) { | ||||
| 	size := SizeOfStdDuration(d) | ||||
| 	buf := make([]byte, size) | ||||
| 	_, err := StdDurationMarshalTo(d, buf) | ||||
| 	return buf, err | ||||
| } | ||||
|  | ||||
| func StdDurationMarshalTo(d time.Duration, data []byte) (int, error) { | ||||
| 	dur := DurationProto(d) | ||||
| 	return dur.MarshalTo(data) | ||||
| } | ||||
|  | ||||
| func StdDurationUnmarshal(d *time.Duration, data []byte) error { | ||||
| 	dur := &Duration{} | ||||
| 	if err := dur.Unmarshal(data); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	dd, err := DurationFromProto(dur) | ||||
| 	if err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	*d = dd | ||||
| 	return nil | ||||
| } | ||||
							
								
								
									
										478
									
								
								vendor/github.com/gogo/protobuf/types/empty.pb.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										478
									
								
								vendor/github.com/gogo/protobuf/types/empty.pb.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,478 @@ | ||||
| // Code generated by protoc-gen-gogo. | ||||
| // source: empty.proto | ||||
| // DO NOT EDIT! | ||||
|  | ||||
| /* | ||||
| Package types is a generated protocol buffer package. | ||||
|  | ||||
| It is generated from these files: | ||||
| 	empty.proto | ||||
|  | ||||
| It has these top-level messages: | ||||
| 	Empty | ||||
| */ | ||||
| package types | ||||
|  | ||||
| import proto "github.com/gogo/protobuf/proto" | ||||
| import fmt "fmt" | ||||
| import math "math" | ||||
|  | ||||
| import strings "strings" | ||||
| import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" | ||||
| import sort "sort" | ||||
| import strconv "strconv" | ||||
| import reflect "reflect" | ||||
|  | ||||
| import io "io" | ||||
|  | ||||
| // Reference imports to suppress errors if they are not otherwise used. | ||||
| var _ = proto.Marshal | ||||
| var _ = fmt.Errorf | ||||
| var _ = math.Inf | ||||
|  | ||||
| // This is a compile-time assertion to ensure that this generated file | ||||
| // 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 | ||||
|  | ||||
| // A generic empty message that you can re-use to avoid defining duplicated | ||||
| // empty messages in your APIs. A typical example is to use it as the request | ||||
| // or the response type of an API method. For instance: | ||||
| // | ||||
| //     service Foo { | ||||
| //       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); | ||||
| //     } | ||||
| // | ||||
| // The JSON representation for `Empty` is empty JSON object `{}`. | ||||
| type Empty struct { | ||||
| } | ||||
|  | ||||
| func (m *Empty) Reset()                    { *m = Empty{} } | ||||
| func (*Empty) ProtoMessage()               {} | ||||
| func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptorEmpty, []int{0} } | ||||
| func (*Empty) XXX_WellKnownType() string   { return "Empty" } | ||||
|  | ||||
| func init() { | ||||
| 	proto.RegisterType((*Empty)(nil), "google.protobuf.Empty") | ||||
| } | ||||
| func (this *Empty) Compare(that interface{}) int { | ||||
| 	if that == nil { | ||||
| 		if this == nil { | ||||
| 			return 0 | ||||
| 		} | ||||
| 		return 1 | ||||
| 	} | ||||
|  | ||||
| 	that1, ok := that.(*Empty) | ||||
| 	if !ok { | ||||
| 		that2, ok := that.(Empty) | ||||
| 		if ok { | ||||
| 			that1 = &that2 | ||||
| 		} else { | ||||
| 			return 1 | ||||
| 		} | ||||
| 	} | ||||
| 	if that1 == nil { | ||||
| 		if this == nil { | ||||
| 			return 0 | ||||
| 		} | ||||
| 		return 1 | ||||
| 	} else if this == nil { | ||||
| 		return -1 | ||||
| 	} | ||||
| 	return 0 | ||||
| } | ||||
| func (this *Empty) Equal(that interface{}) bool { | ||||
| 	if that == nil { | ||||
| 		if this == nil { | ||||
| 			return true | ||||
| 		} | ||||
| 		return false | ||||
| 	} | ||||
|  | ||||
| 	that1, ok := that.(*Empty) | ||||
| 	if !ok { | ||||
| 		that2, ok := that.(Empty) | ||||
| 		if ok { | ||||
| 			that1 = &that2 | ||||
| 		} else { | ||||
| 			return false | ||||
| 		} | ||||
| 	} | ||||
| 	if that1 == nil { | ||||
| 		if this == nil { | ||||
| 			return true | ||||
| 		} | ||||
| 		return false | ||||
| 	} else if this == nil { | ||||
| 		return false | ||||
| 	} | ||||
| 	return true | ||||
| } | ||||
| func (this *Empty) GoString() string { | ||||
| 	if this == nil { | ||||
| 		return "nil" | ||||
| 	} | ||||
| 	s := make([]string, 0, 4) | ||||
| 	s = append(s, "&types.Empty{") | ||||
| 	s = append(s, "}") | ||||
| 	return strings.Join(s, "") | ||||
| } | ||||
| func valueToGoStringEmpty(v interface{}, typ string) string { | ||||
| 	rv := reflect.ValueOf(v) | ||||
| 	if rv.IsNil() { | ||||
| 		return "nil" | ||||
| 	} | ||||
| 	pv := reflect.Indirect(rv).Interface() | ||||
| 	return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) | ||||
| } | ||||
| func extensionToGoStringEmpty(m github_com_gogo_protobuf_proto.Message) string { | ||||
| 	e := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(m) | ||||
| 	if e == nil { | ||||
| 		return "nil" | ||||
| 	} | ||||
| 	s := "proto.NewUnsafeXXX_InternalExtensions(map[int32]proto.Extension{" | ||||
| 	keys := make([]int, 0, len(e)) | ||||
| 	for k := range e { | ||||
| 		keys = append(keys, int(k)) | ||||
| 	} | ||||
| 	sort.Ints(keys) | ||||
| 	ss := []string{} | ||||
| 	for _, k := range keys { | ||||
| 		ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) | ||||
| 	} | ||||
| 	s += strings.Join(ss, ",") + "})" | ||||
| 	return s | ||||
| } | ||||
| func (m *Empty) Marshal() (dAtA []byte, err error) { | ||||
| 	size := m.Size() | ||||
| 	dAtA = make([]byte, size) | ||||
| 	n, err := m.MarshalTo(dAtA) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	return dAtA[:n], nil | ||||
| } | ||||
|  | ||||
| func (m *Empty) MarshalTo(dAtA []byte) (int, error) { | ||||
| 	var i int | ||||
| 	_ = i | ||||
| 	var l int | ||||
| 	_ = l | ||||
| 	return i, nil | ||||
| } | ||||
|  | ||||
| func encodeFixed64Empty(dAtA []byte, offset int, v uint64) int { | ||||
| 	dAtA[offset] = uint8(v) | ||||
| 	dAtA[offset+1] = uint8(v >> 8) | ||||
| 	dAtA[offset+2] = uint8(v >> 16) | ||||
| 	dAtA[offset+3] = uint8(v >> 24) | ||||
| 	dAtA[offset+4] = uint8(v >> 32) | ||||
| 	dAtA[offset+5] = uint8(v >> 40) | ||||
| 	dAtA[offset+6] = uint8(v >> 48) | ||||
| 	dAtA[offset+7] = uint8(v >> 56) | ||||
| 	return offset + 8 | ||||
| } | ||||
| func encodeFixed32Empty(dAtA []byte, offset int, v uint32) int { | ||||
| 	dAtA[offset] = uint8(v) | ||||
| 	dAtA[offset+1] = uint8(v >> 8) | ||||
| 	dAtA[offset+2] = uint8(v >> 16) | ||||
| 	dAtA[offset+3] = uint8(v >> 24) | ||||
| 	return offset + 4 | ||||
| } | ||||
| func encodeVarintEmpty(dAtA []byte, offset int, v uint64) int { | ||||
| 	for v >= 1<<7 { | ||||
| 		dAtA[offset] = uint8(v&0x7f | 0x80) | ||||
| 		v >>= 7 | ||||
| 		offset++ | ||||
| 	} | ||||
| 	dAtA[offset] = uint8(v) | ||||
| 	return offset + 1 | ||||
| } | ||||
| func NewPopulatedEmpty(r randyEmpty, easy bool) *Empty { | ||||
| 	this := &Empty{} | ||||
| 	if !easy && r.Intn(10) != 0 { | ||||
| 	} | ||||
| 	return this | ||||
| } | ||||
|  | ||||
| type randyEmpty interface { | ||||
| 	Float32() float32 | ||||
| 	Float64() float64 | ||||
| 	Int63() int64 | ||||
| 	Int31() int32 | ||||
| 	Uint32() uint32 | ||||
| 	Intn(n int) int | ||||
| } | ||||
|  | ||||
| func randUTF8RuneEmpty(r randyEmpty) rune { | ||||
| 	ru := r.Intn(62) | ||||
| 	if ru < 10 { | ||||
| 		return rune(ru + 48) | ||||
| 	} else if ru < 36 { | ||||
| 		return rune(ru + 55) | ||||
| 	} | ||||
| 	return rune(ru + 61) | ||||
| } | ||||
| func randStringEmpty(r randyEmpty) string { | ||||
| 	v1 := r.Intn(100) | ||||
| 	tmps := make([]rune, v1) | ||||
| 	for i := 0; i < v1; i++ { | ||||
| 		tmps[i] = randUTF8RuneEmpty(r) | ||||
| 	} | ||||
| 	return string(tmps) | ||||
| } | ||||
| func randUnrecognizedEmpty(r randyEmpty, maxFieldNumber int) (dAtA []byte) { | ||||
| 	l := r.Intn(5) | ||||
| 	for i := 0; i < l; i++ { | ||||
| 		wire := r.Intn(4) | ||||
| 		if wire == 3 { | ||||
| 			wire = 5 | ||||
| 		} | ||||
| 		fieldNumber := maxFieldNumber + r.Intn(100) | ||||
| 		dAtA = randFieldEmpty(dAtA, r, fieldNumber, wire) | ||||
| 	} | ||||
| 	return dAtA | ||||
| } | ||||
| func randFieldEmpty(dAtA []byte, r randyEmpty, fieldNumber int, wire int) []byte { | ||||
| 	key := uint32(fieldNumber)<<3 | uint32(wire) | ||||
| 	switch wire { | ||||
| 	case 0: | ||||
| 		dAtA = encodeVarintPopulateEmpty(dAtA, uint64(key)) | ||||
| 		v2 := r.Int63() | ||||
| 		if r.Intn(2) == 0 { | ||||
| 			v2 *= -1 | ||||
| 		} | ||||
| 		dAtA = encodeVarintPopulateEmpty(dAtA, uint64(v2)) | ||||
| 	case 1: | ||||
| 		dAtA = encodeVarintPopulateEmpty(dAtA, uint64(key)) | ||||
| 		dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) | ||||
| 	case 2: | ||||
| 		dAtA = encodeVarintPopulateEmpty(dAtA, uint64(key)) | ||||
| 		ll := r.Intn(100) | ||||
| 		dAtA = encodeVarintPopulateEmpty(dAtA, uint64(ll)) | ||||
| 		for j := 0; j < ll; j++ { | ||||
| 			dAtA = append(dAtA, byte(r.Intn(256))) | ||||
| 		} | ||||
| 	default: | ||||
| 		dAtA = encodeVarintPopulateEmpty(dAtA, uint64(key)) | ||||
| 		dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) | ||||
| 	} | ||||
| 	return dAtA | ||||
| } | ||||
| func encodeVarintPopulateEmpty(dAtA []byte, v uint64) []byte { | ||||
| 	for v >= 1<<7 { | ||||
| 		dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) | ||||
| 		v >>= 7 | ||||
| 	} | ||||
| 	dAtA = append(dAtA, uint8(v)) | ||||
| 	return dAtA | ||||
| } | ||||
| func (m *Empty) Size() (n int) { | ||||
| 	var l int | ||||
| 	_ = l | ||||
| 	return n | ||||
| } | ||||
|  | ||||
| func sovEmpty(x uint64) (n int) { | ||||
| 	for { | ||||
| 		n++ | ||||
| 		x >>= 7 | ||||
| 		if x == 0 { | ||||
| 			break | ||||
| 		} | ||||
| 	} | ||||
| 	return n | ||||
| } | ||||
| func sozEmpty(x uint64) (n int) { | ||||
| 	return sovEmpty(uint64((x << 1) ^ uint64((int64(x) >> 63)))) | ||||
| } | ||||
| func (this *Empty) String() string { | ||||
| 	if this == nil { | ||||
| 		return "nil" | ||||
| 	} | ||||
| 	s := strings.Join([]string{`&Empty{`, | ||||
| 		`}`, | ||||
| 	}, "") | ||||
| 	return s | ||||
| } | ||||
| func valueToStringEmpty(v interface{}) string { | ||||
| 	rv := reflect.ValueOf(v) | ||||
| 	if rv.IsNil() { | ||||
| 		return "nil" | ||||
| 	} | ||||
| 	pv := reflect.Indirect(rv).Interface() | ||||
| 	return fmt.Sprintf("*%v", pv) | ||||
| } | ||||
| func (m *Empty) Unmarshal(dAtA []byte) error { | ||||
| 	l := len(dAtA) | ||||
| 	iNdEx := 0 | ||||
| 	for iNdEx < l { | ||||
| 		preIndex := iNdEx | ||||
| 		var wire uint64 | ||||
| 		for shift := uint(0); ; shift += 7 { | ||||
| 			if shift >= 64 { | ||||
| 				return ErrIntOverflowEmpty | ||||
| 			} | ||||
| 			if iNdEx >= l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			b := dAtA[iNdEx] | ||||
| 			iNdEx++ | ||||
| 			wire |= (uint64(b) & 0x7F) << shift | ||||
| 			if b < 0x80 { | ||||
| 				break | ||||
| 			} | ||||
| 		} | ||||
| 		fieldNum := int32(wire >> 3) | ||||
| 		wireType := int(wire & 0x7) | ||||
| 		if wireType == 4 { | ||||
| 			return fmt.Errorf("proto: Empty: wiretype end group for non-group") | ||||
| 		} | ||||
| 		if fieldNum <= 0 { | ||||
| 			return fmt.Errorf("proto: Empty: illegal tag %d (wire type %d)", fieldNum, wire) | ||||
| 		} | ||||
| 		switch fieldNum { | ||||
| 		default: | ||||
| 			iNdEx = preIndex | ||||
| 			skippy, err := skipEmpty(dAtA[iNdEx:]) | ||||
| 			if err != nil { | ||||
| 				return err | ||||
| 			} | ||||
| 			if skippy < 0 { | ||||
| 				return ErrInvalidLengthEmpty | ||||
| 			} | ||||
| 			if (iNdEx + skippy) > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			iNdEx += skippy | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	if iNdEx > l { | ||||
| 		return io.ErrUnexpectedEOF | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
| func skipEmpty(dAtA []byte) (n int, err error) { | ||||
| 	l := len(dAtA) | ||||
| 	iNdEx := 0 | ||||
| 	for iNdEx < l { | ||||
| 		var wire uint64 | ||||
| 		for shift := uint(0); ; shift += 7 { | ||||
| 			if shift >= 64 { | ||||
| 				return 0, ErrIntOverflowEmpty | ||||
| 			} | ||||
| 			if iNdEx >= l { | ||||
| 				return 0, io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			b := dAtA[iNdEx] | ||||
| 			iNdEx++ | ||||
| 			wire |= (uint64(b) & 0x7F) << shift | ||||
| 			if b < 0x80 { | ||||
| 				break | ||||
| 			} | ||||
| 		} | ||||
| 		wireType := int(wire & 0x7) | ||||
| 		switch wireType { | ||||
| 		case 0: | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return 0, ErrIntOverflowEmpty | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return 0, io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				iNdEx++ | ||||
| 				if dAtA[iNdEx-1] < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 			return iNdEx, nil | ||||
| 		case 1: | ||||
| 			iNdEx += 8 | ||||
| 			return iNdEx, nil | ||||
| 		case 2: | ||||
| 			var length int | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return 0, ErrIntOverflowEmpty | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return 0, io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				b := dAtA[iNdEx] | ||||
| 				iNdEx++ | ||||
| 				length |= (int(b) & 0x7F) << shift | ||||
| 				if b < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 			iNdEx += length | ||||
| 			if length < 0 { | ||||
| 				return 0, ErrInvalidLengthEmpty | ||||
| 			} | ||||
| 			return iNdEx, nil | ||||
| 		case 3: | ||||
| 			for { | ||||
| 				var innerWire uint64 | ||||
| 				var start int = iNdEx | ||||
| 				for shift := uint(0); ; shift += 7 { | ||||
| 					if shift >= 64 { | ||||
| 						return 0, ErrIntOverflowEmpty | ||||
| 					} | ||||
| 					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 := skipEmpty(dAtA[start:]) | ||||
| 				if err != nil { | ||||
| 					return 0, err | ||||
| 				} | ||||
| 				iNdEx = start + next | ||||
| 			} | ||||
| 			return iNdEx, nil | ||||
| 		case 4: | ||||
| 			return iNdEx, nil | ||||
| 		case 5: | ||||
| 			iNdEx += 4 | ||||
| 			return iNdEx, nil | ||||
| 		default: | ||||
| 			return 0, fmt.Errorf("proto: illegal wireType %d", wireType) | ||||
| 		} | ||||
| 	} | ||||
| 	panic("unreachable") | ||||
| } | ||||
|  | ||||
| var ( | ||||
| 	ErrInvalidLengthEmpty = fmt.Errorf("proto: negative length found during unmarshaling") | ||||
| 	ErrIntOverflowEmpty   = fmt.Errorf("proto: integer overflow") | ||||
| ) | ||||
|  | ||||
| func init() { proto.RegisterFile("empty.proto", fileDescriptorEmpty) } | ||||
|  | ||||
| var fileDescriptorEmpty = []byte{ | ||||
| 	// 172 bytes of a gzipped FileDescriptorProto | ||||
| 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x4e, 0xcd, 0x2d, 0x28, | ||||
| 	0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x4f, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0x85, | ||||
| 	0xf0, 0x92, 0x4a, 0xd3, 0x94, 0xd8, 0xb9, 0x58, 0x5d, 0x41, 0xf2, 0x4e, 0xed, 0x8c, 0x17, 0x1e, | ||||
| 	0xca, 0x31, 0xdc, 0x78, 0x28, 0xc7, 0xf0, 0xe1, 0xa1, 0x1c, 0xe3, 0x8f, 0x87, 0x72, 0x8c, 0x0d, | ||||
| 	0x8f, 0xe4, 0x18, 0x57, 0x3c, 0x92, 0x63, 0x3c, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, | ||||
| 	0x07, 0x8f, 0xe4, 0x18, 0x5f, 0x3c, 0x92, 0x63, 0xf8, 0x00, 0x12, 0x7f, 0x2c, 0xc7, 0xc8, 0x25, | ||||
| 	0x9c, 0x9c, 0x9f, 0xab, 0x87, 0x66, 0xa0, 0x13, 0x17, 0xd8, 0xb8, 0x00, 0x10, 0x37, 0x80, 0x31, | ||||
| 	0x8a, 0xb5, 0xa4, 0xb2, 0x20, 0xb5, 0x78, 0x01, 0x23, 0xe3, 0x0f, 0x46, 0xc6, 0x45, 0x4c, 0xcc, | ||||
| 	0xee, 0x01, 0x4e, 0xab, 0x98, 0xe4, 0xdc, 0x21, 0x5a, 0x02, 0xa0, 0x5a, 0xf4, 0xc2, 0x53, 0x73, | ||||
| 	0x72, 0xbc, 0xf3, 0xf2, 0xcb, 0xf3, 0x42, 0x40, 0x8a, 0x93, 0xd8, 0xc0, 0x66, 0x19, 0x03, 0x02, | ||||
| 	0x00, 0x00, 0xff, 0xff, 0x97, 0x6c, 0x95, 0xdd, 0xb9, 0x00, 0x00, 0x00, | ||||
| } | ||||
							
								
								
									
										759
									
								
								vendor/github.com/gogo/protobuf/types/field_mask.pb.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										759
									
								
								vendor/github.com/gogo/protobuf/types/field_mask.pb.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,759 @@ | ||||
| // Code generated by protoc-gen-gogo. | ||||
| // source: field_mask.proto | ||||
| // DO NOT EDIT! | ||||
|  | ||||
| /* | ||||
| Package types is a generated protocol buffer package. | ||||
|  | ||||
| It is generated from these files: | ||||
| 	field_mask.proto | ||||
|  | ||||
| It has these top-level messages: | ||||
| 	FieldMask | ||||
| */ | ||||
| package types | ||||
|  | ||||
| import proto "github.com/gogo/protobuf/proto" | ||||
| import fmt "fmt" | ||||
| import math "math" | ||||
|  | ||||
| import strings "strings" | ||||
| import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" | ||||
| import sort "sort" | ||||
| import strconv "strconv" | ||||
| import reflect "reflect" | ||||
|  | ||||
| import io "io" | ||||
|  | ||||
| // Reference imports to suppress errors if they are not otherwise used. | ||||
| var _ = proto.Marshal | ||||
| var _ = fmt.Errorf | ||||
| var _ = math.Inf | ||||
|  | ||||
| // This is a compile-time assertion to ensure that this generated file | ||||
| // 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 | ||||
|  | ||||
| // `FieldMask` represents a set of symbolic field paths, for example: | ||||
| // | ||||
| //     paths: "f.a" | ||||
| //     paths: "f.b.d" | ||||
| // | ||||
| // Here `f` represents a field in some root message, `a` and `b` | ||||
| // fields in the message found in `f`, and `d` a field found in the | ||||
| // message in `f.b`. | ||||
| // | ||||
| // Field masks are used to specify a subset of fields that should be | ||||
| // returned by a get operation or modified by an update operation. | ||||
| // Field masks also have a custom JSON encoding (see below). | ||||
| // | ||||
| // # Field Masks in Projections | ||||
| // | ||||
| // When used in the context of a projection, a response message or | ||||
| // sub-message is filtered by the API to only contain those fields as | ||||
| // specified in the mask. For example, if the mask in the previous | ||||
| // example is applied to a response message as follows: | ||||
| // | ||||
| //     f { | ||||
| //       a : 22 | ||||
| //       b { | ||||
| //         d : 1 | ||||
| //         x : 2 | ||||
| //       } | ||||
| //       y : 13 | ||||
| //     } | ||||
| //     z: 8 | ||||
| // | ||||
| // The result will not contain specific values for fields x,y and z | ||||
| // (their value will be set to the default, and omitted in proto text | ||||
| // output): | ||||
| // | ||||
| // | ||||
| //     f { | ||||
| //       a : 22 | ||||
| //       b { | ||||
| //         d : 1 | ||||
| //       } | ||||
| //     } | ||||
| // | ||||
| // A repeated field is not allowed except at the last position of a | ||||
| // field mask. | ||||
| // | ||||
| // If a FieldMask object is not present in a get operation, the | ||||
| // operation applies to all fields (as if a FieldMask of all fields | ||||
| // had been specified). | ||||
| // | ||||
| // Note that a field mask does not necessarily apply to the | ||||
| // top-level response message. In case of a REST get operation, the | ||||
| // field mask applies directly to the response, but in case of a REST | ||||
| // list operation, the mask instead applies to each individual message | ||||
| // in the returned resource list. In case of a REST custom method, | ||||
| // other definitions may be used. Where the mask applies will be | ||||
| // clearly documented together with its declaration in the API.  In | ||||
| // any case, the effect on the returned resource/resources is required | ||||
| // behavior for APIs. | ||||
| // | ||||
| // # Field Masks in Update Operations | ||||
| // | ||||
| // A field mask in update operations specifies which fields of the | ||||
| // targeted resource are going to be updated. The API is required | ||||
| // to only change the values of the fields as specified in the mask | ||||
| // and leave the others untouched. If a resource is passed in to | ||||
| // describe the updated values, the API ignores the values of all | ||||
| // fields not covered by the mask. | ||||
| // | ||||
| // If a repeated field is specified for an update operation, the existing | ||||
| // repeated values in the target resource will be overwritten by the new values. | ||||
| // Note that a repeated field is only allowed in the last position of a field | ||||
| // mask. | ||||
| // | ||||
| // If a sub-message is specified in the last position of the field mask for an | ||||
| // update operation, then the existing sub-message in the target resource is | ||||
| // overwritten. Given the target message: | ||||
| // | ||||
| //     f { | ||||
| //       b { | ||||
| //         d : 1 | ||||
| //         x : 2 | ||||
| //       } | ||||
| //       c : 1 | ||||
| //     } | ||||
| // | ||||
| // And an update message: | ||||
| // | ||||
| //     f { | ||||
| //       b { | ||||
| //         d : 10 | ||||
| //       } | ||||
| //     } | ||||
| // | ||||
| // then if the field mask is: | ||||
| // | ||||
| //  paths: "f.b" | ||||
| // | ||||
| // then the result will be: | ||||
| // | ||||
| //     f { | ||||
| //       b { | ||||
| //         d : 10 | ||||
| //       } | ||||
| //       c : 1 | ||||
| //     } | ||||
| // | ||||
| // However, if the update mask was: | ||||
| // | ||||
| //  paths: "f.b.d" | ||||
| // | ||||
| // then the result would be: | ||||
| // | ||||
| //     f { | ||||
| //       b { | ||||
| //         d : 10 | ||||
| //         x : 2 | ||||
| //       } | ||||
| //       c : 1 | ||||
| //     } | ||||
| // | ||||
| // In order to reset a field's value to the default, the field must | ||||
| // be in the mask and set to the default value in the provided resource. | ||||
| // Hence, in order to reset all fields of a resource, provide a default | ||||
| // instance of the resource and set all fields in the mask, or do | ||||
| // not provide a mask as described below. | ||||
| // | ||||
| // If a field mask is not present on update, the operation applies to | ||||
| // all fields (as if a field mask of all fields has been specified). | ||||
| // Note that in the presence of schema evolution, this may mean that | ||||
| // fields the client does not know and has therefore not filled into | ||||
| // the request will be reset to their default. If this is unwanted | ||||
| // behavior, a specific service may require a client to always specify | ||||
| // a field mask, producing an error if not. | ||||
| // | ||||
| // As with get operations, the location of the resource which | ||||
| // describes the updated values in the request message depends on the | ||||
| // operation kind. In any case, the effect of the field mask is | ||||
| // required to be honored by the API. | ||||
| // | ||||
| // ## Considerations for HTTP REST | ||||
| // | ||||
| // The HTTP kind of an update operation which uses a field mask must | ||||
| // be set to PATCH instead of PUT in order to satisfy HTTP semantics | ||||
| // (PUT must only be used for full updates). | ||||
| // | ||||
| // # JSON Encoding of Field Masks | ||||
| // | ||||
| // In JSON, a field mask is encoded as a single string where paths are | ||||
| // separated by a comma. Fields name in each path are converted | ||||
| // to/from lower-camel naming conventions. | ||||
| // | ||||
| // As an example, consider the following message declarations: | ||||
| // | ||||
| //     message Profile { | ||||
| //       User user = 1; | ||||
| //       Photo photo = 2; | ||||
| //     } | ||||
| //     message User { | ||||
| //       string display_name = 1; | ||||
| //       string address = 2; | ||||
| //     } | ||||
| // | ||||
| // In proto a field mask for `Profile` may look as such: | ||||
| // | ||||
| //     mask { | ||||
| //       paths: "user.display_name" | ||||
| //       paths: "photo" | ||||
| //     } | ||||
| // | ||||
| // In JSON, the same mask is represented as below: | ||||
| // | ||||
| //     { | ||||
| //       mask: "user.displayName,photo" | ||||
| //     } | ||||
| // | ||||
| // # Field Masks and Oneof Fields | ||||
| // | ||||
| // Field masks treat fields in oneofs just as regular fields. Consider the | ||||
| // following message: | ||||
| // | ||||
| //     message SampleMessage { | ||||
| //       oneof test_oneof { | ||||
| //         string name = 4; | ||||
| //         SubMessage sub_message = 9; | ||||
| //       } | ||||
| //     } | ||||
| // | ||||
| // The field mask can be: | ||||
| // | ||||
| //     mask { | ||||
| //       paths: "name" | ||||
| //     } | ||||
| // | ||||
| // Or: | ||||
| // | ||||
| //     mask { | ||||
| //       paths: "sub_message" | ||||
| //     } | ||||
| // | ||||
| // Note that oneof type names ("test_oneof" in this case) cannot be used in | ||||
| // paths. | ||||
| type FieldMask struct { | ||||
| 	// The set of field mask paths. | ||||
| 	Paths []string `protobuf:"bytes,1,rep,name=paths" json:"paths,omitempty"` | ||||
| } | ||||
|  | ||||
| func (m *FieldMask) Reset()                    { *m = FieldMask{} } | ||||
| func (*FieldMask) ProtoMessage()               {} | ||||
| func (*FieldMask) Descriptor() ([]byte, []int) { return fileDescriptorFieldMask, []int{0} } | ||||
|  | ||||
| func (m *FieldMask) GetPaths() []string { | ||||
| 	if m != nil { | ||||
| 		return m.Paths | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| func init() { | ||||
| 	proto.RegisterType((*FieldMask)(nil), "google.protobuf.FieldMask") | ||||
| } | ||||
| func (this *FieldMask) Compare(that interface{}) int { | ||||
| 	if that == nil { | ||||
| 		if this == nil { | ||||
| 			return 0 | ||||
| 		} | ||||
| 		return 1 | ||||
| 	} | ||||
|  | ||||
| 	that1, ok := that.(*FieldMask) | ||||
| 	if !ok { | ||||
| 		that2, ok := that.(FieldMask) | ||||
| 		if ok { | ||||
| 			that1 = &that2 | ||||
| 		} else { | ||||
| 			return 1 | ||||
| 		} | ||||
| 	} | ||||
| 	if that1 == nil { | ||||
| 		if this == nil { | ||||
| 			return 0 | ||||
| 		} | ||||
| 		return 1 | ||||
| 	} else if this == nil { | ||||
| 		return -1 | ||||
| 	} | ||||
| 	if len(this.Paths) != len(that1.Paths) { | ||||
| 		if len(this.Paths) < len(that1.Paths) { | ||||
| 			return -1 | ||||
| 		} | ||||
| 		return 1 | ||||
| 	} | ||||
| 	for i := range this.Paths { | ||||
| 		if this.Paths[i] != that1.Paths[i] { | ||||
| 			if this.Paths[i] < that1.Paths[i] { | ||||
| 				return -1 | ||||
| 			} | ||||
| 			return 1 | ||||
| 		} | ||||
| 	} | ||||
| 	return 0 | ||||
| } | ||||
| func (this *FieldMask) Equal(that interface{}) bool { | ||||
| 	if that == nil { | ||||
| 		if this == nil { | ||||
| 			return true | ||||
| 		} | ||||
| 		return false | ||||
| 	} | ||||
|  | ||||
| 	that1, ok := that.(*FieldMask) | ||||
| 	if !ok { | ||||
| 		that2, ok := that.(FieldMask) | ||||
| 		if ok { | ||||
| 			that1 = &that2 | ||||
| 		} else { | ||||
| 			return false | ||||
| 		} | ||||
| 	} | ||||
| 	if that1 == nil { | ||||
| 		if this == nil { | ||||
| 			return true | ||||
| 		} | ||||
| 		return false | ||||
| 	} else if this == nil { | ||||
| 		return false | ||||
| 	} | ||||
| 	if len(this.Paths) != len(that1.Paths) { | ||||
| 		return false | ||||
| 	} | ||||
| 	for i := range this.Paths { | ||||
| 		if this.Paths[i] != that1.Paths[i] { | ||||
| 			return false | ||||
| 		} | ||||
| 	} | ||||
| 	return true | ||||
| } | ||||
| func (this *FieldMask) GoString() string { | ||||
| 	if this == nil { | ||||
| 		return "nil" | ||||
| 	} | ||||
| 	s := make([]string, 0, 5) | ||||
| 	s = append(s, "&types.FieldMask{") | ||||
| 	s = append(s, "Paths: "+fmt.Sprintf("%#v", this.Paths)+",\n") | ||||
| 	s = append(s, "}") | ||||
| 	return strings.Join(s, "") | ||||
| } | ||||
| func valueToGoStringFieldMask(v interface{}, typ string) string { | ||||
| 	rv := reflect.ValueOf(v) | ||||
| 	if rv.IsNil() { | ||||
| 		return "nil" | ||||
| 	} | ||||
| 	pv := reflect.Indirect(rv).Interface() | ||||
| 	return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) | ||||
| } | ||||
| func extensionToGoStringFieldMask(m github_com_gogo_protobuf_proto.Message) string { | ||||
| 	e := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(m) | ||||
| 	if e == nil { | ||||
| 		return "nil" | ||||
| 	} | ||||
| 	s := "proto.NewUnsafeXXX_InternalExtensions(map[int32]proto.Extension{" | ||||
| 	keys := make([]int, 0, len(e)) | ||||
| 	for k := range e { | ||||
| 		keys = append(keys, int(k)) | ||||
| 	} | ||||
| 	sort.Ints(keys) | ||||
| 	ss := []string{} | ||||
| 	for _, k := range keys { | ||||
| 		ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) | ||||
| 	} | ||||
| 	s += strings.Join(ss, ",") + "})" | ||||
| 	return s | ||||
| } | ||||
| func (m *FieldMask) Marshal() (dAtA []byte, err error) { | ||||
| 	size := m.Size() | ||||
| 	dAtA = make([]byte, size) | ||||
| 	n, err := m.MarshalTo(dAtA) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	return dAtA[:n], nil | ||||
| } | ||||
|  | ||||
| func (m *FieldMask) MarshalTo(dAtA []byte) (int, error) { | ||||
| 	var i int | ||||
| 	_ = i | ||||
| 	var l int | ||||
| 	_ = l | ||||
| 	if len(m.Paths) > 0 { | ||||
| 		for _, s := range m.Paths { | ||||
| 			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) | ||||
| 		} | ||||
| 	} | ||||
| 	return i, nil | ||||
| } | ||||
|  | ||||
| func encodeFixed64FieldMask(dAtA []byte, offset int, v uint64) int { | ||||
| 	dAtA[offset] = uint8(v) | ||||
| 	dAtA[offset+1] = uint8(v >> 8) | ||||
| 	dAtA[offset+2] = uint8(v >> 16) | ||||
| 	dAtA[offset+3] = uint8(v >> 24) | ||||
| 	dAtA[offset+4] = uint8(v >> 32) | ||||
| 	dAtA[offset+5] = uint8(v >> 40) | ||||
| 	dAtA[offset+6] = uint8(v >> 48) | ||||
| 	dAtA[offset+7] = uint8(v >> 56) | ||||
| 	return offset + 8 | ||||
| } | ||||
| func encodeFixed32FieldMask(dAtA []byte, offset int, v uint32) int { | ||||
| 	dAtA[offset] = uint8(v) | ||||
| 	dAtA[offset+1] = uint8(v >> 8) | ||||
| 	dAtA[offset+2] = uint8(v >> 16) | ||||
| 	dAtA[offset+3] = uint8(v >> 24) | ||||
| 	return offset + 4 | ||||
| } | ||||
| func encodeVarintFieldMask(dAtA []byte, offset int, v uint64) int { | ||||
| 	for v >= 1<<7 { | ||||
| 		dAtA[offset] = uint8(v&0x7f | 0x80) | ||||
| 		v >>= 7 | ||||
| 		offset++ | ||||
| 	} | ||||
| 	dAtA[offset] = uint8(v) | ||||
| 	return offset + 1 | ||||
| } | ||||
| func NewPopulatedFieldMask(r randyFieldMask, easy bool) *FieldMask { | ||||
| 	this := &FieldMask{} | ||||
| 	v1 := r.Intn(10) | ||||
| 	this.Paths = make([]string, v1) | ||||
| 	for i := 0; i < v1; i++ { | ||||
| 		this.Paths[i] = string(randStringFieldMask(r)) | ||||
| 	} | ||||
| 	if !easy && r.Intn(10) != 0 { | ||||
| 	} | ||||
| 	return this | ||||
| } | ||||
|  | ||||
| type randyFieldMask interface { | ||||
| 	Float32() float32 | ||||
| 	Float64() float64 | ||||
| 	Int63() int64 | ||||
| 	Int31() int32 | ||||
| 	Uint32() uint32 | ||||
| 	Intn(n int) int | ||||
| } | ||||
|  | ||||
| func randUTF8RuneFieldMask(r randyFieldMask) rune { | ||||
| 	ru := r.Intn(62) | ||||
| 	if ru < 10 { | ||||
| 		return rune(ru + 48) | ||||
| 	} else if ru < 36 { | ||||
| 		return rune(ru + 55) | ||||
| 	} | ||||
| 	return rune(ru + 61) | ||||
| } | ||||
| func randStringFieldMask(r randyFieldMask) string { | ||||
| 	v2 := r.Intn(100) | ||||
| 	tmps := make([]rune, v2) | ||||
| 	for i := 0; i < v2; i++ { | ||||
| 		tmps[i] = randUTF8RuneFieldMask(r) | ||||
| 	} | ||||
| 	return string(tmps) | ||||
| } | ||||
| func randUnrecognizedFieldMask(r randyFieldMask, maxFieldNumber int) (dAtA []byte) { | ||||
| 	l := r.Intn(5) | ||||
| 	for i := 0; i < l; i++ { | ||||
| 		wire := r.Intn(4) | ||||
| 		if wire == 3 { | ||||
| 			wire = 5 | ||||
| 		} | ||||
| 		fieldNumber := maxFieldNumber + r.Intn(100) | ||||
| 		dAtA = randFieldFieldMask(dAtA, r, fieldNumber, wire) | ||||
| 	} | ||||
| 	return dAtA | ||||
| } | ||||
| func randFieldFieldMask(dAtA []byte, r randyFieldMask, fieldNumber int, wire int) []byte { | ||||
| 	key := uint32(fieldNumber)<<3 | uint32(wire) | ||||
| 	switch wire { | ||||
| 	case 0: | ||||
| 		dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(key)) | ||||
| 		v3 := r.Int63() | ||||
| 		if r.Intn(2) == 0 { | ||||
| 			v3 *= -1 | ||||
| 		} | ||||
| 		dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(v3)) | ||||
| 	case 1: | ||||
| 		dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(key)) | ||||
| 		dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) | ||||
| 	case 2: | ||||
| 		dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(key)) | ||||
| 		ll := r.Intn(100) | ||||
| 		dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(ll)) | ||||
| 		for j := 0; j < ll; j++ { | ||||
| 			dAtA = append(dAtA, byte(r.Intn(256))) | ||||
| 		} | ||||
| 	default: | ||||
| 		dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(key)) | ||||
| 		dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) | ||||
| 	} | ||||
| 	return dAtA | ||||
| } | ||||
| func encodeVarintPopulateFieldMask(dAtA []byte, v uint64) []byte { | ||||
| 	for v >= 1<<7 { | ||||
| 		dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) | ||||
| 		v >>= 7 | ||||
| 	} | ||||
| 	dAtA = append(dAtA, uint8(v)) | ||||
| 	return dAtA | ||||
| } | ||||
| func (m *FieldMask) Size() (n int) { | ||||
| 	var l int | ||||
| 	_ = l | ||||
| 	if len(m.Paths) > 0 { | ||||
| 		for _, s := range m.Paths { | ||||
| 			l = len(s) | ||||
| 			n += 1 + l + sovFieldMask(uint64(l)) | ||||
| 		} | ||||
| 	} | ||||
| 	return n | ||||
| } | ||||
|  | ||||
| func sovFieldMask(x uint64) (n int) { | ||||
| 	for { | ||||
| 		n++ | ||||
| 		x >>= 7 | ||||
| 		if x == 0 { | ||||
| 			break | ||||
| 		} | ||||
| 	} | ||||
| 	return n | ||||
| } | ||||
| func sozFieldMask(x uint64) (n int) { | ||||
| 	return sovFieldMask(uint64((x << 1) ^ uint64((int64(x) >> 63)))) | ||||
| } | ||||
| func (this *FieldMask) String() string { | ||||
| 	if this == nil { | ||||
| 		return "nil" | ||||
| 	} | ||||
| 	s := strings.Join([]string{`&FieldMask{`, | ||||
| 		`Paths:` + fmt.Sprintf("%v", this.Paths) + `,`, | ||||
| 		`}`, | ||||
| 	}, "") | ||||
| 	return s | ||||
| } | ||||
| func valueToStringFieldMask(v interface{}) string { | ||||
| 	rv := reflect.ValueOf(v) | ||||
| 	if rv.IsNil() { | ||||
| 		return "nil" | ||||
| 	} | ||||
| 	pv := reflect.Indirect(rv).Interface() | ||||
| 	return fmt.Sprintf("*%v", pv) | ||||
| } | ||||
| func (m *FieldMask) Unmarshal(dAtA []byte) error { | ||||
| 	l := len(dAtA) | ||||
| 	iNdEx := 0 | ||||
| 	for iNdEx < l { | ||||
| 		preIndex := iNdEx | ||||
| 		var wire uint64 | ||||
| 		for shift := uint(0); ; shift += 7 { | ||||
| 			if shift >= 64 { | ||||
| 				return ErrIntOverflowFieldMask | ||||
| 			} | ||||
| 			if iNdEx >= l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			b := dAtA[iNdEx] | ||||
| 			iNdEx++ | ||||
| 			wire |= (uint64(b) & 0x7F) << shift | ||||
| 			if b < 0x80 { | ||||
| 				break | ||||
| 			} | ||||
| 		} | ||||
| 		fieldNum := int32(wire >> 3) | ||||
| 		wireType := int(wire & 0x7) | ||||
| 		if wireType == 4 { | ||||
| 			return fmt.Errorf("proto: FieldMask: wiretype end group for non-group") | ||||
| 		} | ||||
| 		if fieldNum <= 0 { | ||||
| 			return fmt.Errorf("proto: FieldMask: illegal tag %d (wire type %d)", fieldNum, wire) | ||||
| 		} | ||||
| 		switch fieldNum { | ||||
| 		case 1: | ||||
| 			if wireType != 2 { | ||||
| 				return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType) | ||||
| 			} | ||||
| 			var stringLen uint64 | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return ErrIntOverflowFieldMask | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				b := dAtA[iNdEx] | ||||
| 				iNdEx++ | ||||
| 				stringLen |= (uint64(b) & 0x7F) << shift | ||||
| 				if b < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 			intStringLen := int(stringLen) | ||||
| 			if intStringLen < 0 { | ||||
| 				return ErrInvalidLengthFieldMask | ||||
| 			} | ||||
| 			postIndex := iNdEx + intStringLen | ||||
| 			if postIndex > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			m.Paths = append(m.Paths, string(dAtA[iNdEx:postIndex])) | ||||
| 			iNdEx = postIndex | ||||
| 		default: | ||||
| 			iNdEx = preIndex | ||||
| 			skippy, err := skipFieldMask(dAtA[iNdEx:]) | ||||
| 			if err != nil { | ||||
| 				return err | ||||
| 			} | ||||
| 			if skippy < 0 { | ||||
| 				return ErrInvalidLengthFieldMask | ||||
| 			} | ||||
| 			if (iNdEx + skippy) > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			iNdEx += skippy | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	if iNdEx > l { | ||||
| 		return io.ErrUnexpectedEOF | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
| func skipFieldMask(dAtA []byte) (n int, err error) { | ||||
| 	l := len(dAtA) | ||||
| 	iNdEx := 0 | ||||
| 	for iNdEx < l { | ||||
| 		var wire uint64 | ||||
| 		for shift := uint(0); ; shift += 7 { | ||||
| 			if shift >= 64 { | ||||
| 				return 0, ErrIntOverflowFieldMask | ||||
| 			} | ||||
| 			if iNdEx >= l { | ||||
| 				return 0, io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			b := dAtA[iNdEx] | ||||
| 			iNdEx++ | ||||
| 			wire |= (uint64(b) & 0x7F) << shift | ||||
| 			if b < 0x80 { | ||||
| 				break | ||||
| 			} | ||||
| 		} | ||||
| 		wireType := int(wire & 0x7) | ||||
| 		switch wireType { | ||||
| 		case 0: | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return 0, ErrIntOverflowFieldMask | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return 0, io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				iNdEx++ | ||||
| 				if dAtA[iNdEx-1] < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 			return iNdEx, nil | ||||
| 		case 1: | ||||
| 			iNdEx += 8 | ||||
| 			return iNdEx, nil | ||||
| 		case 2: | ||||
| 			var length int | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return 0, ErrIntOverflowFieldMask | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return 0, io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				b := dAtA[iNdEx] | ||||
| 				iNdEx++ | ||||
| 				length |= (int(b) & 0x7F) << shift | ||||
| 				if b < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 			iNdEx += length | ||||
| 			if length < 0 { | ||||
| 				return 0, ErrInvalidLengthFieldMask | ||||
| 			} | ||||
| 			return iNdEx, nil | ||||
| 		case 3: | ||||
| 			for { | ||||
| 				var innerWire uint64 | ||||
| 				var start int = iNdEx | ||||
| 				for shift := uint(0); ; shift += 7 { | ||||
| 					if shift >= 64 { | ||||
| 						return 0, ErrIntOverflowFieldMask | ||||
| 					} | ||||
| 					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 := skipFieldMask(dAtA[start:]) | ||||
| 				if err != nil { | ||||
| 					return 0, err | ||||
| 				} | ||||
| 				iNdEx = start + next | ||||
| 			} | ||||
| 			return iNdEx, nil | ||||
| 		case 4: | ||||
| 			return iNdEx, nil | ||||
| 		case 5: | ||||
| 			iNdEx += 4 | ||||
| 			return iNdEx, nil | ||||
| 		default: | ||||
| 			return 0, fmt.Errorf("proto: illegal wireType %d", wireType) | ||||
| 		} | ||||
| 	} | ||||
| 	panic("unreachable") | ||||
| } | ||||
|  | ||||
| var ( | ||||
| 	ErrInvalidLengthFieldMask = fmt.Errorf("proto: negative length found during unmarshaling") | ||||
| 	ErrIntOverflowFieldMask   = fmt.Errorf("proto: integer overflow") | ||||
| ) | ||||
|  | ||||
| func init() { proto.RegisterFile("field_mask.proto", fileDescriptorFieldMask) } | ||||
|  | ||||
| var fileDescriptorFieldMask = []byte{ | ||||
| 	// 196 bytes of a gzipped FileDescriptorProto | ||||
| 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0x48, 0xcb, 0x4c, 0xcd, | ||||
| 	0x49, 0x89, 0xcf, 0x4d, 0x2c, 0xce, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x4f, 0xcf, | ||||
| 	0xcf, 0x4f, 0xcf, 0x49, 0x85, 0xf0, 0x92, 0x4a, 0xd3, 0x94, 0x14, 0xb9, 0x38, 0xdd, 0x40, 0x8a, | ||||
| 	0x7c, 0x13, 0x8b, 0xb3, 0x85, 0x44, 0xb8, 0x58, 0x0b, 0x12, 0x4b, 0x32, 0x8a, 0x25, 0x18, 0x15, | ||||
| 	0x98, 0x35, 0x38, 0x83, 0x20, 0x1c, 0xa7, 0x0e, 0xc6, 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, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x2f, | ||||
| 	0x1e, 0xc9, 0x31, 0x7c, 0x00, 0x89, 0x3f, 0x96, 0x63, 0xe4, 0x12, 0x4e, 0xce, 0xcf, 0xd5, 0x43, | ||||
| 	0xb3, 0xca, 0x89, 0x0f, 0x6e, 0x51, 0x00, 0x48, 0x28, 0x80, 0x31, 0x8a, 0xb5, 0xa4, 0xb2, 0x20, | ||||
| 	0xb5, 0x78, 0x01, 0x23, 0xe3, 0x22, 0x26, 0x66, 0xf7, 0x00, 0xa7, 0x55, 0x4c, 0x72, 0xee, 0x10, | ||||
| 	0x3d, 0x01, 0x50, 0x3d, 0x7a, 0xe1, 0xa9, 0x39, 0x39, 0xde, 0x79, 0xf9, 0xe5, 0x79, 0x21, 0x20, | ||||
| 	0x95, 0x49, 0x6c, 0x60, 0xc3, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xea, 0xb1, 0x3a, 0xd5, | ||||
| 	0xd9, 0x00, 0x00, 0x00, | ||||
| } | ||||
							
								
								
									
										1908
									
								
								vendor/github.com/gogo/protobuf/types/struct.pb.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1908
									
								
								vendor/github.com/gogo/protobuf/types/struct.pb.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										123
									
								
								vendor/github.com/gogo/protobuf/types/timestamp.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										123
									
								
								vendor/github.com/gogo/protobuf/types/timestamp.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,123 @@ | ||||
| // Go support for Protocol Buffers - Google's data interchange format | ||||
| // | ||||
| // Copyright 2016 The Go Authors.  All rights reserved. | ||||
| // https://github.com/golang/protobuf | ||||
| // | ||||
| // Redistribution and use in source and binary forms, with or without | ||||
| // modification, are permitted provided that the following conditions are | ||||
| // met: | ||||
| // | ||||
| //     * Redistributions of source code must retain the above copyright | ||||
| // notice, this list of conditions and the following disclaimer. | ||||
| //     * Redistributions in binary form must reproduce the above | ||||
| // copyright notice, this list of conditions and the following disclaimer | ||||
| // in the documentation and/or other materials provided with the | ||||
| // distribution. | ||||
| //     * Neither the name of Google Inc. nor the names of its | ||||
| // contributors may be used to endorse or promote products derived from | ||||
| // this software without specific prior written permission. | ||||
| // | ||||
| // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||||
| // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||||
| // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||||
| // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||||
| // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||||
| // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||||
| // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||||
| // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||||
| // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||||
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||||
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package types | ||||
|  | ||||
| // This file implements operations on google.protobuf.Timestamp. | ||||
|  | ||||
| import ( | ||||
| 	"errors" | ||||
| 	"fmt" | ||||
| 	"time" | ||||
| ) | ||||
|  | ||||
| const ( | ||||
| 	// Seconds field of the earliest valid Timestamp. | ||||
| 	// This is time.Date(1, 1, 1, 0, 0, 0, 0, time.UTC).Unix(). | ||||
| 	minValidSeconds = -62135596800 | ||||
| 	// Seconds field just after the latest valid Timestamp. | ||||
| 	// This is time.Date(10000, 1, 1, 0, 0, 0, 0, time.UTC).Unix(). | ||||
| 	maxValidSeconds = 253402300800 | ||||
| ) | ||||
|  | ||||
| // validateTimestamp determines whether a Timestamp is valid. | ||||
| // A valid timestamp represents a time in the range | ||||
| // [0001-01-01, 10000-01-01) and has a Nanos field | ||||
| // in the range [0, 1e9). | ||||
| // | ||||
| // If the Timestamp is valid, validateTimestamp returns nil. | ||||
| // Otherwise, it returns an error that describes | ||||
| // the problem. | ||||
| // | ||||
| // Every valid Timestamp can be represented by a time.Time, but the converse is not true. | ||||
| func validateTimestamp(ts *Timestamp) error { | ||||
| 	if ts == nil { | ||||
| 		return errors.New("timestamp: nil Timestamp") | ||||
| 	} | ||||
| 	if ts.Seconds < minValidSeconds { | ||||
| 		return fmt.Errorf("timestamp: %#v before 0001-01-01", ts) | ||||
| 	} | ||||
| 	if ts.Seconds >= maxValidSeconds { | ||||
| 		return fmt.Errorf("timestamp: %#v after 10000-01-01", ts) | ||||
| 	} | ||||
| 	if ts.Nanos < 0 || ts.Nanos >= 1e9 { | ||||
| 		return fmt.Errorf("timestamp: %#v: nanos not in range [0, 1e9)", ts) | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| // TimestampFromProto converts a google.protobuf.Timestamp proto to a time.Time. | ||||
| // It returns an error if the argument is invalid. | ||||
| // | ||||
| // Unlike most Go functions, if Timestamp returns an error, the first return value | ||||
| // is not the zero time.Time. Instead, it is the value obtained from the | ||||
| // time.Unix function when passed the contents of the Timestamp, in the UTC | ||||
| // locale. This may or may not be a meaningful time; many invalid Timestamps | ||||
| // do map to valid time.Times. | ||||
| // | ||||
| // A nil Timestamp returns an error. The first return value in that case is | ||||
| // undefined. | ||||
| func TimestampFromProto(ts *Timestamp) (time.Time, error) { | ||||
| 	// Don't return the zero value on error, because corresponds to a valid | ||||
| 	// timestamp. Instead return whatever time.Unix gives us. | ||||
| 	var t time.Time | ||||
| 	if ts == nil { | ||||
| 		t = time.Unix(0, 0).UTC() // treat nil like the empty Timestamp | ||||
| 	} else { | ||||
| 		t = time.Unix(ts.Seconds, int64(ts.Nanos)).UTC() | ||||
| 	} | ||||
| 	return t, validateTimestamp(ts) | ||||
| } | ||||
|  | ||||
| // TimestampProto converts the time.Time to a google.protobuf.Timestamp proto. | ||||
| // It returns an error if the resulting Timestamp is invalid. | ||||
| func TimestampProto(t time.Time) (*Timestamp, error) { | ||||
| 	seconds := t.Unix() | ||||
| 	nanos := int32(t.Sub(time.Unix(seconds, 0))) | ||||
| 	ts := &Timestamp{ | ||||
| 		Seconds: seconds, | ||||
| 		Nanos:   nanos, | ||||
| 	} | ||||
| 	if err := validateTimestamp(ts); err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	return ts, nil | ||||
| } | ||||
|  | ||||
| // TimestampString returns the RFC 3339 string for valid Timestamps. For invalid | ||||
| // Timestamps, it returns an error message in parentheses. | ||||
| func TimestampString(ts *Timestamp) string { | ||||
| 	t, err := TimestampFromProto(ts) | ||||
| 	if err != nil { | ||||
| 		return fmt.Sprintf("(%v)", err) | ||||
| 	} | ||||
| 	return t.Format(time.RFC3339Nano) | ||||
| } | ||||
							
								
								
									
										527
									
								
								vendor/github.com/gogo/protobuf/types/timestamp.pb.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										527
									
								
								vendor/github.com/gogo/protobuf/types/timestamp.pb.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,527 @@ | ||||
| // Code generated by protoc-gen-gogo. | ||||
| // source: timestamp.proto | ||||
| // DO NOT EDIT! | ||||
|  | ||||
| /* | ||||
| 	Package types is a generated protocol buffer package. | ||||
|  | ||||
| 	It is generated from these files: | ||||
| 		timestamp.proto | ||||
|  | ||||
| 	It has these top-level messages: | ||||
| 		Timestamp | ||||
| */ | ||||
| package types | ||||
|  | ||||
| import proto "github.com/gogo/protobuf/proto" | ||||
| import fmt "fmt" | ||||
| import math "math" | ||||
|  | ||||
| import strings "strings" | ||||
| import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" | ||||
| import sort "sort" | ||||
| import strconv "strconv" | ||||
| import reflect "reflect" | ||||
|  | ||||
| import io "io" | ||||
|  | ||||
| // Reference imports to suppress errors if they are not otherwise used. | ||||
| var _ = proto.Marshal | ||||
| var _ = fmt.Errorf | ||||
| var _ = math.Inf | ||||
|  | ||||
| // This is a compile-time assertion to ensure that this generated file | ||||
| // 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 | ||||
|  | ||||
| // A Timestamp represents a point in time independent of any time zone | ||||
| // or calendar, represented as seconds and fractions of seconds at | ||||
| // nanosecond resolution in UTC Epoch time. It is encoded using the | ||||
| // Proleptic Gregorian Calendar which extends the Gregorian calendar | ||||
| // backwards to year one. It is encoded assuming all minutes are 60 | ||||
| // seconds long, i.e. leap seconds are "smeared" so that no leap second | ||||
| // table is needed for interpretation. Range is from | ||||
| // 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. | ||||
| // By restricting to that range, we ensure that we can convert to | ||||
| // and from  RFC 3339 date strings. | ||||
| // See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). | ||||
| // | ||||
| // Example 1: Compute Timestamp from POSIX `time()`. | ||||
| // | ||||
| //     Timestamp timestamp; | ||||
| //     timestamp.set_seconds(time(NULL)); | ||||
| //     timestamp.set_nanos(0); | ||||
| // | ||||
| // Example 2: Compute Timestamp from POSIX `gettimeofday()`. | ||||
| // | ||||
| //     struct timeval tv; | ||||
| //     gettimeofday(&tv, NULL); | ||||
| // | ||||
| //     Timestamp timestamp; | ||||
| //     timestamp.set_seconds(tv.tv_sec); | ||||
| //     timestamp.set_nanos(tv.tv_usec * 1000); | ||||
| // | ||||
| // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. | ||||
| // | ||||
| //     FILETIME ft; | ||||
| //     GetSystemTimeAsFileTime(&ft); | ||||
| //     UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; | ||||
| // | ||||
| //     // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z | ||||
| //     // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. | ||||
| //     Timestamp timestamp; | ||||
| //     timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); | ||||
| //     timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); | ||||
| // | ||||
| // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. | ||||
| // | ||||
| //     long millis = System.currentTimeMillis(); | ||||
| // | ||||
| //     Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) | ||||
| //         .setNanos((int) ((millis % 1000) * 1000000)).build(); | ||||
| // | ||||
| // | ||||
| // Example 5: Compute Timestamp from current time in Python. | ||||
| // | ||||
| //     now = time.time() | ||||
| //     seconds = int(now) | ||||
| //     nanos = int((now - seconds) * 10**9) | ||||
| //     timestamp = Timestamp(seconds=seconds, nanos=nanos) | ||||
| // | ||||
| // | ||||
| type Timestamp struct { | ||||
| 	// Represents seconds of UTC time since Unix epoch | ||||
| 	// 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to | ||||
| 	// 9999-12-31T23:59:59Z inclusive. | ||||
| 	Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` | ||||
| 	// Non-negative fractions of a second at nanosecond resolution. Negative | ||||
| 	// second values with fractions must still have non-negative nanos values | ||||
| 	// that count forward in time. Must be from 0 to 999,999,999 | ||||
| 	// inclusive. | ||||
| 	Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` | ||||
| } | ||||
|  | ||||
| func (m *Timestamp) Reset()                    { *m = Timestamp{} } | ||||
| func (*Timestamp) ProtoMessage()               {} | ||||
| func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptorTimestamp, []int{0} } | ||||
| func (*Timestamp) XXX_WellKnownType() string   { return "Timestamp" } | ||||
|  | ||||
| func (m *Timestamp) GetSeconds() int64 { | ||||
| 	if m != nil { | ||||
| 		return m.Seconds | ||||
| 	} | ||||
| 	return 0 | ||||
| } | ||||
|  | ||||
| func (m *Timestamp) GetNanos() int32 { | ||||
| 	if m != nil { | ||||
| 		return m.Nanos | ||||
| 	} | ||||
| 	return 0 | ||||
| } | ||||
|  | ||||
| func init() { | ||||
| 	proto.RegisterType((*Timestamp)(nil), "google.protobuf.Timestamp") | ||||
| } | ||||
| func (this *Timestamp) Compare(that interface{}) int { | ||||
| 	if that == nil { | ||||
| 		if this == nil { | ||||
| 			return 0 | ||||
| 		} | ||||
| 		return 1 | ||||
| 	} | ||||
|  | ||||
| 	that1, ok := that.(*Timestamp) | ||||
| 	if !ok { | ||||
| 		that2, ok := that.(Timestamp) | ||||
| 		if ok { | ||||
| 			that1 = &that2 | ||||
| 		} else { | ||||
| 			return 1 | ||||
| 		} | ||||
| 	} | ||||
| 	if that1 == nil { | ||||
| 		if this == nil { | ||||
| 			return 0 | ||||
| 		} | ||||
| 		return 1 | ||||
| 	} else if this == nil { | ||||
| 		return -1 | ||||
| 	} | ||||
| 	if this.Seconds != that1.Seconds { | ||||
| 		if this.Seconds < that1.Seconds { | ||||
| 			return -1 | ||||
| 		} | ||||
| 		return 1 | ||||
| 	} | ||||
| 	if this.Nanos != that1.Nanos { | ||||
| 		if this.Nanos < that1.Nanos { | ||||
| 			return -1 | ||||
| 		} | ||||
| 		return 1 | ||||
| 	} | ||||
| 	return 0 | ||||
| } | ||||
| func (this *Timestamp) Equal(that interface{}) bool { | ||||
| 	if that == nil { | ||||
| 		if this == nil { | ||||
| 			return true | ||||
| 		} | ||||
| 		return false | ||||
| 	} | ||||
|  | ||||
| 	that1, ok := that.(*Timestamp) | ||||
| 	if !ok { | ||||
| 		that2, ok := that.(Timestamp) | ||||
| 		if ok { | ||||
| 			that1 = &that2 | ||||
| 		} else { | ||||
| 			return false | ||||
| 		} | ||||
| 	} | ||||
| 	if that1 == nil { | ||||
| 		if this == nil { | ||||
| 			return true | ||||
| 		} | ||||
| 		return false | ||||
| 	} else if this == nil { | ||||
| 		return false | ||||
| 	} | ||||
| 	if this.Seconds != that1.Seconds { | ||||
| 		return false | ||||
| 	} | ||||
| 	if this.Nanos != that1.Nanos { | ||||
| 		return false | ||||
| 	} | ||||
| 	return true | ||||
| } | ||||
| func (this *Timestamp) GoString() string { | ||||
| 	if this == nil { | ||||
| 		return "nil" | ||||
| 	} | ||||
| 	s := make([]string, 0, 6) | ||||
| 	s = append(s, "&types.Timestamp{") | ||||
| 	s = append(s, "Seconds: "+fmt.Sprintf("%#v", this.Seconds)+",\n") | ||||
| 	s = append(s, "Nanos: "+fmt.Sprintf("%#v", this.Nanos)+",\n") | ||||
| 	s = append(s, "}") | ||||
| 	return strings.Join(s, "") | ||||
| } | ||||
| func valueToGoStringTimestamp(v interface{}, typ string) string { | ||||
| 	rv := reflect.ValueOf(v) | ||||
| 	if rv.IsNil() { | ||||
| 		return "nil" | ||||
| 	} | ||||
| 	pv := reflect.Indirect(rv).Interface() | ||||
| 	return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) | ||||
| } | ||||
| func extensionToGoStringTimestamp(m github_com_gogo_protobuf_proto.Message) string { | ||||
| 	e := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(m) | ||||
| 	if e == nil { | ||||
| 		return "nil" | ||||
| 	} | ||||
| 	s := "proto.NewUnsafeXXX_InternalExtensions(map[int32]proto.Extension{" | ||||
| 	keys := make([]int, 0, len(e)) | ||||
| 	for k := range e { | ||||
| 		keys = append(keys, int(k)) | ||||
| 	} | ||||
| 	sort.Ints(keys) | ||||
| 	ss := []string{} | ||||
| 	for _, k := range keys { | ||||
| 		ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) | ||||
| 	} | ||||
| 	s += strings.Join(ss, ",") + "})" | ||||
| 	return s | ||||
| } | ||||
| func (m *Timestamp) Marshal() (dAtA []byte, err error) { | ||||
| 	size := m.Size() | ||||
| 	dAtA = make([]byte, size) | ||||
| 	n, err := m.MarshalTo(dAtA) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	return dAtA[:n], nil | ||||
| } | ||||
|  | ||||
| func (m *Timestamp) MarshalTo(dAtA []byte) (int, error) { | ||||
| 	var i int | ||||
| 	_ = i | ||||
| 	var l int | ||||
| 	_ = l | ||||
| 	if m.Seconds != 0 { | ||||
| 		dAtA[i] = 0x8 | ||||
| 		i++ | ||||
| 		i = encodeVarintTimestamp(dAtA, i, uint64(m.Seconds)) | ||||
| 	} | ||||
| 	if m.Nanos != 0 { | ||||
| 		dAtA[i] = 0x10 | ||||
| 		i++ | ||||
| 		i = encodeVarintTimestamp(dAtA, i, uint64(m.Nanos)) | ||||
| 	} | ||||
| 	return i, nil | ||||
| } | ||||
|  | ||||
| func encodeFixed64Timestamp(dAtA []byte, offset int, v uint64) int { | ||||
| 	dAtA[offset] = uint8(v) | ||||
| 	dAtA[offset+1] = uint8(v >> 8) | ||||
| 	dAtA[offset+2] = uint8(v >> 16) | ||||
| 	dAtA[offset+3] = uint8(v >> 24) | ||||
| 	dAtA[offset+4] = uint8(v >> 32) | ||||
| 	dAtA[offset+5] = uint8(v >> 40) | ||||
| 	dAtA[offset+6] = uint8(v >> 48) | ||||
| 	dAtA[offset+7] = uint8(v >> 56) | ||||
| 	return offset + 8 | ||||
| } | ||||
| func encodeFixed32Timestamp(dAtA []byte, offset int, v uint32) int { | ||||
| 	dAtA[offset] = uint8(v) | ||||
| 	dAtA[offset+1] = uint8(v >> 8) | ||||
| 	dAtA[offset+2] = uint8(v >> 16) | ||||
| 	dAtA[offset+3] = uint8(v >> 24) | ||||
| 	return offset + 4 | ||||
| } | ||||
| func encodeVarintTimestamp(dAtA []byte, offset int, v uint64) int { | ||||
| 	for v >= 1<<7 { | ||||
| 		dAtA[offset] = uint8(v&0x7f | 0x80) | ||||
| 		v >>= 7 | ||||
| 		offset++ | ||||
| 	} | ||||
| 	dAtA[offset] = uint8(v) | ||||
| 	return offset + 1 | ||||
| } | ||||
| func (m *Timestamp) Size() (n int) { | ||||
| 	var l int | ||||
| 	_ = l | ||||
| 	if m.Seconds != 0 { | ||||
| 		n += 1 + sovTimestamp(uint64(m.Seconds)) | ||||
| 	} | ||||
| 	if m.Nanos != 0 { | ||||
| 		n += 1 + sovTimestamp(uint64(m.Nanos)) | ||||
| 	} | ||||
| 	return n | ||||
| } | ||||
|  | ||||
| func sovTimestamp(x uint64) (n int) { | ||||
| 	for { | ||||
| 		n++ | ||||
| 		x >>= 7 | ||||
| 		if x == 0 { | ||||
| 			break | ||||
| 		} | ||||
| 	} | ||||
| 	return n | ||||
| } | ||||
| func sozTimestamp(x uint64) (n int) { | ||||
| 	return sovTimestamp(uint64((x << 1) ^ uint64((int64(x) >> 63)))) | ||||
| } | ||||
| func (m *Timestamp) Unmarshal(dAtA []byte) error { | ||||
| 	l := len(dAtA) | ||||
| 	iNdEx := 0 | ||||
| 	for iNdEx < l { | ||||
| 		preIndex := iNdEx | ||||
| 		var wire uint64 | ||||
| 		for shift := uint(0); ; shift += 7 { | ||||
| 			if shift >= 64 { | ||||
| 				return ErrIntOverflowTimestamp | ||||
| 			} | ||||
| 			if iNdEx >= l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			b := dAtA[iNdEx] | ||||
| 			iNdEx++ | ||||
| 			wire |= (uint64(b) & 0x7F) << shift | ||||
| 			if b < 0x80 { | ||||
| 				break | ||||
| 			} | ||||
| 		} | ||||
| 		fieldNum := int32(wire >> 3) | ||||
| 		wireType := int(wire & 0x7) | ||||
| 		if wireType == 4 { | ||||
| 			return fmt.Errorf("proto: Timestamp: wiretype end group for non-group") | ||||
| 		} | ||||
| 		if fieldNum <= 0 { | ||||
| 			return fmt.Errorf("proto: Timestamp: illegal tag %d (wire type %d)", fieldNum, wire) | ||||
| 		} | ||||
| 		switch fieldNum { | ||||
| 		case 1: | ||||
| 			if wireType != 0 { | ||||
| 				return fmt.Errorf("proto: wrong wireType = %d for field Seconds", wireType) | ||||
| 			} | ||||
| 			m.Seconds = 0 | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return ErrIntOverflowTimestamp | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				b := dAtA[iNdEx] | ||||
| 				iNdEx++ | ||||
| 				m.Seconds |= (int64(b) & 0x7F) << shift | ||||
| 				if b < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 		case 2: | ||||
| 			if wireType != 0 { | ||||
| 				return fmt.Errorf("proto: wrong wireType = %d for field Nanos", wireType) | ||||
| 			} | ||||
| 			m.Nanos = 0 | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return ErrIntOverflowTimestamp | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				b := dAtA[iNdEx] | ||||
| 				iNdEx++ | ||||
| 				m.Nanos |= (int32(b) & 0x7F) << shift | ||||
| 				if b < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 		default: | ||||
| 			iNdEx = preIndex | ||||
| 			skippy, err := skipTimestamp(dAtA[iNdEx:]) | ||||
| 			if err != nil { | ||||
| 				return err | ||||
| 			} | ||||
| 			if skippy < 0 { | ||||
| 				return ErrInvalidLengthTimestamp | ||||
| 			} | ||||
| 			if (iNdEx + skippy) > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			iNdEx += skippy | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	if iNdEx > l { | ||||
| 		return io.ErrUnexpectedEOF | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
| func skipTimestamp(dAtA []byte) (n int, err error) { | ||||
| 	l := len(dAtA) | ||||
| 	iNdEx := 0 | ||||
| 	for iNdEx < l { | ||||
| 		var wire uint64 | ||||
| 		for shift := uint(0); ; shift += 7 { | ||||
| 			if shift >= 64 { | ||||
| 				return 0, ErrIntOverflowTimestamp | ||||
| 			} | ||||
| 			if iNdEx >= l { | ||||
| 				return 0, io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			b := dAtA[iNdEx] | ||||
| 			iNdEx++ | ||||
| 			wire |= (uint64(b) & 0x7F) << shift | ||||
| 			if b < 0x80 { | ||||
| 				break | ||||
| 			} | ||||
| 		} | ||||
| 		wireType := int(wire & 0x7) | ||||
| 		switch wireType { | ||||
| 		case 0: | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return 0, ErrIntOverflowTimestamp | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return 0, io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				iNdEx++ | ||||
| 				if dAtA[iNdEx-1] < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 			return iNdEx, nil | ||||
| 		case 1: | ||||
| 			iNdEx += 8 | ||||
| 			return iNdEx, nil | ||||
| 		case 2: | ||||
| 			var length int | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return 0, ErrIntOverflowTimestamp | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return 0, io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				b := dAtA[iNdEx] | ||||
| 				iNdEx++ | ||||
| 				length |= (int(b) & 0x7F) << shift | ||||
| 				if b < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 			iNdEx += length | ||||
| 			if length < 0 { | ||||
| 				return 0, ErrInvalidLengthTimestamp | ||||
| 			} | ||||
| 			return iNdEx, nil | ||||
| 		case 3: | ||||
| 			for { | ||||
| 				var innerWire uint64 | ||||
| 				var start int = iNdEx | ||||
| 				for shift := uint(0); ; shift += 7 { | ||||
| 					if shift >= 64 { | ||||
| 						return 0, ErrIntOverflowTimestamp | ||||
| 					} | ||||
| 					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 := skipTimestamp(dAtA[start:]) | ||||
| 				if err != nil { | ||||
| 					return 0, err | ||||
| 				} | ||||
| 				iNdEx = start + next | ||||
| 			} | ||||
| 			return iNdEx, nil | ||||
| 		case 4: | ||||
| 			return iNdEx, nil | ||||
| 		case 5: | ||||
| 			iNdEx += 4 | ||||
| 			return iNdEx, nil | ||||
| 		default: | ||||
| 			return 0, fmt.Errorf("proto: illegal wireType %d", wireType) | ||||
| 		} | ||||
| 	} | ||||
| 	panic("unreachable") | ||||
| } | ||||
|  | ||||
| var ( | ||||
| 	ErrInvalidLengthTimestamp = fmt.Errorf("proto: negative length found during unmarshaling") | ||||
| 	ErrIntOverflowTimestamp   = fmt.Errorf("proto: integer overflow") | ||||
| ) | ||||
|  | ||||
| func init() { proto.RegisterFile("timestamp.proto", fileDescriptorTimestamp) } | ||||
|  | ||||
| var fileDescriptorTimestamp = []byte{ | ||||
| 	// 208 bytes of a gzipped FileDescriptorProto | ||||
| 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x2f, 0xc9, 0xcc, 0x4d, | ||||
| 	0x2d, 0x2e, 0x49, 0xcc, 0x2d, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x4f, 0xcf, 0xcf, | ||||
| 	0x4f, 0xcf, 0x49, 0x85, 0xf0, 0x92, 0x4a, 0xd3, 0x94, 0xac, 0xb9, 0x38, 0x43, 0x60, 0x6a, 0x84, | ||||
| 	0x24, 0xb8, 0xd8, 0x8b, 0x53, 0x93, 0xf3, 0xf3, 0x52, 0x8a, 0x25, 0x18, 0x15, 0x18, 0x35, 0x98, | ||||
| 	0x83, 0x60, 0x5c, 0x21, 0x11, 0x2e, 0xd6, 0xbc, 0xc4, 0xbc, 0xfc, 0x62, 0x09, 0x26, 0x05, 0x46, | ||||
| 	0x0d, 0xd6, 0x20, 0x08, 0xc7, 0xa9, 0x99, 0xf1, 0xc2, 0x43, 0x39, 0x86, 0x1b, 0x0f, 0xe5, 0x18, | ||||
| 	0x3e, 0x3c, 0x94, 0x63, 0x5c, 0xf1, 0x48, 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, | ||||
| 	0x18, 0x1f, 0x3c, 0x92, 0x63, 0x7c, 0xf1, 0x48, 0x8e, 0xe1, 0xc3, 0x23, 0x39, 0xc6, 0x15, 0x8f, | ||||
| 	0xe5, 0x18, 0xb9, 0x84, 0x93, 0xf3, 0x73, 0xf5, 0xd0, 0x2c, 0x77, 0xe2, 0x83, 0x5b, 0x1d, 0x00, | ||||
| 	0x12, 0x0a, 0x60, 0x8c, 0x62, 0x2d, 0xa9, 0x2c, 0x48, 0x2d, 0x5e, 0xc0, 0xc8, 0xf8, 0x83, 0x91, | ||||
| 	0x71, 0x11, 0x13, 0xb3, 0x7b, 0x80, 0xd3, 0x2a, 0x26, 0x39, 0x77, 0x88, 0xb6, 0x00, 0xa8, 0x36, | ||||
| 	0xbd, 0xf0, 0xd4, 0x9c, 0x1c, 0xef, 0xbc, 0xfc, 0xf2, 0xbc, 0x10, 0x90, 0xe2, 0x24, 0x36, 0xb0, | ||||
| 	0x79, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x4d, 0xbd, 0x9c, 0xed, 0x00, 0x00, 0x00, | ||||
| } | ||||
							
								
								
									
										94
									
								
								vendor/github.com/gogo/protobuf/types/timestamp_gogo.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										94
									
								
								vendor/github.com/gogo/protobuf/types/timestamp_gogo.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,94 @@ | ||||
| // Protocol Buffers for Go with Gadgets | ||||
| // | ||||
| // Copyright (c) 2016, The GoGo Authors. All rights reserved. | ||||
| // http://github.com/gogo/protobuf | ||||
| // | ||||
| // Redistribution and use in source and binary forms, with or without | ||||
| // modification, are permitted provided that the following conditions are | ||||
| // met: | ||||
| // | ||||
| //     * Redistributions of source code must retain the above copyright | ||||
| // notice, this list of conditions and the following disclaimer. | ||||
| //     * Redistributions in binary form must reproduce the above | ||||
| // copyright notice, this list of conditions and the following disclaimer | ||||
| // in the documentation and/or other materials provided with the | ||||
| // distribution. | ||||
| // | ||||
| // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||||
| // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||||
| // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||||
| // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||||
| // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||||
| // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||||
| // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||||
| // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||||
| // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||||
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||||
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| package types | ||||
|  | ||||
| import ( | ||||
| 	"time" | ||||
| ) | ||||
|  | ||||
| func NewPopulatedTimestamp(r interface { | ||||
| 	Int63() int64 | ||||
| }, easy bool) *Timestamp { | ||||
| 	this := &Timestamp{} | ||||
| 	ns := int64(r.Int63()) | ||||
| 	this.Seconds = ns / 1e9 | ||||
| 	this.Nanos = int32(ns % 1e9) | ||||
| 	return this | ||||
| } | ||||
|  | ||||
| func (ts *Timestamp) String() string { | ||||
| 	return TimestampString(ts) | ||||
| } | ||||
|  | ||||
| func NewPopulatedStdTime(r interface { | ||||
| 	Int63() int64 | ||||
| }, easy bool) *time.Time { | ||||
| 	timestamp := NewPopulatedTimestamp(r, easy) | ||||
| 	t, err := TimestampFromProto(timestamp) | ||||
| 	if err != nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	return &t | ||||
| } | ||||
|  | ||||
| func SizeOfStdTime(t time.Time) int { | ||||
| 	ts, err := TimestampProto(t) | ||||
| 	if err != nil { | ||||
| 		return 0 | ||||
| 	} | ||||
| 	return ts.Size() | ||||
| } | ||||
|  | ||||
| func StdTimeMarshal(t time.Time) ([]byte, error) { | ||||
| 	size := SizeOfStdTime(t) | ||||
| 	buf := make([]byte, size) | ||||
| 	_, err := StdTimeMarshalTo(t, buf) | ||||
| 	return buf, err | ||||
| } | ||||
|  | ||||
| func StdTimeMarshalTo(t time.Time, data []byte) (int, error) { | ||||
| 	ts, err := TimestampProto(t) | ||||
| 	if err != nil { | ||||
| 		return 0, err | ||||
| 	} | ||||
| 	return ts.MarshalTo(data) | ||||
| } | ||||
|  | ||||
| func StdTimeUnmarshal(t *time.Time, data []byte) error { | ||||
| 	ts := &Timestamp{} | ||||
| 	if err := ts.Unmarshal(data); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	tt, err := TimestampFromProto(ts) | ||||
| 	if err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	*t = tt | ||||
| 	return nil | ||||
| } | ||||
							
								
								
									
										2280
									
								
								vendor/github.com/gogo/protobuf/types/wrappers.pb.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										2280
									
								
								vendor/github.com/gogo/protobuf/types/wrappers.pb.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Reference in New Issue
	
	Block a user
	 Michael Crosby
					Michael Crosby