Documentation ¶
Overview ¶
Package protonum is used to rewrite field names to field numbers in relapse grammars.
Index ¶
- func FieldNamesToNumbers(pkgName, msgName string, desc *descriptor.FileDescriptorSet, ...) (*ast.Grammar, error)
- func ProtonumDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet)
- type BightKnot
- func (this *BightKnot) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet)
- func (*BightKnot) Descriptor() ([]byte, []int)
- func (m *BightKnot) GetLoop() *Knot
- func (m *BightKnot) GetTurn() bool
- func (this *BightKnot) GoString() string
- func (*BightKnot) ProtoMessage()
- func (m *BightKnot) Reset()
- func (m *BightKnot) String() string
- func (m *BightKnot) XXX_DiscardUnknown()
- func (m *BightKnot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *BightKnot) XXX_Merge(src proto.Message)
- func (m *BightKnot) XXX_Size() int
- func (m *BightKnot) XXX_Unmarshal(b []byte) error
- type ErrDup
- type KeyValue
- func (this *KeyValue) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet)
- func (*KeyValue) Descriptor() ([]byte, []int)
- func (m *KeyValue) GetKey() string
- func (m *KeyValue) GetValue() string
- func (this *KeyValue) GoString() string
- func (*KeyValue) ProtoMessage()
- func (m *KeyValue) Reset()
- func (m *KeyValue) String() string
- func (m *KeyValue) XXX_DiscardUnknown()
- func (m *KeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *KeyValue) XXX_Merge(src proto.Message)
- func (m *KeyValue) XXX_Size() int
- func (m *KeyValue) XXX_Unmarshal(b []byte) error
- type Knot
- func (this *Knot) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet)
- func (*Knot) Descriptor() ([]byte, []int)
- func (m *Knot) GetBight() []*BightKnot
- func (m *Knot) GetBitterEnd() *Knot
- func (m *Knot) GetElbow() bool
- func (this *Knot) GoString() string
- func (*Knot) ProtoMessage()
- func (m *Knot) Reset()
- func (m *Knot) String() string
- func (m *Knot) XXX_DiscardUnknown()
- func (m *Knot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Knot) XXX_Merge(src proto.Message)
- func (m *Knot) XXX_Size() int
- func (m *Knot) XXX_Unmarshal(b []byte) error
- type ProtoNum
- func (this *ProtoNum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet)
- func (*ProtoNum) Descriptor() ([]byte, []int)
- func (m *ProtoNum) GetKeyValue() []*KeyValue
- func (this *ProtoNum) GoString() string
- func (*ProtoNum) ProtoMessage()
- func (m *ProtoNum) Reset()
- func (m *ProtoNum) String() string
- func (m *ProtoNum) XXX_DiscardUnknown()
- func (m *ProtoNum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *ProtoNum) XXX_Merge(src proto.Message)
- func (m *ProtoNum) XXX_Size() int
- func (m *ProtoNum) XXX_Unmarshal(b []byte) error
- type Topsy
- func (this *Topsy) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet)
- func (*Topsy) Descriptor() ([]byte, []int)
- func (m *Topsy) GetA() int64
- func (m *Topsy) GetB() int64
- func (this *Topsy) GoString() string
- func (*Topsy) ProtoMessage()
- func (m *Topsy) Reset()
- func (m *Topsy) String() string
- func (m *Topsy) XXX_DiscardUnknown()
- func (m *Topsy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Topsy) XXX_Merge(src proto.Message)
- func (m *Topsy) XXX_Size() int
- func (m *Topsy) XXX_Unmarshal(b []byte) error
- type TopsyTurvy
- func (this *TopsyTurvy) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet)
- func (*TopsyTurvy) Descriptor() ([]byte, []int)
- func (m *TopsyTurvy) GetTopsy() *Topsy
- func (m *TopsyTurvy) GetTurvy() *Turvy
- func (this *TopsyTurvy) GoString() string
- func (*TopsyTurvy) ProtoMessage()
- func (m *TopsyTurvy) Reset()
- func (m *TopsyTurvy) String() string
- func (m *TopsyTurvy) XXX_DiscardUnknown()
- func (m *TopsyTurvy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *TopsyTurvy) XXX_Merge(src proto.Message)
- func (m *TopsyTurvy) XXX_Size() int
- func (m *TopsyTurvy) XXX_Unmarshal(b []byte) error
- type Turvy
- func (this *Turvy) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet)
- func (*Turvy) Descriptor() ([]byte, []int)
- func (m *Turvy) GetA() int64
- func (m *Turvy) GetB() int64
- func (this *Turvy) GoString() string
- func (*Turvy) ProtoMessage()
- func (m *Turvy) Reset()
- func (m *Turvy) String() string
- func (m *Turvy) XXX_DiscardUnknown()
- func (m *Turvy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Turvy) XXX_Merge(src proto.Message)
- func (m *Turvy) XXX_Size() int
- func (m *Turvy) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FieldNamesToNumbers ¶
func FieldNamesToNumbers(pkgName, msgName string, desc *descriptor.FileDescriptorSet, grammar *ast.Grammar) (*ast.Grammar, error)
FieldNamesToNumbers rewrites field names contained in the grammar to their respective field numbers found in the protocol buffer filedescriptorset. This allows for more speedy field comparisons in validation when used in conjunction with the ProtoNumParser.
func ProtonumDescription ¶
func ProtonumDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet)
Types ¶
type BightKnot ¶
type BightKnot struct { Loop *Knot `protobuf:"bytes,1,opt,name=Loop" json:"Loop,omitempty"` Turn *bool `protobuf:"varint,2,opt,name=Turn" json:"Turn,omitempty"` XXX_unrecognized []byte `json:"-"` }
BightKnot is used for testing of the protonum package.
func (*BightKnot) Description ¶
func (this *BightKnot) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet)
func (*BightKnot) Descriptor ¶
func (*BightKnot) ProtoMessage ¶
func (*BightKnot) ProtoMessage()
func (*BightKnot) XXX_DiscardUnknown ¶
func (m *BightKnot) XXX_DiscardUnknown()
func (*BightKnot) XXX_Marshal ¶
func (*BightKnot) XXX_Unmarshal ¶
type KeyValue ¶
type KeyValue struct { Key *string `protobuf:"bytes,1,opt,name=Key" json:"Key,omitempty"` Value *string `protobuf:"bytes,2,opt,name=Value" json:"Value,omitempty"` XXX_unrecognized []byte `json:"-"` }
KeyValue is used for testing of the protonum package.
func (*KeyValue) Description ¶
func (this *KeyValue) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet)
func (*KeyValue) Descriptor ¶
func (*KeyValue) ProtoMessage ¶
func (*KeyValue) ProtoMessage()
func (*KeyValue) XXX_DiscardUnknown ¶
func (m *KeyValue) XXX_DiscardUnknown()
func (*KeyValue) XXX_Marshal ¶
func (*KeyValue) XXX_Unmarshal ¶
type Knot ¶
type Knot struct { Bight []*BightKnot `protobuf:"bytes,1,rep,name=Bight" json:"Bight,omitempty"` Elbow *bool `protobuf:"varint,2,opt,name=Elbow" json:"Elbow,omitempty"` BitterEnd *Knot `protobuf:"bytes,3,opt,name=BitterEnd" json:"BitterEnd,omitempty"` XXX_unrecognized []byte `json:"-"` }
Knot is used for testing of the protonum package.
func (*Knot) Description ¶
func (this *Knot) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet)
func (*Knot) Descriptor ¶
func (*Knot) GetBitterEnd ¶
func (*Knot) ProtoMessage ¶
func (*Knot) ProtoMessage()
func (*Knot) XXX_DiscardUnknown ¶
func (m *Knot) XXX_DiscardUnknown()
func (*Knot) XXX_Unmarshal ¶
type ProtoNum ¶
type ProtoNum struct { KeyValue []*KeyValue `protobuf:"bytes,2,rep,name=KeyValue" json:"KeyValue,omitempty"` XXX_unrecognized []byte `json:"-"` }
ProtoNum is used for testing of the protonum package.
func (*ProtoNum) Description ¶
func (this *ProtoNum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet)
func (*ProtoNum) Descriptor ¶
func (*ProtoNum) GetKeyValue ¶
func (*ProtoNum) ProtoMessage ¶
func (*ProtoNum) ProtoMessage()
func (*ProtoNum) XXX_DiscardUnknown ¶
func (m *ProtoNum) XXX_DiscardUnknown()
func (*ProtoNum) XXX_Marshal ¶
func (*ProtoNum) XXX_Unmarshal ¶
type Topsy ¶
type Topsy struct { A *int64 `protobuf:"varint,1,opt,name=A" json:"A,omitempty"` B *int64 `protobuf:"varint,2,opt,name=B" json:"B,omitempty"` XXX_unrecognized []byte `json:"-"` }
Topsy is used for testing of the protonum package.
func (*Topsy) Description ¶
func (this *Topsy) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet)
func (*Topsy) Descriptor ¶
func (*Topsy) ProtoMessage ¶
func (*Topsy) ProtoMessage()
func (*Topsy) XXX_DiscardUnknown ¶
func (m *Topsy) XXX_DiscardUnknown()
func (*Topsy) XXX_Marshal ¶
func (*Topsy) XXX_Unmarshal ¶
type TopsyTurvy ¶
type TopsyTurvy struct { Topsy *Topsy `protobuf:"bytes,1,opt,name=Topsy" json:"Topsy,omitempty"` Turvy *Turvy `protobuf:"bytes,2,opt,name=Turvy" json:"Turvy,omitempty"` XXX_unrecognized []byte `json:"-"` }
TopsyTurvy is used for testing of the protonum package.
func (*TopsyTurvy) Description ¶
func (this *TopsyTurvy) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet)
func (*TopsyTurvy) Descriptor ¶
func (*TopsyTurvy) Descriptor() ([]byte, []int)
func (*TopsyTurvy) GetTopsy ¶
func (m *TopsyTurvy) GetTopsy() *Topsy
func (*TopsyTurvy) GetTurvy ¶
func (m *TopsyTurvy) GetTurvy() *Turvy
func (*TopsyTurvy) GoString ¶
func (this *TopsyTurvy) GoString() string
func (*TopsyTurvy) ProtoMessage ¶
func (*TopsyTurvy) ProtoMessage()
func (*TopsyTurvy) Reset ¶
func (m *TopsyTurvy) Reset()
func (*TopsyTurvy) String ¶
func (m *TopsyTurvy) String() string
func (*TopsyTurvy) XXX_DiscardUnknown ¶
func (m *TopsyTurvy) XXX_DiscardUnknown()
func (*TopsyTurvy) XXX_Marshal ¶
func (m *TopsyTurvy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TopsyTurvy) XXX_Merge ¶
func (dst *TopsyTurvy) XXX_Merge(src proto.Message)
func (*TopsyTurvy) XXX_Size ¶
func (m *TopsyTurvy) XXX_Size() int
func (*TopsyTurvy) XXX_Unmarshal ¶
func (m *TopsyTurvy) XXX_Unmarshal(b []byte) error
type Turvy ¶
type Turvy struct { B *int64 `protobuf:"varint,1,opt,name=B" json:"B,omitempty"` A *int64 `protobuf:"varint,2,opt,name=A" json:"A,omitempty"` XXX_unrecognized []byte `json:"-"` }
Turvy is used for testing of the protonum package.
func (*Turvy) Description ¶
func (this *Turvy) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet)
func (*Turvy) Descriptor ¶
func (*Turvy) ProtoMessage ¶
func (*Turvy) ProtoMessage()
func (*Turvy) XXX_DiscardUnknown ¶
func (m *Turvy) XXX_DiscardUnknown()