1 Star 0 Fork 0

zhuchance/kubernetes

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
state.pb.go 41.04 KB
一键复制 编辑 原始数据 按行查看 历史
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803
// Code generated by protoc-gen-gogo.
// source: state.proto
// DO NOT EDIT!
package mesosproto
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto"
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
type Operation_Type int32
const (
Operation_SNAPSHOT Operation_Type = 1
Operation_DIFF Operation_Type = 3
Operation_EXPUNGE Operation_Type = 2
)
var Operation_Type_name = map[int32]string{
1: "SNAPSHOT",
3: "DIFF",
2: "EXPUNGE",
}
var Operation_Type_value = map[string]int32{
"SNAPSHOT": 1,
"DIFF": 3,
"EXPUNGE": 2,
}
func (x Operation_Type) Enum() *Operation_Type {
p := new(Operation_Type)
*p = x
return p
}
func (x Operation_Type) String() string {
return proto.EnumName(Operation_Type_name, int32(x))
}
func (x *Operation_Type) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Operation_Type_value, data, "Operation_Type")
if err != nil {
return err
}
*x = Operation_Type(value)
return nil
}
// Describes a state entry, a versioned (via a UUID) key/value pair.
type Entry struct {
Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
Uuid []byte `protobuf:"bytes,2,req,name=uuid" json:"uuid,omitempty"`
Value []byte `protobuf:"bytes,3,req,name=value" json:"value,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Entry) Reset() { *m = Entry{} }
func (*Entry) ProtoMessage() {}
func (m *Entry) GetName() string {
if m != nil && m.Name != nil {
return *m.Name
}
return ""
}
func (m *Entry) GetUuid() []byte {
if m != nil {
return m.Uuid
}
return nil
}
func (m *Entry) GetValue() []byte {
if m != nil {
return m.Value
}
return nil
}
// Describes an operation used in the log storage implementation.
type Operation struct {
Type *Operation_Type `protobuf:"varint,1,req,name=type,enum=mesosproto.Operation_Type" json:"type,omitempty"`
Snapshot *Operation_Snapshot `protobuf:"bytes,2,opt,name=snapshot" json:"snapshot,omitempty"`
Diff *Operation_Diff `protobuf:"bytes,4,opt,name=diff" json:"diff,omitempty"`
Expunge *Operation_Expunge `protobuf:"bytes,3,opt,name=expunge" json:"expunge,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Operation) Reset() { *m = Operation{} }
func (*Operation) ProtoMessage() {}
func (m *Operation) GetType() Operation_Type {
if m != nil && m.Type != nil {
return *m.Type
}
return Operation_SNAPSHOT
}
func (m *Operation) GetSnapshot() *Operation_Snapshot {
if m != nil {
return m.Snapshot
}
return nil
}
func (m *Operation) GetDiff() *Operation_Diff {
if m != nil {
return m.Diff
}
return nil
}
func (m *Operation) GetExpunge() *Operation_Expunge {
if m != nil {
return m.Expunge
}
return nil
}
// Describes a "snapshot" operation.
type Operation_Snapshot struct {
Entry *Entry `protobuf:"bytes,1,req,name=entry" json:"entry,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Operation_Snapshot) Reset() { *m = Operation_Snapshot{} }
func (*Operation_Snapshot) ProtoMessage() {}
func (m *Operation_Snapshot) GetEntry() *Entry {
if m != nil {
return m.Entry
}
return nil
}
// Describes a "diff" operation where the 'value' of the entry is
// just the diff itself, but the 'uuid' represents the UUID of the
// entry after applying this diff.
type Operation_Diff struct {
Entry *Entry `protobuf:"bytes,1,req,name=entry" json:"entry,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Operation_Diff) Reset() { *m = Operation_Diff{} }
func (*Operation_Diff) ProtoMessage() {}
func (m *Operation_Diff) GetEntry() *Entry {
if m != nil {
return m.Entry
}
return nil
}
// Describes an "expunge" operation.
type Operation_Expunge struct {
Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Operation_Expunge) Reset() { *m = Operation_Expunge{} }
func (*Operation_Expunge) ProtoMessage() {}
func (m *Operation_Expunge) GetName() string {
if m != nil && m.Name != nil {
return *m.Name
}
return ""
}
func init() {
proto.RegisterEnum("mesosproto.Operation_Type", Operation_Type_name, Operation_Type_value)
}
func (this *Entry) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt.Errorf("that == nil && this != nil")
}
that1, ok := that.(*Entry)
if !ok {
return fmt.Errorf("that is not of type *Entry")
}
if that1 == nil {
if this == nil {
return nil
}
return fmt.Errorf("that is type *Entry but is nil && this != nil")
} else if this == nil {
return fmt.Errorf("that is type *Entrybut is not nil && this == nil")
}
if this.Name != nil && that1.Name != nil {
if *this.Name != *that1.Name {
return fmt.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name)
}
} else if this.Name != nil {
return fmt.Errorf("this.Name == nil && that.Name != nil")
} else if that1.Name != nil {
return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name)
}
if !bytes.Equal(this.Uuid, that1.Uuid) {
return fmt.Errorf("Uuid this(%v) Not Equal that(%v)", this.Uuid, that1.Uuid)
}
if !bytes.Equal(this.Value, that1.Value) {
return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value)
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
}
return nil
}
func (this *Entry) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*Entry)
if !ok {
return false
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if this.Name != nil && that1.Name != nil {
if *this.Name != *that1.Name {
return false
}
} else if this.Name != nil {
return false
} else if that1.Name != nil {
return false
}
if !bytes.Equal(this.Uuid, that1.Uuid) {
return false
}
if !bytes.Equal(this.Value, that1.Value) {
return false
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *Operation) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt.Errorf("that == nil && this != nil")
}
that1, ok := that.(*Operation)
if !ok {
return fmt.Errorf("that is not of type *Operation")
}
if that1 == nil {
if this == nil {
return nil
}
return fmt.Errorf("that is type *Operation but is nil && this != nil")
} else if this == nil {
return fmt.Errorf("that is type *Operationbut is not nil && this == nil")
}
if this.Type != nil && that1.Type != nil {
if *this.Type != *that1.Type {
return fmt.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type)
}
} else if this.Type != nil {
return fmt.Errorf("this.Type == nil && that.Type != nil")
} else if that1.Type != nil {
return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type)
}
if !this.Snapshot.Equal(that1.Snapshot) {
return fmt.Errorf("Snapshot this(%v) Not Equal that(%v)", this.Snapshot, that1.Snapshot)
}
if !this.Diff.Equal(that1.Diff) {
return fmt.Errorf("Diff this(%v) Not Equal that(%v)", this.Diff, that1.Diff)
}
if !this.Expunge.Equal(that1.Expunge) {
return fmt.Errorf("Expunge this(%v) Not Equal that(%v)", this.Expunge, that1.Expunge)
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
}
return nil
}
func (this *Operation) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*Operation)
if !ok {
return false
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if this.Type != nil && that1.Type != nil {
if *this.Type != *that1.Type {
return false
}
} else if this.Type != nil {
return false
} else if that1.Type != nil {
return false
}
if !this.Snapshot.Equal(that1.Snapshot) {
return false
}
if !this.Diff.Equal(that1.Diff) {
return false
}
if !this.Expunge.Equal(that1.Expunge) {
return false
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *Operation_Snapshot) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt.Errorf("that == nil && this != nil")
}
that1, ok := that.(*Operation_Snapshot)
if !ok {
return fmt.Errorf("that is not of type *Operation_Snapshot")
}
if that1 == nil {
if this == nil {
return nil
}
return fmt.Errorf("that is type *Operation_Snapshot but is nil && this != nil")
} else if this == nil {
return fmt.Errorf("that is type *Operation_Snapshotbut is not nil && this == nil")
}
if !this.Entry.Equal(that1.Entry) {
return fmt.Errorf("Entry this(%v) Not Equal that(%v)", this.Entry, that1.Entry)
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
}
return nil
}
func (this *Operation_Snapshot) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*Operation_Snapshot)
if !ok {
return false
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if !this.Entry.Equal(that1.Entry) {
return false
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *Operation_Diff) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt.Errorf("that == nil && this != nil")
}
that1, ok := that.(*Operation_Diff)
if !ok {
return fmt.Errorf("that is not of type *Operation_Diff")
}
if that1 == nil {
if this == nil {
return nil
}
return fmt.Errorf("that is type *Operation_Diff but is nil && this != nil")
} else if this == nil {
return fmt.Errorf("that is type *Operation_Diffbut is not nil && this == nil")
}
if !this.Entry.Equal(that1.Entry) {
return fmt.Errorf("Entry this(%v) Not Equal that(%v)", this.Entry, that1.Entry)
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
}
return nil
}
func (this *Operation_Diff) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*Operation_Diff)
if !ok {
return false
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if !this.Entry.Equal(that1.Entry) {
return false
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *Operation_Expunge) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt.Errorf("that == nil && this != nil")
}
that1, ok := that.(*Operation_Expunge)
if !ok {
return fmt.Errorf("that is not of type *Operation_Expunge")
}
if that1 == nil {
if this == nil {
return nil
}
return fmt.Errorf("that is type *Operation_Expunge but is nil && this != nil")
} else if this == nil {
return fmt.Errorf("that is type *Operation_Expungebut is not nil && this == nil")
}
if this.Name != nil && that1.Name != nil {
if *this.Name != *that1.Name {
return fmt.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name)
}
} else if this.Name != nil {
return fmt.Errorf("this.Name == nil && that.Name != nil")
} else if that1.Name != nil {
return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name)
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
}
return nil
}
func (this *Operation_Expunge) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*Operation_Expunge)
if !ok {
return false
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if this.Name != nil && that1.Name != nil {
if *this.Name != *that1.Name {
return false
}
} else if this.Name != nil {
return false
} else if that1.Name != nil {
return false
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *Entry) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 7)
s = append(s, "&mesosproto.Entry{")
if this.Name != nil {
s = append(s, "Name: "+valueToGoStringState(this.Name, "string")+",\n")
}
if this.Uuid != nil {
s = append(s, "Uuid: "+valueToGoStringState(this.Uuid, "byte")+",\n")
}
if this.Value != nil {
s = append(s, "Value: "+valueToGoStringState(this.Value, "byte")+",\n")
}
if this.XXX_unrecognized != nil {
s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
}
s = append(s, "}")
return strings.Join(s, "")
}
func (this *Operation) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 8)
s = append(s, "&mesosproto.Operation{")
if this.Type != nil {
s = append(s, "Type: "+valueToGoStringState(this.Type, "mesosproto.Operation_Type")+",\n")
}
if this.Snapshot != nil {
s = append(s, "Snapshot: "+fmt.Sprintf("%#v", this.Snapshot)+",\n")
}
if this.Diff != nil {
s = append(s, "Diff: "+fmt.Sprintf("%#v", this.Diff)+",\n")
}
if this.Expunge != nil {
s = append(s, "Expunge: "+fmt.Sprintf("%#v", this.Expunge)+",\n")
}
if this.XXX_unrecognized != nil {
s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
}
s = append(s, "}")
return strings.Join(s, "")
}
func (this *Operation_Snapshot) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 5)
s = append(s, "&mesosproto.Operation_Snapshot{")
if this.Entry != nil {
s = append(s, "Entry: "+fmt.Sprintf("%#v", this.Entry)+",\n")
}
if this.XXX_unrecognized != nil {
s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
}
s = append(s, "}")
return strings.Join(s, "")
}
func (this *Operation_Diff) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 5)
s = append(s, "&mesosproto.Operation_Diff{")
if this.Entry != nil {
s = append(s, "Entry: "+fmt.Sprintf("%#v", this.Entry)+",\n")
}
if this.XXX_unrecognized != nil {
s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
}
s = append(s, "}")
return strings.Join(s, "")
}
func (this *Operation_Expunge) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 5)
s = append(s, "&mesosproto.Operation_Expunge{")
if this.Name != nil {
s = append(s, "Name: "+valueToGoStringState(this.Name, "string")+",\n")
}
if this.XXX_unrecognized != nil {
s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
}
s = append(s, "}")
return strings.Join(s, "")
}
func valueToGoStringState(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 extensionToGoStringState(e map[int32]github_com_gogo_protobuf_proto.Extension) string {
if e == nil {
return "nil"
}
s := "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 *Entry) 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 *Entry) MarshalTo(data []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Name == nil {
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("name")
} else {
data[i] = 0xa
i++
i = encodeVarintState(data, i, uint64(len(*m.Name)))
i += copy(data[i:], *m.Name)
}
if m.Uuid == nil {
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("uuid")
} else {
data[i] = 0x12
i++
i = encodeVarintState(data, i, uint64(len(m.Uuid)))
i += copy(data[i:], m.Uuid)
}
if m.Value == nil {
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("value")
} else {
data[i] = 0x1a
i++
i = encodeVarintState(data, i, uint64(len(m.Value)))
i += copy(data[i:], m.Value)
}
if m.XXX_unrecognized != nil {
i += copy(data[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *Operation) 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 *Operation) MarshalTo(data []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Type == nil {
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("type")
} else {
data[i] = 0x8
i++
i = encodeVarintState(data, i, uint64(*m.Type))
}
if m.Snapshot != nil {
data[i] = 0x12
i++
i = encodeVarintState(data, i, uint64(m.Snapshot.Size()))
n1, err := m.Snapshot.MarshalTo(data[i:])
if err != nil {
return 0, err
}
i += n1
}
if m.Expunge != nil {
data[i] = 0x1a
i++
i = encodeVarintState(data, i, uint64(m.Expunge.Size()))
n2, err := m.Expunge.MarshalTo(data[i:])
if err != nil {
return 0, err
}
i += n2
}
if m.Diff != nil {
data[i] = 0x22
i++
i = encodeVarintState(data, i, uint64(m.Diff.Size()))
n3, err := m.Diff.MarshalTo(data[i:])
if err != nil {
return 0, err
}
i += n3
}
if m.XXX_unrecognized != nil {
i += copy(data[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *Operation_Snapshot) 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 *Operation_Snapshot) MarshalTo(data []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Entry == nil {
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("entry")
} else {
data[i] = 0xa
i++
i = encodeVarintState(data, i, uint64(m.Entry.Size()))
n4, err := m.Entry.MarshalTo(data[i:])
if err != nil {
return 0, err
}
i += n4
}
if m.XXX_unrecognized != nil {
i += copy(data[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *Operation_Diff) 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 *Operation_Diff) MarshalTo(data []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Entry == nil {
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("entry")
} else {
data[i] = 0xa
i++
i = encodeVarintState(data, i, uint64(m.Entry.Size()))
n5, err := m.Entry.MarshalTo(data[i:])
if err != nil {
return 0, err
}
i += n5
}
if m.XXX_unrecognized != nil {
i += copy(data[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *Operation_Expunge) 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 *Operation_Expunge) MarshalTo(data []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Name == nil {
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("name")
} else {
data[i] = 0xa
i++
i = encodeVarintState(data, i, uint64(len(*m.Name)))
i += copy(data[i:], *m.Name)
}
if m.XXX_unrecognized != nil {
i += copy(data[i:], m.XXX_unrecognized)
}
return i, nil
}
func encodeFixed64State(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 encodeFixed32State(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 encodeVarintState(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 NewPopulatedEntry(r randyState, easy bool) *Entry {
this := &Entry{}
v1 := randStringState(r)
this.Name = &v1
v2 := r.Intn(100)
this.Uuid = make([]byte, v2)
for i := 0; i < v2; i++ {
this.Uuid[i] = byte(r.Intn(256))
}
v3 := r.Intn(100)
this.Value = make([]byte, v3)
for i := 0; i < v3; i++ {
this.Value[i] = byte(r.Intn(256))
}
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedState(r, 4)
}
return this
}
func NewPopulatedOperation(r randyState, easy bool) *Operation {
this := &Operation{}
v4 := Operation_Type([]int32{1, 3, 2}[r.Intn(3)])
this.Type = &v4
if r.Intn(10) != 0 {
this.Snapshot = NewPopulatedOperation_Snapshot(r, easy)
}
if r.Intn(10) != 0 {
this.Expunge = NewPopulatedOperation_Expunge(r, easy)
}
if r.Intn(10) != 0 {
this.Diff = NewPopulatedOperation_Diff(r, easy)
}
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedState(r, 5)
}
return this
}
func NewPopulatedOperation_Snapshot(r randyState, easy bool) *Operation_Snapshot {
this := &Operation_Snapshot{}
this.Entry = NewPopulatedEntry(r, easy)
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedState(r, 2)
}
return this
}
func NewPopulatedOperation_Diff(r randyState, easy bool) *Operation_Diff {
this := &Operation_Diff{}
this.Entry = NewPopulatedEntry(r, easy)
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedState(r, 2)
}
return this
}
func NewPopulatedOperation_Expunge(r randyState, easy bool) *Operation_Expunge {
this := &Operation_Expunge{}
v5 := randStringState(r)
this.Name = &v5
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedState(r, 2)
}
return this
}
type randyState interface {
Float32() float32
Float64() float64
Int63() int64
Int31() int32
Uint32() uint32
Intn(n int) int
}
func randUTF8RuneState(r randyState) 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 randStringState(r randyState) string {
v6 := r.Intn(100)
tmps := make([]rune, v6)
for i := 0; i < v6; i++ {
tmps[i] = randUTF8RuneState(r)
}
return string(tmps)
}
func randUnrecognizedState(r randyState, 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 = randFieldState(data, r, fieldNumber, wire)
}
return data
}
func randFieldState(data []byte, r randyState, fieldNumber int, wire int) []byte {
key := uint32(fieldNumber)<<3 | uint32(wire)
switch wire {
case 0:
data = encodeVarintPopulateState(data, uint64(key))
v7 := r.Int63()
if r.Intn(2) == 0 {
v7 *= -1
}
data = encodeVarintPopulateState(data, uint64(v7))
case 1:
data = encodeVarintPopulateState(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 = encodeVarintPopulateState(data, uint64(key))
ll := r.Intn(100)
data = encodeVarintPopulateState(data, uint64(ll))
for j := 0; j < ll; j++ {
data = append(data, byte(r.Intn(256)))
}
default:
data = encodeVarintPopulateState(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 encodeVarintPopulateState(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 *Entry) Size() (n int) {
var l int
_ = l
if m.Name != nil {
l = len(*m.Name)
n += 1 + l + sovState(uint64(l))
}
if m.Uuid != nil {
l = len(m.Uuid)
n += 1 + l + sovState(uint64(l))
}
if m.Value != nil {
l = len(m.Value)
n += 1 + l + sovState(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Operation) Size() (n int) {
var l int
_ = l
if m.Type != nil {
n += 1 + sovState(uint64(*m.Type))
}
if m.Snapshot != nil {
l = m.Snapshot.Size()
n += 1 + l + sovState(uint64(l))
}
if m.Expunge != nil {
l = m.Expunge.Size()
n += 1 + l + sovState(uint64(l))
}
if m.Diff != nil {
l = m.Diff.Size()
n += 1 + l + sovState(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Operation_Snapshot) Size() (n int) {
var l int
_ = l
if m.Entry != nil {
l = m.Entry.Size()
n += 1 + l + sovState(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Operation_Diff) Size() (n int) {
var l int
_ = l
if m.Entry != nil {
l = m.Entry.Size()
n += 1 + l + sovState(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Operation_Expunge) Size() (n int) {
var l int
_ = l
if m.Name != nil {
l = len(*m.Name)
n += 1 + l + sovState(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovState(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozState(x uint64) (n int) {
return sovState(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *Entry) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Entry{`,
`Name:` + valueToStringState(this.Name) + `,`,
`Uuid:` + valueToStringState(this.Uuid) + `,`,
`Value:` + valueToStringState(this.Value) + `,`,
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func (this *Operation) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Operation{`,
`Type:` + valueToStringState(this.Type) + `,`,
`Snapshot:` + strings.Replace(fmt.Sprintf("%v", this.Snapshot), "Operation_Snapshot", "Operation_Snapshot", 1) + `,`,
`Expunge:` + strings.Replace(fmt.Sprintf("%v", this.Expunge), "Operation_Expunge", "Operation_Expunge", 1) + `,`,
`Diff:` + strings.Replace(fmt.Sprintf("%v", this.Diff), "Operation_Diff", "Operation_Diff", 1) + `,`,
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func (this *Operation_Snapshot) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Operation_Snapshot{`,
`Entry:` + strings.Replace(fmt.Sprintf("%v", this.Entry), "Entry", "Entry", 1) + `,`,
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func (this *Operation_Diff) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Operation_Diff{`,
`Entry:` + strings.Replace(fmt.Sprintf("%v", this.Entry), "Entry", "Entry", 1) + `,`,
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func (this *Operation_Expunge) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Operation_Expunge{`,
`Name:` + valueToStringState(this.Name) + `,`,
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func valueToStringState(v interface{}) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("*%v", pv)
}
func (m *Entry) Unmarshal(data []byte) error {
var hasFields [1]uint64
l := len(data)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
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)
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
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 ErrInvalidLengthState
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
s := string(data[iNdEx:postIndex])
m.Name = &s
iNdEx = postIndex
hasFields[0] |= uint64(0x00000001)
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Uuid", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthState
}
postIndex := iNdEx + byteLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Uuid = append([]byte{}, data[iNdEx:postIndex]...)
iNdEx = postIndex
hasFields[0] |= uint64(0x00000002)
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthState
}
postIndex := iNdEx + byteLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Value = append([]byte{}, data[iNdEx:postIndex]...)
iNdEx = postIndex
hasFields[0] |= uint64(0x00000004)
default:
var sizeOfWire int
for {
sizeOfWire++
wire >>= 7
if wire == 0 {
break
}
}
iNdEx -= sizeOfWire
skippy, err := skipState(data[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthState
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if hasFields[0]&uint64(0x00000001) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name")
}
if hasFields[0]&uint64(0x00000002) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("uuid")
}
if hasFields[0]&uint64(0x00000004) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value")
}
return nil
}
func (m *Operation) Unmarshal(data []byte) error {
var hasFields [1]uint64
l := len(data)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
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)
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
}
var v Operation_Type
for shift := uint(0); ; shift += 7 {
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
v |= (Operation_Type(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.Type = &v
hasFields[0] |= uint64(0x00000001)
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Snapshot", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthState
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Snapshot == nil {
m.Snapshot = &Operation_Snapshot{}
}
if err := m.Snapshot.Unmarshal(data[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Expunge", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthState
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Expunge == nil {
m.Expunge = &Operation_Expunge{}
}
if err := m.Expunge.Unmarshal(data[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Diff", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthState
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Diff == nil {
m.Diff = &Operation_Diff{}
}
if err := m.Diff.Unmarshal(data[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
var sizeOfWire int
for {
sizeOfWire++
wire >>= 7
if wire == 0 {
break
}
}
iNdEx -= sizeOfWire
skippy, err := skipState(data[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthState
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if hasFields[0]&uint64(0x00000001) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type")
}
return nil
}
func (m *Operation_Snapshot) Unmarshal(data []byte) error {
var hasFields [1]uint64
l := len(data)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
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)
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Entry", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthState
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Entry == nil {
m.Entry = &Entry{}
}
if err := m.Entry.Unmarshal(data[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
hasFields[0] |= uint64(0x00000001)
default:
var sizeOfWire int
for {
sizeOfWire++
wire >>= 7
if wire == 0 {
break
}
}
iNdEx -= sizeOfWire
skippy, err := skipState(data[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthState
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if hasFields[0]&uint64(0x00000001) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("entry")
}
return nil
}
func (m *Operation_Diff) Unmarshal(data []byte) error {
var hasFields [1]uint64
l := len(data)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
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)
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Entry", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthState
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Entry == nil {
m.Entry = &Entry{}
}
if err := m.Entry.Unmarshal(data[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
hasFields[0] |= uint64(0x00000001)
default:
var sizeOfWire int
for {
sizeOfWire++
wire >>= 7
if wire == 0 {
break
}
}
iNdEx -= sizeOfWire
skippy, err := skipState(data[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthState
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if hasFields[0]&uint64(0x00000001) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("entry")
}
return nil
}
func (m *Operation_Expunge) Unmarshal(data []byte) error {
var hasFields [1]uint64
l := len(data)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
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)
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
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 ErrInvalidLengthState
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
s := string(data[iNdEx:postIndex])
m.Name = &s
iNdEx = postIndex
hasFields[0] |= uint64(0x00000001)
default:
var sizeOfWire int
for {
sizeOfWire++
wire >>= 7
if wire == 0 {
break
}
}
iNdEx -= sizeOfWire
skippy, err := skipState(data[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthState
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if hasFields[0]&uint64(0x00000001) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name")
}
return nil
}
func skipState(data []byte) (n int, err error) {
l := len(data)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
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 {
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 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, ErrInvalidLengthState
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
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 := skipState(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 (
ErrInvalidLengthState = fmt.Errorf("proto: negative length found during unmarshaling")
)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/meoom/kubernetes.git
git@gitee.com:meoom/kubernetes.git
meoom
kubernetes
kubernetes
v1.2.0-alpha.1

搜索帮助

Dd8185d8 1850385 E526c682 1850385