fabric: github.com/hyperledger/fabric/common/tools/protolator/testprotos Index | Files

package testprotos

import "github.com/hyperledger/fabric/common/tools/protolator/testprotos"

Index

Package Files

sample.go sample.pb.go

type ContextlessMsg Uses

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:"-"`
}

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

func (*ContextlessMsg) Descriptor Uses

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

func (*ContextlessMsg) GetOpaqueField Uses

func (m *ContextlessMsg) GetOpaqueField() []byte

func (*ContextlessMsg) ProtoMessage Uses

func (*ContextlessMsg) ProtoMessage()

func (*ContextlessMsg) Reset Uses

func (m *ContextlessMsg) Reset()

func (*ContextlessMsg) String Uses

func (m *ContextlessMsg) String() string

func (*ContextlessMsg) VariablyOpaqueFields Uses

func (cm *ContextlessMsg) VariablyOpaqueFields() []string

func (*ContextlessMsg) XXX_DiscardUnknown Uses

func (m *ContextlessMsg) XXX_DiscardUnknown()

func (*ContextlessMsg) XXX_Marshal Uses

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

func (*ContextlessMsg) XXX_Merge Uses

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

func (*ContextlessMsg) XXX_Size Uses

func (m *ContextlessMsg) XXX_Size() int

func (*ContextlessMsg) XXX_Unmarshal Uses

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

type DynamicMessageWrapper Uses

type DynamicMessageWrapper struct {
    *ContextlessMsg
    // contains filtered or unexported fields
}

func (*DynamicMessageWrapper) Underlying Uses

func (dmw *DynamicMessageWrapper) Underlying() proto.Message

func (*DynamicMessageWrapper) VariablyOpaqueFieldProto Uses

func (dmw *DynamicMessageWrapper) VariablyOpaqueFieldProto(name string) (proto.Message, error)

type DynamicMsg Uses

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:"-"`
}

DynamicMsg is designed to test the dynamic message component The dynamic wrapper applied to ContextlessMsg is determined by dynamic_type

func (*DynamicMsg) Descriptor Uses

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

func (*DynamicMsg) DynamicFieldProto Uses

func (vom *DynamicMsg) DynamicFieldProto(name string, underlying proto.Message) (proto.Message, error)

func (*DynamicMsg) DynamicFields Uses

func (vom *DynamicMsg) DynamicFields() []string

func (*DynamicMsg) DynamicMapFieldProto Uses

func (vom *DynamicMsg) DynamicMapFieldProto(name string, key string, underlying proto.Message) (proto.Message, error)

func (*DynamicMsg) DynamicMapFields Uses

func (vom *DynamicMsg) DynamicMapFields() []string

func (*DynamicMsg) DynamicSliceFieldProto Uses

func (vom *DynamicMsg) DynamicSliceFieldProto(name string, index int, underlying proto.Message) (proto.Message, error)

func (*DynamicMsg) DynamicSliceFields Uses

func (vom *DynamicMsg) DynamicSliceFields() []string

func (*DynamicMsg) GetDynamicType Uses

func (m *DynamicMsg) GetDynamicType() string

func (*DynamicMsg) GetMapDynamicField Uses

func (m *DynamicMsg) GetMapDynamicField() map[string]*ContextlessMsg

func (*DynamicMsg) GetPlainDynamicField Uses

func (m *DynamicMsg) GetPlainDynamicField() *ContextlessMsg

func (*DynamicMsg) GetSliceDynamicField Uses

func (m *DynamicMsg) GetSliceDynamicField() []*ContextlessMsg

func (*DynamicMsg) ProtoMessage Uses

func (*DynamicMsg) ProtoMessage()

func (*DynamicMsg) Reset Uses

func (m *DynamicMsg) Reset()

func (*DynamicMsg) String Uses

func (m *DynamicMsg) String() string

func (*DynamicMsg) XXX_DiscardUnknown Uses

func (m *DynamicMsg) XXX_DiscardUnknown()

func (*DynamicMsg) XXX_Marshal Uses

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

func (*DynamicMsg) XXX_Merge Uses

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

func (*DynamicMsg) XXX_Size Uses

func (m *DynamicMsg) XXX_Size() int

func (*DynamicMsg) XXX_Unmarshal Uses

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

type NestedMsg Uses

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:"-"`
}

NestedMsg is designed to test the nested message component

func (*NestedMsg) Descriptor Uses

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

func (*NestedMsg) GetMapNestedField Uses

func (m *NestedMsg) GetMapNestedField() map[string]*SimpleMsg

func (*NestedMsg) GetPlainNestedField Uses

func (m *NestedMsg) GetPlainNestedField() *SimpleMsg

func (*NestedMsg) GetSliceNestedField Uses

func (m *NestedMsg) GetSliceNestedField() []*SimpleMsg

func (*NestedMsg) ProtoMessage Uses

func (*NestedMsg) ProtoMessage()

func (*NestedMsg) Reset Uses

func (m *NestedMsg) Reset()

func (*NestedMsg) String Uses

func (m *NestedMsg) String() string

func (*NestedMsg) XXX_DiscardUnknown Uses

func (m *NestedMsg) XXX_DiscardUnknown()

func (*NestedMsg) XXX_Marshal Uses

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

func (*NestedMsg) XXX_Merge Uses

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

func (*NestedMsg) XXX_Size Uses

func (m *NestedMsg) XXX_Size() int

func (*NestedMsg) XXX_Unmarshal Uses

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

type SimpleMsg Uses

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:"-"`
}

