protonum

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package protonum is used to rewrite field names to field numbers in relapse grammars.

Index

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.

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) Descriptor

func (*BightKnot) Descriptor() ([]byte, []int)

func (*BightKnot) GetLoop

func (m *BightKnot) GetLoop() *Knot

func (*BightKnot) GetTurn

func (m *BightKnot) GetTurn() bool

func (*BightKnot) GoString

func (this *BightKnot) GoString() string

func (*BightKnot) ProtoMessage

func (*BightKnot) ProtoMessage()

func (*BightKnot) Reset

func (m *BightKnot) Reset()

func (*BightKnot) String

func (m *BightKnot) String() string

func (*BightKnot) XXX_DiscardUnknown

func (m *BightKnot) XXX_DiscardUnknown()

func (*BightKnot) XXX_Marshal

func (m *BightKnot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BightKnot) XXX_Merge

func (dst *BightKnot) XXX_Merge(src proto.Message)

func (*BightKnot) XXX_Size

func (m *BightKnot) XXX_Size() int

func (*BightKnot) XXX_Unmarshal

func (m *BightKnot) XXX_Unmarshal(b []byte) error

type ErrDup

type ErrDup struct {
	// contains filtered or unexported fields
}

func (*ErrDup) Error

func (this *ErrDup) Error() string

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) Descriptor

func (*KeyValue) Descriptor() ([]byte, []int)

func (*KeyValue) GetKey

func (m *KeyValue) GetKey() string

func (*KeyValue) GetValue

func (m *KeyValue) GetValue() string

func (*KeyValue) GoString

func (this *KeyValue) GoString() string

func (*KeyValue) ProtoMessage

func (*KeyValue) ProtoMessage()

func (*KeyValue) Reset

func (m *KeyValue) Reset()

func (*KeyValue) String

func (m *KeyValue) String() string

func (*KeyValue) XXX_DiscardUnknown

func (m *KeyValue) XXX_DiscardUnknown()

func (*KeyValue) XXX_Marshal

func (m *KeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*KeyValue) XXX_Merge

func (dst *KeyValue) XXX_Merge(src proto.Message)

func (*KeyValue) XXX_Size

func (m *KeyValue) XXX_Size() int

func (*KeyValue) XXX_Unmarshal

func (m *KeyValue) XXX_Unmarshal(b []byte) error

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) Descriptor

func (*Knot) Descriptor() ([]byte, []int)

func (*Knot) GetBight

func (m *Knot) GetBight() []*BightKnot

func (*Knot) GetBitterEnd

func (m *Knot) GetBitterEnd() *Knot

func (*Knot) GetElbow

func (m *Knot) GetElbow() bool

func (*Knot) GoString

func (this *Knot) GoString() string

func (*Knot) ProtoMessage

func (*Knot) ProtoMessage()

func (*Knot) Reset

func (m *Knot) Reset()

func (*Knot) String

func (m *Knot) String() string

func (*Knot) XXX_DiscardUnknown

func (m *Knot) XXX_DiscardUnknown()

func (*Knot) XXX_Marshal

func (m *Knot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Knot) XXX_Merge

func (dst *Knot) XXX_Merge(src proto.Message)

func (*Knot) XXX_Size

func (m *Knot) XXX_Size() int

func (*Knot) XXX_Unmarshal

func (m *Knot) XXX_Unmarshal(b []byte) error

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) Descriptor

func (*ProtoNum) Descriptor() ([]byte, []int)

func (*ProtoNum) GetKeyValue

func (m *ProtoNum) GetKeyValue() []*KeyValue

func (*ProtoNum) GoString

func (this *ProtoNum) GoString() string

func (*ProtoNum) ProtoMessage

func (*ProtoNum) ProtoMessage()

func (*ProtoNum) Reset

func (m *ProtoNum) Reset()

func (*ProtoNum) String

func (m *ProtoNum) String() string

func (*ProtoNum) XXX_DiscardUnknown

func (m *ProtoNum) XXX_DiscardUnknown()

func (*ProtoNum) XXX_Marshal

func (m *ProtoNum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProtoNum) XXX_Merge

func (dst *ProtoNum) XXX_Merge(src proto.Message)

func (*ProtoNum) XXX_Size

func (m *ProtoNum) XXX_Size() int

func (*ProtoNum) XXX_Unmarshal

func (m *ProtoNum) XXX_Unmarshal(b []byte) error

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) Descriptor

func (*Topsy) Descriptor() ([]byte, []int)

func (*Topsy) GetA

func (m *Topsy) GetA() int64

func (*Topsy) GetB

func (m *Topsy) GetB() int64

func (*Topsy) GoString

func (this *Topsy) GoString() string

func (*Topsy) ProtoMessage

func (*Topsy) ProtoMessage()

func (*Topsy) Reset

func (m *Topsy) Reset()

func (*Topsy) String

func (m *Topsy) String() string

func (*Topsy) XXX_DiscardUnknown

func (m *Topsy) XXX_DiscardUnknown()

func (*Topsy) XXX_Marshal

func (m *Topsy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Topsy) XXX_Merge

func (dst *Topsy) XXX_Merge(src proto.Message)

func (*Topsy) XXX_Size

func (m *Topsy) XXX_Size() int

func (*Topsy) XXX_Unmarshal

func (m *Topsy) XXX_Unmarshal(b []byte) error

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) 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) Descriptor

func (*Turvy) Descriptor() ([]byte, []int)

func (*Turvy) GetA

func (m *Turvy) GetA() int64

func (*Turvy) GetB

func (m *Turvy) GetB() int64

func (*Turvy) GoString

func (this *Turvy) GoString() string

func (*Turvy) ProtoMessage

func (*Turvy) ProtoMessage()

func (*Turvy) Reset

func (m *Turvy) Reset()

func (*Turvy) String

func (m *Turvy) String() string

func (*Turvy) XXX_DiscardUnknown

func (m *Turvy) XXX_DiscardUnknown()

func (*Turvy) XXX_Marshal

func (m *Turvy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Turvy) XXX_Merge

func (dst *Turvy) XXX_Merge(src proto.Message)

func (*Turvy) XXX_Size

func (m *Turvy) XXX_Size() int

func (*Turvy) XXX_Unmarshal

func (m *Turvy) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL