12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301 |
- // Code generated by protoc-gen-gogo. DO NOT EDIT.
- // source: github.com/docker/swarmkit/protobuf/plugin/plugin.proto
- package plugin
- import (
- fmt "fmt"
- github_com_docker_swarmkit_api_deepcopy "github.com/docker/swarmkit/api/deepcopy"
- github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"
- proto "github.com/gogo/protobuf/proto"
- descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor"
- io "io"
- math "math"
- reflect "reflect"
- strings "strings"
- )
- // 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 WatchSelectors struct {
- // supported by all object types
- ID *bool `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
- IDPrefix *bool `protobuf:"varint,2,opt,name=id_prefix,json=idPrefix" json:"id_prefix,omitempty"`
- Name *bool `protobuf:"varint,3,opt,name=name" json:"name,omitempty"`
- NamePrefix *bool `protobuf:"varint,4,opt,name=name_prefix,json=namePrefix" json:"name_prefix,omitempty"`
- Custom *bool `protobuf:"varint,5,opt,name=custom" json:"custom,omitempty"`
- CustomPrefix *bool `protobuf:"varint,6,opt,name=custom_prefix,json=customPrefix" json:"custom_prefix,omitempty"`
- // supported by tasks only
- ServiceID *bool `protobuf:"varint,7,opt,name=service_id,json=serviceId" json:"service_id,omitempty"`
- NodeID *bool `protobuf:"varint,8,opt,name=node_id,json=nodeId" json:"node_id,omitempty"`
- Slot *bool `protobuf:"varint,9,opt,name=slot" json:"slot,omitempty"`
- DesiredState *bool `protobuf:"varint,10,opt,name=desired_state,json=desiredState" json:"desired_state,omitempty"`
- // supported by nodes only
- Role *bool `protobuf:"varint,11,opt,name=role" json:"role,omitempty"`
- Membership *bool `protobuf:"varint,12,opt,name=membership" json:"membership,omitempty"`
- // supported by: resource
- Kind *bool `protobuf:"varint,13,opt,name=kind" json:"kind,omitempty"`
- }
- func (m *WatchSelectors) Reset() { *m = WatchSelectors{} }
- func (*WatchSelectors) ProtoMessage() {}
- func (*WatchSelectors) Descriptor() ([]byte, []int) {
- return fileDescriptor_3708583e03e1c1e3, []int{0}
- }
- func (m *WatchSelectors) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
- }
- func (m *WatchSelectors) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- if deterministic {
- return xxx_messageInfo_WatchSelectors.Marshal(b, m, deterministic)
- } else {
- b = b[:cap(b)]
- n, err := m.MarshalTo(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
- }
- }
- func (m *WatchSelectors) XXX_Merge(src proto.Message) {
- xxx_messageInfo_WatchSelectors.Merge(m, src)
- }
- func (m *WatchSelectors) XXX_Size() int {
- return m.Size()
- }
- func (m *WatchSelectors) XXX_DiscardUnknown() {
- xxx_messageInfo_WatchSelectors.DiscardUnknown(m)
- }
- var xxx_messageInfo_WatchSelectors proto.InternalMessageInfo
- type StoreObject struct {
- WatchSelectors *WatchSelectors `protobuf:"bytes,1,req,name=watch_selectors,json=watchSelectors" json:"watch_selectors,omitempty"`
- }
- func (m *StoreObject) Reset() { *m = StoreObject{} }
- func (*StoreObject) ProtoMessage() {}
- func (*StoreObject) Descriptor() ([]byte, []int) {
- return fileDescriptor_3708583e03e1c1e3, []int{1}
- }
- func (m *StoreObject) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
- }
- func (m *StoreObject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- if deterministic {
- return xxx_messageInfo_StoreObject.Marshal(b, m, deterministic)
- } else {
- b = b[:cap(b)]
- n, err := m.MarshalTo(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
- }
- }
- func (m *StoreObject) XXX_Merge(src proto.Message) {
- xxx_messageInfo_StoreObject.Merge(m, src)
- }
- func (m *StoreObject) XXX_Size() int {
- return m.Size()
- }
- func (m *StoreObject) XXX_DiscardUnknown() {
- xxx_messageInfo_StoreObject.DiscardUnknown(m)
- }
- var xxx_messageInfo_StoreObject proto.InternalMessageInfo
- type TLSAuthorization struct {
- // Roles contains the acceptable TLS OU roles for the handler.
- Roles []string `protobuf:"bytes,1,rep,name=roles" json:"roles,omitempty"`
- // Insecure is set to true if this method does not require
- // authorization. NOTE: Specifying both "insecure" and a nonempty
- // list of roles is invalid. This would fail at codegen time.
- Insecure *bool `protobuf:"varint,2,opt,name=insecure" json:"insecure,omitempty"`
- }
- func (m *TLSAuthorization) Reset() { *m = TLSAuthorization{} }
- func (*TLSAuthorization) ProtoMessage() {}
- func (*TLSAuthorization) Descriptor() ([]byte, []int) {
- return fileDescriptor_3708583e03e1c1e3, []int{2}
- }
- func (m *TLSAuthorization) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
- }
- func (m *TLSAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- if deterministic {
- return xxx_messageInfo_TLSAuthorization.Marshal(b, m, deterministic)
- } else {
- b = b[:cap(b)]
- n, err := m.MarshalTo(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
- }
- }
- func (m *TLSAuthorization) XXX_Merge(src proto.Message) {
- xxx_messageInfo_TLSAuthorization.Merge(m, src)
- }
- func (m *TLSAuthorization) XXX_Size() int {
- return m.Size()
- }
- func (m *TLSAuthorization) XXX_DiscardUnknown() {
- xxx_messageInfo_TLSAuthorization.DiscardUnknown(m)
- }
- var xxx_messageInfo_TLSAuthorization proto.InternalMessageInfo
- var E_Deepcopy = &proto.ExtensionDesc{
- ExtendedType: (*descriptor.MessageOptions)(nil),
- ExtensionType: (*bool)(nil),
- Field: 70000,
- Name: "docker.protobuf.plugin.deepcopy",
- Tag: "varint,70000,opt,name=deepcopy,def=1",
- Filename: "github.com/docker/swarmkit/protobuf/plugin/plugin.proto",
- }
- var E_StoreObject = &proto.ExtensionDesc{
- ExtendedType: (*descriptor.MessageOptions)(nil),
- ExtensionType: (*StoreObject)(nil),
- Field: 70001,
- Name: "docker.protobuf.plugin.store_object",
- Tag: "bytes,70001,opt,name=store_object",
- Filename: "github.com/docker/swarmkit/protobuf/plugin/plugin.proto",
- }
- var E_TlsAuthorization = &proto.ExtensionDesc{
- ExtendedType: (*descriptor.MethodOptions)(nil),
- ExtensionType: (*TLSAuthorization)(nil),
- Field: 73626345,
- Name: "docker.protobuf.plugin.tls_authorization",
- Tag: "bytes,73626345,opt,name=tls_authorization",
- Filename: "github.com/docker/swarmkit/protobuf/plugin/plugin.proto",
- }
- func init() {
- proto.RegisterType((*WatchSelectors)(nil), "docker.protobuf.plugin.WatchSelectors")
- proto.RegisterType((*StoreObject)(nil), "docker.protobuf.plugin.StoreObject")
- proto.RegisterType((*TLSAuthorization)(nil), "docker.protobuf.plugin.TLSAuthorization")
- proto.RegisterExtension(E_Deepcopy)
- proto.RegisterExtension(E_StoreObject)
- proto.RegisterExtension(E_TlsAuthorization)
- }
- func init() {
- proto.RegisterFile("github.com/docker/swarmkit/protobuf/plugin/plugin.proto", fileDescriptor_3708583e03e1c1e3)
- }
- var fileDescriptor_3708583e03e1c1e3 = []byte{
- // 588 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0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 0xed, 0x95, 0x3e, 0xe6, 0x9e, 0x73, 0x91, 0x7b, 0xce, 0x65, 0xee, 0x39,
- 0xdf, 0x72, 0xcf, 0xf9, 0x3c, 0xf7, 0x4a, 0x97, 0x73, 0xaf, 0x74, 0x35, 0xf7, 0x4a, 0xbf, 0x03,
- 0x00, 0x00, 0xff, 0xff, 0x0f, 0x50, 0xb9, 0xa3, 0x05, 0x04, 0x00, 0x00,
- }
- func (m *WatchSelectors) Copy() *WatchSelectors {
- if m == nil {
- return nil
- }
- o := &WatchSelectors{}
- o.CopyFrom(m)
- return o
- }
- func (m *WatchSelectors) CopyFrom(src interface{}) {
- o := src.(*WatchSelectors)
- *m = *o
- }
- func (m *StoreObject) Copy() *StoreObject {
- if m == nil {
- return nil
- }
- o := &StoreObject{}
- o.CopyFrom(m)
- return o
- }
- func (m *StoreObject) CopyFrom(src interface{}) {
- o := src.(*StoreObject)
- *m = *o
- if o.WatchSelectors != nil {
- m.WatchSelectors = &WatchSelectors{}
- github_com_docker_swarmkit_api_deepcopy.Copy(m.WatchSelectors, o.WatchSelectors)
- }
- }
- func (m *TLSAuthorization) Copy() *TLSAuthorization {
- if m == nil {
- return nil
- }
- o := &TLSAuthorization{}
- o.CopyFrom(m)
- return o
- }
- func (m *TLSAuthorization) CopyFrom(src interface{}) {
- o := src.(*TLSAuthorization)
- *m = *o
- if o.Roles != nil {
- m.Roles = make([]string, len(o.Roles))
- copy(m.Roles, o.Roles)
- }
- }
- func (m *WatchSelectors) 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 *WatchSelectors) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.ID != nil {
- dAtA[i] = 0x8
- i++
- if *m.ID {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- }
- if m.IDPrefix != nil {
- dAtA[i] = 0x10
- i++
- if *m.IDPrefix {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- }
- if m.Name != nil {
- dAtA[i] = 0x18
- i++
- if *m.Name {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- }
- if m.NamePrefix != nil {
- dAtA[i] = 0x20
- i++
- if *m.NamePrefix {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- }
- if m.Custom != nil {
- dAtA[i] = 0x28
- i++
- if *m.Custom {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- }
- if m.CustomPrefix != nil {
- dAtA[i] = 0x30
- i++
- if *m.CustomPrefix {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- }
- if m.ServiceID != nil {
- dAtA[i] = 0x38
- i++
- if *m.ServiceID {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- }
- if m.NodeID != nil {
- dAtA[i] = 0x40
- i++
- if *m.NodeID {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- }
- if m.Slot != nil {
- dAtA[i] = 0x48
- i++
- if *m.Slot {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- }
- if m.DesiredState != nil {
- dAtA[i] = 0x50
- i++
- if *m.DesiredState {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- }
- if m.Role != nil {
- dAtA[i] = 0x58
- i++
- if *m.Role {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- }
- if m.Membership != nil {
- dAtA[i] = 0x60
- i++
- if *m.Membership {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- }
- if m.Kind != nil {
- dAtA[i] = 0x68
- i++
- if *m.Kind {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- }
- return i, nil
- }
- func (m *StoreObject) 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 *StoreObject) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.WatchSelectors == nil {
- return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("watch_selectors")
- } else {
- dAtA[i] = 0xa
- i++
- i = encodeVarintPlugin(dAtA, i, uint64(m.WatchSelectors.Size()))
- n1, err := m.WatchSelectors.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- }
- return i, nil
- }
- func (m *TLSAuthorization) 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 *TLSAuthorization) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Roles) > 0 {
- for _, s := range m.Roles {
- dAtA[i] = 0xa
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if m.Insecure != nil {
- dAtA[i] = 0x10
- i++
- if *m.Insecure {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i++
- }
- return i, nil
- }
- func encodeVarintPlugin(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 *WatchSelectors) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if m.ID != nil {
- n += 2
- }
- if m.IDPrefix != nil {
- n += 2
- }
- if m.Name != nil {
- n += 2
- }
- if m.NamePrefix != nil {
- n += 2
- }
- if m.Custom != nil {
- n += 2
- }
- if m.CustomPrefix != nil {
- n += 2
- }
- if m.ServiceID != nil {
- n += 2
- }
- if m.NodeID != nil {
- n += 2
- }
- if m.Slot != nil {
- n += 2
- }
- if m.DesiredState != nil {
- n += 2
- }
- if m.Role != nil {
- n += 2
- }
- if m.Membership != nil {
- n += 2
- }
- if m.Kind != nil {
- n += 2
- }
- return n
- }
- func (m *StoreObject) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if m.WatchSelectors != nil {
- l = m.WatchSelectors.Size()
- n += 1 + l + sovPlugin(uint64(l))
- }
- return n
- }
- func (m *TLSAuthorization) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if len(m.Roles) > 0 {
- for _, s := range m.Roles {
- l = len(s)
- n += 1 + l + sovPlugin(uint64(l))
- }
- }
- if m.Insecure != nil {
- n += 2
- }
- return n
- }
- func sovPlugin(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
- }
- func sozPlugin(x uint64) (n int) {
- return sovPlugin(uint64((x << 1) ^ uint64((int64(x) >> 63))))
- }
- func (this *WatchSelectors) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&WatchSelectors{`,
- `ID:` + valueToStringPlugin(this.ID) + `,`,
- `IDPrefix:` + valueToStringPlugin(this.IDPrefix) + `,`,
- `Name:` + valueToStringPlugin(this.Name) + `,`,
- `NamePrefix:` + valueToStringPlugin(this.NamePrefix) + `,`,
- `Custom:` + valueToStringPlugin(this.Custom) + `,`,
- `CustomPrefix:` + valueToStringPlugin(this.CustomPrefix) + `,`,
- `ServiceID:` + valueToStringPlugin(this.ServiceID) + `,`,
- `NodeID:` + valueToStringPlugin(this.NodeID) + `,`,
- `Slot:` + valueToStringPlugin(this.Slot) + `,`,
- `DesiredState:` + valueToStringPlugin(this.DesiredState) + `,`,
- `Role:` + valueToStringPlugin(this.Role) + `,`,
- `Membership:` + valueToStringPlugin(this.Membership) + `,`,
- `Kind:` + valueToStringPlugin(this.Kind) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *StoreObject) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StoreObject{`,
- `WatchSelectors:` + strings.Replace(fmt.Sprintf("%v", this.WatchSelectors), "WatchSelectors", "WatchSelectors", 1) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *TLSAuthorization) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&TLSAuthorization{`,
- `Roles:` + fmt.Sprintf("%v", this.Roles) + `,`,
- `Insecure:` + valueToStringPlugin(this.Insecure) + `,`,
- `}`,
- }, "")
- return s
- }
- func valueToStringPlugin(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
- }
- func (m *WatchSelectors) 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 ErrIntOverflowPlugin
- }
- 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: WatchSelectors: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: WatchSelectors: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.ID = &b
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field IDPrefix", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.IDPrefix = &b
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.Name = &b
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field NamePrefix", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.NamePrefix = &b
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Custom", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.Custom = &b
- case 6:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field CustomPrefix", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.CustomPrefix = &b
- case 7:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ServiceID", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.ServiceID = &b
- case 8:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field NodeID", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.NodeID = &b
- case 9:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Slot", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.Slot = &b
- case 10:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field DesiredState", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.DesiredState = &b
- case 11:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.Role = &b
- case 12:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Membership", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.Membership = &b
- case 13:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.Kind = &b
- default:
- iNdEx = preIndex
- skippy, err := skipPlugin(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthPlugin
- }
- if (iNdEx + skippy) < 0 {
- return ErrInvalidLengthPlugin
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *StoreObject) Unmarshal(dAtA []byte) error {
- var hasFields [1]uint64
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- 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: StoreObject: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: StoreObject: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field WatchSelectors", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthPlugin
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthPlugin
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.WatchSelectors == nil {
- m.WatchSelectors = &WatchSelectors{}
- }
- if err := m.WatchSelectors.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- hasFields[0] |= uint64(0x00000001)
- default:
- iNdEx = preIndex
- skippy, err := skipPlugin(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthPlugin
- }
- if (iNdEx + skippy) < 0 {
- return ErrInvalidLengthPlugin
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if hasFields[0]&uint64(0x00000001) == 0 {
- return github_com_gogo_protobuf_proto.NewRequiredNotSetError("watch_selectors")
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *TLSAuthorization) 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 ErrIntOverflowPlugin
- }
- 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: TLSAuthorization: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: TLSAuthorization: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- 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 ErrInvalidLengthPlugin
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthPlugin
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Roles = append(m.Roles, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Insecure", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- b := bool(v != 0)
- m.Insecure = &b
- default:
- iNdEx = preIndex
- skippy, err := skipPlugin(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthPlugin
- }
- if (iNdEx + skippy) < 0 {
- return ErrInvalidLengthPlugin
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func skipPlugin(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, ErrIntOverflowPlugin
- }
- 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, ErrIntOverflowPlugin
- }
- 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, ErrIntOverflowPlugin
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if length < 0 {
- return 0, ErrInvalidLengthPlugin
- }
- iNdEx += length
- if iNdEx < 0 {
- return 0, ErrInvalidLengthPlugin
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowPlugin
- }
- 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 := skipPlugin(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- if iNdEx < 0 {
- return 0, ErrInvalidLengthPlugin
- }
- }
- 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 (
- ErrInvalidLengthPlugin = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowPlugin = fmt.Errorf("proto: integer overflow")
- )
|