SimpleMsg is designed to test that all three types of message fields, plain, map, and slice are handled by the protolator tool

func (*SimpleMsg) Descriptor Uses

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

func (*SimpleMsg) GetMapField Uses

func (m *SimpleMsg) GetMapField() map[string]string

func (*SimpleMsg) GetPlainField Uses

func (m *SimpleMsg) GetPlainField() string

func (*SimpleMsg) GetSliceField Uses

func (m *SimpleMsg) GetSliceField() []string

func (*SimpleMsg) ProtoMessage Uses

func (*SimpleMsg) ProtoMessage()

func (*SimpleMsg) Reset Uses

func (m *SimpleMsg) Reset()

func (*SimpleMsg) String Uses

func (m *SimpleMsg) String() string

func (*SimpleMsg) XXX_DiscardUnknown Uses

func (m *SimpleMsg) XXX_DiscardUnknown()

func (*SimpleMsg) XXX_Marshal Uses

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

func (*SimpleMsg) XXX_Merge Uses

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

func (*SimpleMsg) XXX_Size Uses

func (m *SimpleMsg) XXX_Size() int

func (*SimpleMsg) XXX_Unmarshal Uses

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

type StaticallyOpaqueMsg Uses

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:"-"`
}

StaticallyOpaqueMsg is designed to test the statically opaque message component All fields are statically marshaled to the NestedMsg type

func (*StaticallyOpaqueMsg) Descriptor Uses

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

func (*StaticallyOpaqueMsg) GetMapOpaqueField Uses

func (m *StaticallyOpaqueMsg) GetMapOpaqueField() map[string][]byte

func (*StaticallyOpaqueMsg) GetPlainOpaqueField Uses

func (m *StaticallyOpaqueMsg) GetPlainOpaqueField() []byte

func (*StaticallyOpaqueMsg) GetSliceOpaqueField Uses

func (m *StaticallyOpaqueMsg) GetSliceOpaqueField() [][]byte

func (*StaticallyOpaqueMsg) ProtoMessage Uses

func (*StaticallyOpaqueMsg) ProtoMessage()

func (*StaticallyOpaqueMsg) Reset Uses

func (m *StaticallyOpaqueMsg) Reset()

func (*StaticallyOpaqueMsg) StaticallyOpaqueFieldProto Uses

func (som *StaticallyOpaqueMsg) StaticallyOpaqueFieldProto(name string) (proto.Message, error)

func (*StaticallyOpaqueMsg) StaticallyOpaqueFields Uses

func (som *StaticallyOpaqueMsg) StaticallyOpaqueFields() []string

func (*StaticallyOpaqueMsg) StaticallyOpaqueMapFieldProto Uses

func (som *StaticallyOpaqueMsg) StaticallyOpaqueMapFieldProto(name string, key string) (proto.Message, error)

func (*StaticallyOpaqueMsg) StaticallyOpaqueMapFields Uses

func (som *StaticallyOpaqueMsg) StaticallyOpaqueMapFields() []string

func (*StaticallyOpaqueMsg) StaticallyOpaqueSliceFieldProto Uses

func (som *StaticallyOpaqueMsg) StaticallyOpaqueSliceFieldProto(name string, index int) (proto.Message, error)

func (*StaticallyOpaqueMsg) StaticallyOpaqueSliceFields Uses

func (som *StaticallyOpaqueMsg) StaticallyOpaqueSliceFields() []string

func (*StaticallyOpaqueMsg) String Uses

func (m *StaticallyOpaqueMsg) String() string

func (*StaticallyOpaqueMsg) XXX_DiscardUnknown Uses

func (m *StaticallyOpaqueMsg) XXX_DiscardUnknown()

func (*StaticallyOpaqueMsg) XXX_Marshal Uses

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

func (*StaticallyOpaqueMsg) XXX_Merge Uses

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

func (*StaticallyOpaqueMsg) XXX_Size Uses

func (m *StaticallyOpaqueMsg) XXX_Size() int

func (*StaticallyOpaqueMsg) XXX_Unmarshal Uses

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

type UnmarshalableDeepFields Uses

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:"-"`
}

UnmarshalableDeepFields contains fields which are defined to be opaque, but will return an error if they are asked to be deserialized.

func (*UnmarshalableDeepFields) Descriptor Uses

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

func (*UnmarshalableDeepFields) GetMapOpaqueField Uses

func (m *UnmarshalableDeepFields) GetMapOpaqueField() map[string][]byte

func (*UnmarshalableDeepFields) GetPlainOpaqueField Uses

func (m *UnmarshalableDeepFields) GetPlainOpaqueField() []byte

func (*UnmarshalableDeepFields) GetSliceOpaqueField Uses

