vendor: Update everything
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4620
This commit is contained in:
258
vendor/github.com/gogo/protobuf/test/importduplicate/importduplicate.pb.go
generated
vendored
Normal file
258
vendor/github.com/gogo/protobuf/test/importduplicate/importduplicate.pb.go
generated
vendored
Normal file
@@ -0,0 +1,258 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: importduplicate.proto
|
||||
|
||||
/*
|
||||
Package importduplicate is a generated protocol buffer package.
|
||||
|
||||
It is generated from these files:
|
||||
importduplicate.proto
|
||||
|
||||
It has these top-level messages:
|
||||
MapAndSortKeys
|
||||
*/
|
||||
package importduplicate
|
||||
|
||||
import proto "github.com/gogo/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import _ "github.com/gogo/protobuf/gogoproto"
|
||||
import sortkeys "github.com/gogo/protobuf/test/importduplicate/sortkeys"
|
||||
import proto1 "github.com/gogo/protobuf/test/importduplicate/proto"
|
||||
|
||||
import strings "strings"
|
||||
import reflect "reflect"
|
||||
import sortkeys1 "github.com/gogo/protobuf/sortkeys"
|
||||
|
||||
// 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
|
||||
|
||||
type MapAndSortKeys struct {
|
||||
Key *sortkeys.Object `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
|
||||
KeyValue map[int32]string `protobuf:"bytes,2,rep,name=keyValue" json:"keyValue,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
Value *proto1.Subject `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"`
|
||||
}
|
||||
|
||||
func (m *MapAndSortKeys) Reset() { *m = MapAndSortKeys{} }
|
||||
func (m *MapAndSortKeys) String() string { return proto.CompactTextString(m) }
|
||||
func (*MapAndSortKeys) ProtoMessage() {}
|
||||
func (*MapAndSortKeys) Descriptor() ([]byte, []int) { return fileDescriptorImportduplicate, []int{0} }
|
||||
|
||||
func (m *MapAndSortKeys) GetKey() *sortkeys.Object {
|
||||
if m != nil {
|
||||
return m.Key
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *MapAndSortKeys) GetKeyValue() map[int32]string {
|
||||
if m != nil {
|
||||
return m.KeyValue
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *MapAndSortKeys) GetValue() *proto1.Subject {
|
||||
if m != nil {
|
||||
return m.Value
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*MapAndSortKeys)(nil), "importduplicate.MapAndSortKeys")
|
||||
}
|
||||
func (this *MapAndSortKeys) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*MapAndSortKeys)
|
||||
if !ok {
|
||||
that2, ok := that.(MapAndSortKeys)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if !this.Key.Equal(that1.Key) {
|
||||
return false
|
||||
}
|
||||
if len(this.KeyValue) != len(that1.KeyValue) {
|
||||
return false
|
||||
}
|
||||
for i := range this.KeyValue {
|
||||
if this.KeyValue[i] != that1.KeyValue[i] {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if !this.Value.Equal(that1.Value) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *MapAndSortKeys) GoString() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := make([]string, 0, 7)
|
||||
s = append(s, "&importduplicate.MapAndSortKeys{")
|
||||
if this.Key != nil {
|
||||
s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n")
|
||||
}
|
||||
keysForKeyValue := make([]int32, 0, len(this.KeyValue))
|
||||
for k := range this.KeyValue {
|
||||
keysForKeyValue = append(keysForKeyValue, k)
|
||||
}
|
||||
sortkeys1.Int32s(keysForKeyValue)
|
||||
mapStringForKeyValue := "map[int32]string{"
|
||||
for _, k := range keysForKeyValue {
|
||||
mapStringForKeyValue += fmt.Sprintf("%#v: %#v,", k, this.KeyValue[k])
|
||||
}
|
||||
mapStringForKeyValue += "}"
|
||||
if this.KeyValue != nil {
|
||||
s = append(s, "KeyValue: "+mapStringForKeyValue+",\n")
|
||||
}
|
||||
if this.Value != nil {
|
||||
s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n")
|
||||
}
|
||||
s = append(s, "}")
|
||||
return strings.Join(s, "")
|
||||
}
|
||||
func valueToGoStringImportduplicate(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 NewPopulatedMapAndSortKeys(r randyImportduplicate, easy bool) *MapAndSortKeys {
|
||||
this := &MapAndSortKeys{}
|
||||
if r.Intn(10) != 0 {
|
||||
this.Key = sortkeys.NewPopulatedObject(r, easy)
|
||||
}
|
||||
if r.Intn(10) != 0 {
|
||||
v1 := r.Intn(10)
|
||||
this.KeyValue = make(map[int32]string)
|
||||
for i := 0; i < v1; i++ {
|
||||
this.KeyValue[int32(r.Int31())] = randStringImportduplicate(r)
|
||||
}
|
||||
}
|
||||
if r.Intn(10) != 0 {
|
||||
this.Value = proto1.NewPopulatedSubject(r, easy)
|
||||
}
|
||||
if !easy && r.Intn(10) != 0 {
|
||||
}
|
||||
return this
|
||||
}
|
||||
|
||||
type randyImportduplicate interface {
|
||||
Float32() float32
|
||||
Float64() float64
|
||||
Int63() int64
|
||||
Int31() int32
|
||||
Uint32() uint32
|
||||
Intn(n int) int
|
||||
}
|
||||
|
||||
func randUTF8RuneImportduplicate(r randyImportduplicate) 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 randStringImportduplicate(r randyImportduplicate) string {
|
||||
v2 := r.Intn(100)
|
||||
tmps := make([]rune, v2)
|
||||
for i := 0; i < v2; i++ {
|
||||
tmps[i] = randUTF8RuneImportduplicate(r)
|
||||
}
|
||||
return string(tmps)
|
||||
}
|
||||
func randUnrecognizedImportduplicate(r randyImportduplicate, 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 = randFieldImportduplicate(dAtA, r, fieldNumber, wire)
|
||||
}
|
||||
return dAtA
|
||||
}
|
||||
func randFieldImportduplicate(dAtA []byte, r randyImportduplicate, fieldNumber int, wire int) []byte {
|
||||
key := uint32(fieldNumber)<<3 | uint32(wire)
|
||||
switch wire {
|
||||
case 0:
|
||||
dAtA = encodeVarintPopulateImportduplicate(dAtA, uint64(key))
|
||||
v3 := r.Int63()
|
||||
if r.Intn(2) == 0 {
|
||||
v3 *= -1
|
||||
}
|
||||
dAtA = encodeVarintPopulateImportduplicate(dAtA, uint64(v3))
|
||||
case 1:
|
||||
dAtA = encodeVarintPopulateImportduplicate(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 = encodeVarintPopulateImportduplicate(dAtA, uint64(key))
|
||||
ll := r.Intn(100)
|
||||
dAtA = encodeVarintPopulateImportduplicate(dAtA, uint64(ll))
|
||||
for j := 0; j < ll; j++ {
|
||||
dAtA = append(dAtA, byte(r.Intn(256)))
|
||||
}
|
||||
default:
|
||||
dAtA = encodeVarintPopulateImportduplicate(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 encodeVarintPopulateImportduplicate(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 init() { proto.RegisterFile("importduplicate.proto", fileDescriptorImportduplicate) }
|
||||
|
||||
var fileDescriptorImportduplicate = []byte{
|
||||
// 277 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcd, 0xcc, 0x2d, 0xc8,
|
||||
0x2f, 0x2a, 0x49, 0x29, 0x2d, 0xc8, 0xc9, 0x4c, 0x4e, 0x2c, 0x49, 0xd5, 0x2b, 0x28, 0xca, 0x2f,
|
||||
0xc9, 0x17, 0xe2, 0x47, 0x13, 0x96, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce,
|
||||
0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0xab, 0x4b, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c,
|
||||
0x30, 0x0b, 0xa2, 0x5f, 0xca, 0x15, 0xa7, 0xf2, 0x92, 0xd4, 0xe2, 0x12, 0x7d, 0x34, 0xd3, 0xf5,
|
||||
0x8b, 0xf3, 0x8b, 0x4a, 0xb2, 0x53, 0x2b, 0x8b, 0xc1, 0x8c, 0xc4, 0xa4, 0x1c, 0xa8, 0x33, 0xa4,
|
||||
0xec, 0x49, 0x33, 0x06, 0xe2, 0x0c, 0x30, 0x09, 0x31, 0x40, 0xe9, 0x11, 0x23, 0x17, 0x9f, 0x6f,
|
||||
0x62, 0x81, 0x63, 0x5e, 0x4a, 0x70, 0x7e, 0x51, 0x89, 0x77, 0x6a, 0x65, 0xb1, 0x90, 0x12, 0x17,
|
||||
0x73, 0x76, 0x6a, 0xa5, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0x80, 0x1e, 0xcc, 0x6a, 0x3d,
|
||||
0xff, 0xa4, 0xac, 0xd4, 0xe4, 0x92, 0x20, 0x90, 0xa4, 0x90, 0x27, 0x17, 0x47, 0x76, 0x6a, 0x65,
|
||||
0x58, 0x62, 0x4e, 0x69, 0xaa, 0x04, 0x93, 0x02, 0xb3, 0x06, 0xb7, 0x91, 0xae, 0x1e, 0x7a, 0x40,
|
||||
0xa1, 0x1a, 0xab, 0xe7, 0x0d, 0x55, 0xef, 0x9a, 0x57, 0x52, 0x54, 0x19, 0x04, 0xd7, 0x2e, 0xa4,
|
||||
0xc2, 0xc5, 0x5a, 0x06, 0x36, 0x87, 0x19, 0x6c, 0x21, 0x1f, 0xc4, 0x61, 0x7a, 0xc1, 0xa5, 0x10,
|
||||
0xeb, 0x20, 0x92, 0x52, 0xd6, 0x5c, 0xbc, 0x28, 0x06, 0x08, 0x09, 0x20, 0x5c, 0xc9, 0x0a, 0x71,
|
||||
0x93, 0x08, 0xcc, 0x20, 0x26, 0x05, 0x46, 0x0d, 0x4e, 0xa8, 0x46, 0x2b, 0x26, 0x0b, 0x46, 0x27,
|
||||
0x81, 0x0f, 0x0f, 0xe5, 0x18, 0x7f, 0x3c, 0x94, 0x63, 0x5c, 0xf1, 0x48, 0x8e, 0x71, 0xc7, 0x23,
|
||||
0x39, 0xc6, 0x24, 0x36, 0xb0, 0x25, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x50, 0xcc, 0xec,
|
||||
0x38, 0xde, 0x01, 0x00, 0x00,
|
||||
}
|
||||
174
vendor/github.com/gogo/protobuf/test/importduplicate/proto/proto.pb.go
generated
vendored
Normal file
174
vendor/github.com/gogo/protobuf/test/importduplicate/proto/proto.pb.go
generated
vendored
Normal file
@@ -0,0 +1,174 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: proto/proto.proto
|
||||
|
||||
/*
|
||||
Package proto is a generated protocol buffer package.
|
||||
|
||||
It is generated from these files:
|
||||
proto/proto.proto
|
||||
|
||||
It has these top-level messages:
|
||||
Subject
|
||||
*/
|
||||
package proto
|
||||
|
||||
import proto1 "github.com/gogo/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import _ "github.com/gogo/protobuf/gogoproto"
|
||||
|
||||
import strings "strings"
|
||||
import reflect "reflect"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto1.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 _ = proto1.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
||||
|
||||
type Subject struct {
|
||||
}
|
||||
|
||||
func (m *Subject) Reset() { *m = Subject{} }
|
||||
func (m *Subject) String() string { return proto1.CompactTextString(m) }
|
||||
func (*Subject) ProtoMessage() {}
|
||||
func (*Subject) Descriptor() ([]byte, []int) { return fileDescriptorProto, []int{0} }
|
||||
|
||||
func init() {
|
||||
proto1.RegisterType((*Subject)(nil), "proto.Subject")
|
||||
}
|
||||
func (this *Subject) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*Subject)
|
||||
if !ok {
|
||||
that2, ok := that.(Subject)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *Subject) GoString() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := make([]string, 0, 4)
|
||||
s = append(s, "&proto.Subject{")
|
||||
s = append(s, "}")
|
||||
return strings.Join(s, "")
|
||||
}
|
||||
func valueToGoStringProto(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 NewPopulatedSubject(r randyProto, easy bool) *Subject {
|
||||
this := &Subject{}
|
||||
if !easy && r.Intn(10) != 0 {
|
||||
}
|
||||
return this
|
||||
}
|
||||
|
||||
type randyProto interface {
|
||||
Float32() float32
|
||||
Float64() float64
|
||||
Int63() int64
|
||||
Int31() int32
|
||||
Uint32() uint32
|
||||
Intn(n int) int
|
||||
}
|
||||
|
||||
func randUTF8RuneProto(r randyProto) 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 randStringProto(r randyProto) string {
|
||||
v1 := r.Intn(100)
|
||||
tmps := make([]rune, v1)
|
||||
for i := 0; i < v1; i++ {
|
||||
tmps[i] = randUTF8RuneProto(r)
|
||||
}
|
||||
return string(tmps)
|
||||
}
|
||||
func randUnrecognizedProto(r randyProto, 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 = randFieldProto(dAtA, r, fieldNumber, wire)
|
||||
}
|
||||
return dAtA
|
||||
}
|
||||
func randFieldProto(dAtA []byte, r randyProto, fieldNumber int, wire int) []byte {
|
||||
key := uint32(fieldNumber)<<3 | uint32(wire)
|
||||
switch wire {
|
||||
case 0:
|
||||
dAtA = encodeVarintPopulateProto(dAtA, uint64(key))
|
||||
v2 := r.Int63()
|
||||
if r.Intn(2) == 0 {
|
||||
v2 *= -1
|
||||
}
|
||||
dAtA = encodeVarintPopulateProto(dAtA, uint64(v2))
|
||||
case 1:
|
||||
dAtA = encodeVarintPopulateProto(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 = encodeVarintPopulateProto(dAtA, uint64(key))
|
||||
ll := r.Intn(100)
|
||||
dAtA = encodeVarintPopulateProto(dAtA, uint64(ll))
|
||||
for j := 0; j < ll; j++ {
|
||||
dAtA = append(dAtA, byte(r.Intn(256)))
|
||||
}
|
||||
default:
|
||||
dAtA = encodeVarintPopulateProto(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 encodeVarintPopulateProto(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 init() { proto1.RegisterFile("proto/proto.proto", fileDescriptorProto) }
|
||||
|
||||
var fileDescriptorProto = []byte{
|
||||
// 103 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2c, 0x28, 0xca, 0x2f,
|
||||
0xc9, 0xd7, 0x07, 0x93, 0x7a, 0x60, 0x52, 0x88, 0x15, 0x4c, 0x49, 0xe9, 0xa6, 0x67, 0x96, 0x64,
|
||||
0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0x43, 0xd5, 0x24, 0x95, 0xa6, 0x81,
|
||||
0x79, 0x10, 0x6d, 0x20, 0x16, 0x44, 0x97, 0x12, 0x27, 0x17, 0x7b, 0x70, 0x69, 0x52, 0x56, 0x6a,
|
||||
0x72, 0x89, 0x93, 0xc0, 0x87, 0x87, 0x72, 0x8c, 0x3f, 0x1e, 0xca, 0x31, 0xae, 0x78, 0x24, 0xc7,
|
||||
0xb8, 0xe3, 0x91, 0x1c, 0x63, 0x12, 0x1b, 0x58, 0x8d, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xf0,
|
||||
0xc4, 0xe7, 0x73, 0x6e, 0x00, 0x00, 0x00,
|
||||
}
|
||||
175
vendor/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortable.pb.go
generated
vendored
Normal file
175
vendor/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortable.pb.go
generated
vendored
Normal file
@@ -0,0 +1,175 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: sortkeys/sortable.proto
|
||||
|
||||
/*
|
||||
Package sortkeys is a generated protocol buffer package.
|
||||
|
||||
It is generated from these files:
|
||||
sortkeys/sortable.proto
|
||||
|
||||
It has these top-level messages:
|
||||
Object
|
||||
*/
|
||||
package sortkeys
|
||||
|
||||
import proto "github.com/gogo/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import _ "github.com/gogo/protobuf/gogoproto"
|
||||
|
||||
import strings "strings"
|
||||
import reflect "reflect"
|
||||
|
||||
// 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
|
||||
|
||||
type Object struct {
|
||||
}
|
||||
|
||||
func (m *Object) Reset() { *m = Object{} }
|
||||
func (m *Object) String() string { return proto.CompactTextString(m) }
|
||||
func (*Object) ProtoMessage() {}
|
||||
func (*Object) Descriptor() ([]byte, []int) { return fileDescriptorSortable, []int{0} }
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*Object)(nil), "sortkeys.Object")
|
||||
}
|
||||
func (this *Object) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*Object)
|
||||
if !ok {
|
||||
that2, ok := that.(Object)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *Object) GoString() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := make([]string, 0, 4)
|
||||
s = append(s, "&sortkeys.Object{")
|
||||
s = append(s, "}")
|
||||
return strings.Join(s, "")
|
||||
}
|
||||
func valueToGoStringSortable(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 NewPopulatedObject(r randySortable, easy bool) *Object {
|
||||
this := &Object{}
|
||||
if !easy && r.Intn(10) != 0 {
|
||||
}
|
||||
return this
|
||||
}
|
||||
|
||||
type randySortable interface {
|
||||
Float32() float32
|
||||
Float64() float64
|
||||
Int63() int64
|
||||
Int31() int32
|
||||
Uint32() uint32
|
||||
Intn(n int) int
|
||||
}
|
||||
|
||||
func randUTF8RuneSortable(r randySortable) 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 randStringSortable(r randySortable) string {
|
||||
v1 := r.Intn(100)
|
||||
tmps := make([]rune, v1)
|
||||
for i := 0; i < v1; i++ {
|
||||
tmps[i] = randUTF8RuneSortable(r)
|
||||
}
|
||||
return string(tmps)
|
||||
}
|
||||
func randUnrecognizedSortable(r randySortable, 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 = randFieldSortable(dAtA, r, fieldNumber, wire)
|
||||
}
|
||||
return dAtA
|
||||
}
|
||||
func randFieldSortable(dAtA []byte, r randySortable, fieldNumber int, wire int) []byte {
|
||||
key := uint32(fieldNumber)<<3 | uint32(wire)
|
||||
switch wire {
|
||||
case 0:
|
||||
dAtA = encodeVarintPopulateSortable(dAtA, uint64(key))
|
||||
v2 := r.Int63()
|
||||
if r.Intn(2) == 0 {
|
||||
v2 *= -1
|
||||
}
|
||||
dAtA = encodeVarintPopulateSortable(dAtA, uint64(v2))
|
||||
case 1:
|
||||
dAtA = encodeVarintPopulateSortable(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 = encodeVarintPopulateSortable(dAtA, uint64(key))
|
||||
ll := r.Intn(100)
|
||||
dAtA = encodeVarintPopulateSortable(dAtA, uint64(ll))
|
||||
for j := 0; j < ll; j++ {
|
||||
dAtA = append(dAtA, byte(r.Intn(256)))
|
||||
}
|
||||
default:
|
||||
dAtA = encodeVarintPopulateSortable(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 encodeVarintPopulateSortable(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 init() { proto.RegisterFile("sortkeys/sortable.proto", fileDescriptorSortable) }
|
||||
|
||||
var fileDescriptorSortable = []byte{
|
||||
// 115 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2f, 0xce, 0x2f, 0x2a,
|
||||
0xc9, 0x4e, 0xad, 0x2c, 0xd6, 0x07, 0x31, 0x12, 0x93, 0x72, 0x52, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b,
|
||||
0xf2, 0x85, 0x38, 0x60, 0x12, 0x52, 0xba, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9,
|
||||
0xb9, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0xfa, 0x60, 0x05, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03,
|
||||
0x66, 0x41, 0x34, 0x2a, 0x71, 0x70, 0xb1, 0xf9, 0x27, 0x65, 0xa5, 0x26, 0x97, 0x38, 0x09, 0x7c,
|
||||
0x78, 0x28, 0xc7, 0xf8, 0xe3, 0xa1, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x3b, 0x1e, 0xc9, 0x31,
|
||||
0x26, 0xb1, 0x81, 0x95, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xd5, 0x1b, 0xba, 0xd6, 0x76,
|
||||
0x00, 0x00, 0x00,
|
||||
}
|
||||
Reference in New Issue
Block a user