ContextlessMsg is designed to carry a message of completely arbitrary type Because there is no context for the type embedded in the message, the opaque type must be dynamically added at runtime
type ContextlessMsg struct { OpaqueField []byte `protobuf:"bytes,1,opt,name=opaque_field,json=opaqueField,proto3" json:"opaque_field,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ContextlessMsg) Descriptor() ([]byte, []int)
func (m *ContextlessMsg) GetOpaqueField() []byte
func (*ContextlessMsg) ProtoMessage()
func (m *ContextlessMsg) Reset()
func (m *ContextlessMsg) String() string
func (cm *ContextlessMsg) VariablyOpaqueFields() []string
func (m *ContextlessMsg) XXX_DiscardUnknown()
func (m *ContextlessMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (dst *ContextlessMsg) XXX_Merge(src proto.Message)
func (m *ContextlessMsg) XXX_Size() int
func (m *ContextlessMsg) XXX_Unmarshal(b []byte) error
type DynamicMessageWrapper struct { *ContextlessMsg // contains filtered or unexported fields }
func (dmw *DynamicMessageWrapper) Underlying() proto.Message
func (dmw *DynamicMessageWrapper) VariablyOpaqueFieldProto(name string) (proto.Message, error)
DynamicMsg is designed to test the dynamic message component The dynamic wrapper applied to ContextlessMsg is determined by dynamic_type
type DynamicMsg struct { DynamicType string `protobuf:"bytes,1,opt,name=dynamic_type,json=dynamicType,proto3" json:"dynamic_type,omitempty"` PlainDynamicField *ContextlessMsg `protobuf:"bytes,2,opt,name=plain_dynamic_field,json=plainDynamicField,proto3" json:"plain_dynamic_field,omitempty"` MapDynamicField map[string]*ContextlessMsg `protobuf:"bytes,3,rep,name=map_dynamic_field,json=mapDynamicField,proto3" json:"map_dynamic_field,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` SliceDynamicField []*ContextlessMsg `protobuf:"bytes,4,rep,name=slice_dynamic_field,json=sliceDynamicField,proto3" json:"slice_dynamic_field,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*DynamicMsg) Descriptor() ([]byte, []int)
func (vom *DynamicMsg) DynamicFieldProto(name string, underlying proto.Message) (proto.Message, error)
func (vom *DynamicMsg) DynamicFields() []string
func (vom *DynamicMsg) DynamicMapFieldProto(name string, key string, underlying proto.Message) (proto.Message, error)
func (vom *DynamicMsg) DynamicMapFields() []string
func (vom *DynamicMsg) DynamicSliceFieldProto(name string, index int, underlying proto.Message) (proto.Message, error)
func (vom *DynamicMsg) DynamicSliceFields() []string
func (m *DynamicMsg) GetDynamicType() string
func (m *DynamicMsg) GetMapDynamicField() map[string]*ContextlessMsg
func (m *DynamicMsg) GetPlainDynamicField() *ContextlessMsg
func (m *DynamicMsg) GetSliceDynamicField() []*ContextlessMsg
func (*DynamicMsg) ProtoMessage()
func (m *DynamicMsg) Reset()
func (m *DynamicMsg) String() string
func (m *DynamicMsg) XXX_DiscardUnknown()
func (m *DynamicMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (dst *DynamicMsg) XXX_Merge(src proto.Message)
func (m *DynamicMsg) XXX_Size() int
func (m *DynamicMsg) XXX_Unmarshal(b []byte) error
NestedMsg is designed to test the nested message component
type NestedMsg struct { PlainNestedField *SimpleMsg `protobuf:"bytes,1,opt,name=plain_nested_field,json=plainNestedField,proto3" json:"plain_nested_field,omitempty"` MapNestedField map[string]*SimpleMsg `protobuf:"bytes,2,rep,name=map_nested_field,json=mapNestedField,proto3" json:"map_nested_field,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` SliceNestedField []*SimpleMsg `protobuf:"bytes,3,rep,name=slice_nested_field,json=sliceNestedField,proto3" json:"slice_nested_field,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*NestedMsg) Descriptor() ([]byte, []int)
func (m *NestedMsg) GetMapNestedField() map[string]*SimpleMsg
func (m *NestedMsg) GetPlainNestedField() *SimpleMsg
func (m *NestedMsg) GetSliceNestedField() []*SimpleMsg
func (*NestedMsg) ProtoMessage()
func (m *NestedMsg) Reset()
func (m *NestedMsg) String() string
func (m *NestedMsg) XXX_DiscardUnknown()
func (m *NestedMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (dst *NestedMsg) XXX_Merge(src proto.Message)
func (m *NestedMsg) XXX_Size() int
func (m *NestedMsg) XXX_Unmarshal(b []byte) error
SimpleMsg is designed to test that all three types of message fields, plain, map, and slice are handled by the protolator tool
type SimpleMsg struct { PlainField string `protobuf:"bytes,1,opt,name=plain_field,json=plainField,proto3" json:"plain_field,omitempty"` MapField map[string]string `protobuf:"bytes,2,rep,name=map_field,json=mapField,proto3" json:"map_field,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` SliceField []string `protobuf:"bytes,3,rep,name=slice_field,json=sliceField,proto3" json:"slice_field,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SimpleMsg) Descriptor() ([]byte, []int)
func (m *SimpleMsg) GetMapField() map[string]string
func (m *SimpleMsg) GetPlainField() string
func (m *SimpleMsg) GetSliceField() []string
func (*SimpleMsg) ProtoMessage()
func (m *SimpleMsg) Reset()
func (m *SimpleMsg) String() string
func (m *SimpleMsg) XXX_DiscardUnknown()
func (m *SimpleMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (dst *SimpleMsg) XXX_Merge(src proto.Message)
func (m *SimpleMsg) XXX_Size() int
func (m *SimpleMsg) XXX_Unmarshal(b []byte) error
StaticallyOpaqueMsg is designed to test the statically opaque message component All fields are statically marshaled to the NestedMsg type
type StaticallyOpaqueMsg struct { PlainOpaqueField []byte `protobuf:"bytes,1,opt,name=plain_opaque_field,json=plainOpaqueField,proto3" json:"plain_opaque_field,omitempty"` MapOpaqueField map[string][]byte `protobuf:"bytes,2,rep,name=map_opaque_field,json=mapOpaqueField,proto3" json:"map_opaque_field,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` SliceOpaqueField [][]byte `protobuf:"bytes,3,rep,name=slice_opaque_field,json=sliceOpaqueField,proto3" json:"slice_opaque_field,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*StaticallyOpaqueMsg) Descriptor() ([]byte, []int)
func (m *StaticallyOpaqueMsg) GetMapOpaqueField() map[string][]byte
func (m *StaticallyOpaqueMsg) GetPlainOpaqueField() []byte
func (m *StaticallyOpaqueMsg) GetSliceOpaqueField() [][]byte
func (*StaticallyOpaqueMsg) ProtoMessage()
func (m *StaticallyOpaqueMsg) Reset()
func (som *StaticallyOpaqueMsg) StaticallyOpaqueFieldProto(name string) (proto.Message, error)
func (som *StaticallyOpaqueMsg) StaticallyOpaqueFields() []string
func (som *StaticallyOpaqueMsg) StaticallyOpaqueMapFieldProto(name string, key string) (proto.Message, error)
func (som *StaticallyOpaqueMsg) StaticallyOpaqueMapFields() []string
func (som *StaticallyOpaqueMsg) StaticallyOpaqueSliceFieldProto(name string, index int) (proto.Message, error)
func (som *StaticallyOpaqueMsg) StaticallyOpaqueSliceFields() []string
func (m *StaticallyOpaqueMsg) String() string
func (m *StaticallyOpaqueMsg) XXX_DiscardUnknown()
func (m *StaticallyOpaqueMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (dst *StaticallyOpaqueMsg) XXX_Merge(src proto.Message)
func (m *StaticallyOpaqueMsg) XXX_Size() int
func (m *StaticallyOpaqueMsg) XXX_Unmarshal(b []byte) error
UnmarshalableDeepFields contains fields which are defined to be opaque, but will return an error if they are asked to be deserialized.
type UnmarshalableDeepFields struct { PlainOpaqueField []byte `protobuf:"bytes,1,opt,name=plain_opaque_field,json=plainOpaqueField,proto3" json:"plain_opaque_field,omitempty"` MapOpaqueField map[string][]byte `protobuf:"bytes,2,rep,name=map_opaque_field,json=mapOpaqueField,proto3" json:"map_opaque_field,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` SliceOpaqueField [][]byte `protobuf:"bytes,3,rep,name=slice_opaque_field,json=sliceOpaqueField,proto3" json:"slice_opaque_field,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*UnmarshalableDeepFields) Descriptor() ([]byte, []int)
func (m *UnmarshalableDeepFields) GetMapOpaqueField() map[string][]byte
func (m *UnmarshalableDeepFields) GetPlainOpaqueField() []byte
func (m *UnmarshalableDeepFields) GetSliceOpaqueField() [][]byte
func (*UnmarshalableDeepFields) ProtoMessage()
func (m *UnmarshalableDeepFields) Reset()
func (udf *UnmarshalableDeepFields) StaticallyOpaqueFieldProto(name string) (proto.Message, error)
func (udf *UnmarshalableDeepFields) StaticallyOpaqueFields() []string
func (udf *UnmarshalableDeepFields) StaticallyOpaqueMapFieldProto(name, key string) (proto.Message, error)
func (udf *UnmarshalableDeepFields) StaticallyOpaqueMapFields() []string
func (udf *UnmarshalableDeepFields) StaticallyOpaqueSliceFieldProto(name string, index int) (proto.Message, error)
func (udf *UnmarshalableDeepFields) StaticallyOpaqueSliceFields() []string
func (m *UnmarshalableDeepFields) String() string
func (m *UnmarshalableDeepFields) XXX_DiscardUnknown()
func (m *UnmarshalableDeepFields) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (dst *UnmarshalableDeepFields) XXX_Merge(src proto.Message)
func (m *UnmarshalableDeepFields) XXX_Size() int
func (m *UnmarshalableDeepFields) XXX_Unmarshal(b []byte) error
VariablyOpaqueMsg is designed to test the staticaly opaque message component The opaque type is determined by opaque_type
type VariablyOpaqueMsg struct { OpaqueType string `protobuf:"bytes,1,opt,name=opaque_type,json=opaqueType,proto3" json:"opaque_type,omitempty"` PlainOpaqueField []byte `protobuf:"bytes,2,opt,name=plain_opaque_field,json=plainOpaqueField,proto3" json:"plain_opaque_field,omitempty"` MapOpaqueField map[string][]byte `protobuf:"bytes,3,rep,name=map_opaque_field,json=mapOpaqueField,proto3" json:"map_opaque_field,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` SliceOpaqueField [][]byte `protobuf:"bytes,4,rep,name=slice_opaque_field,json=sliceOpaqueField,proto3" json:"slice_opaque_field,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*VariablyOpaqueMsg) Descriptor() ([]byte, []int)
func (m *VariablyOpaqueMsg) GetMapOpaqueField() map[string][]byte
func (m *VariablyOpaqueMsg) GetOpaqueType() string
func (m *VariablyOpaqueMsg) GetPlainOpaqueField() []byte
func (m *VariablyOpaqueMsg) GetSliceOpaqueField() [][]byte
func (*VariablyOpaqueMsg) ProtoMessage()
func (m *VariablyOpaqueMsg) Reset()
func (m *VariablyOpaqueMsg) String() string
func (vom *VariablyOpaqueMsg) VariablyOpaqueFieldProto(name string) (proto.Message, error)
func (vom *VariablyOpaqueMsg) VariablyOpaqueFields() []string
func (vom *VariablyOpaqueMsg) VariablyOpaqueMapFieldProto(name string, key string) (proto.Message, error)
func (vom *VariablyOpaqueMsg) VariablyOpaqueMapFields() []string
func (vom *VariablyOpaqueMsg) VariablyOpaqueSliceFieldProto(name string, index int) (proto.Message, error)
func (vom *VariablyOpaqueMsg) VariablyOpaqueSliceFields() []string
func (m *VariablyOpaqueMsg) XXX_DiscardUnknown()
func (m *VariablyOpaqueMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (dst *VariablyOpaqueMsg) XXX_Merge(src proto.Message)
func (m *VariablyOpaqueMsg) XXX_Size() int
func (m *VariablyOpaqueMsg) XXX_Unmarshal(b []byte) error