func (m *UnmarshalableDeepFields) GetSliceOpaqueField() [][]byte

func (*UnmarshalableDeepFields) ProtoMessage Uses

func (*UnmarshalableDeepFields) ProtoMessage()

func (*UnmarshalableDeepFields) Reset Uses

func (m *UnmarshalableDeepFields) Reset()

func (*UnmarshalableDeepFields) StaticallyOpaqueFieldProto Uses

func (udf *UnmarshalableDeepFields) StaticallyOpaqueFieldProto(name string) (proto.Message, error)

func (*UnmarshalableDeepFields) StaticallyOpaqueFields Uses

func (udf *UnmarshalableDeepFields) StaticallyOpaqueFields() []string

func (*UnmarshalableDeepFields) StaticallyOpaqueMapFieldProto Uses

func (udf *UnmarshalableDeepFields) StaticallyOpaqueMapFieldProto(name, key string) (proto.Message, error)

func (*UnmarshalableDeepFields) StaticallyOpaqueMapFields Uses

func (udf *UnmarshalableDeepFields) StaticallyOpaqueMapFields() []string

func (*UnmarshalableDeepFields) StaticallyOpaqueSliceFieldProto Uses

func (udf *UnmarshalableDeepFields) StaticallyOpaqueSliceFieldProto(name string, index int) (proto.Message, error)

func (*UnmarshalableDeepFields) StaticallyOpaqueSliceFields Uses

func (udf *UnmarshalableDeepFields) StaticallyOpaqueSliceFields() []string

func (*UnmarshalableDeepFields) String Uses

func (m *UnmarshalableDeepFields) String() string

func (*UnmarshalableDeepFields) XXX_DiscardUnknown Uses

func (m *UnmarshalableDeepFields) XXX_DiscardUnknown()

func (*UnmarshalableDeepFields) XXX_Marshal Uses

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

func (*UnmarshalableDeepFields) XXX_Merge Uses

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

func (*UnmarshalableDeepFields) XXX_Size Uses

func (m *UnmarshalableDeepFields) XXX_Size() int

func (*UnmarshalableDeepFields) XXX_Unmarshal Uses

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

type VariablyOpaqueMsg Uses

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:"-"`
}

VariablyOpaqueMsg is designed to test the staticaly opaque message component The opaque type is determined by opaque_type

func (*VariablyOpaqueMsg) Descriptor Uses

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

func (*VariablyOpaqueMsg) GetMapOpaqueField Uses

func (m *VariablyOpaqueMsg) GetMapOpaqueField() map[string][]byte

func (*VariablyOpaqueMsg) GetOpaqueType Uses

func (m *VariablyOpaqueMsg) GetOpaqueType() string

func (*VariablyOpaqueMsg) GetPlainOpaqueField Uses

func (m *VariablyOpaqueMsg) GetPlainOpaqueField() []byte

func (*VariablyOpaqueMsg) GetSliceOpaqueField Uses

func (m *VariablyOpaqueMsg) GetSliceOpaqueField() [][]byte

func (*VariablyOpaqueMsg) ProtoMessage Uses

func (*VariablyOpaqueMsg) ProtoMessage()

func (*VariablyOpaqueMsg) Reset Uses

func (m *VariablyOpaqueMsg) Reset()

func (*VariablyOpaqueMsg) String Uses

func (m *VariablyOpaqueMsg) String() string

func (*VariablyOpaqueMsg) VariablyOpaqueFieldProto Uses

func (vom *VariablyOpaqueMsg) VariablyOpaqueFieldProto(name string) (proto.Message, error)

func (*VariablyOpaqueMsg) VariablyOpaqueFields Uses

func (vom *VariablyOpaqueMsg) VariablyOpaqueFields() []string

func (*VariablyOpaqueMsg) VariablyOpaqueMapFieldProto Uses

func (vom *VariablyOpaqueMsg) VariablyOpaqueMapFieldProto(name string, key string) (proto.Message, error)

func (*VariablyOpaqueMsg) VariablyOpaqueMapFields Uses

func (vom *VariablyOpaqueMsg) VariablyOpaqueMapFields() []string

func (*VariablyOpaqueMsg) VariablyOpaqueSliceFieldProto Uses

func (vom *VariablyOpaqueMsg) VariablyOpaqueSliceFieldProto(name string, index int) (proto.Message, error)

func (*VariablyOpaqueMsg) VariablyOpaqueSliceFields Uses

func (vom *VariablyOpaqueMsg) VariablyOpaqueSliceFields() []string

func (*VariablyOpaqueMsg) XXX_DiscardUnknown Uses

func (m *VariablyOpaqueMsg) XXX_DiscardUnknown()

func (*VariablyOpaqueMsg) XXX_Marshal Uses

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

func (*VariablyOpaqueMsg) XXX_Merge Uses

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

func (*VariablyOpaqueMsg) XXX_Size Uses

func (m *VariablyOpaqueMsg) XXX_Size() int

func (*VariablyOpaqueMsg) XXX_Unmarshal Uses

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

Package testprotos imports 3 packages (graph). Updated 2018-12-12. Refresh now. Tools for package owners.