protoserializer

package
v0.0.0-...-f666bc6 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_serializers_protoserializer_protostruct_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ProtoSample

type ProtoSample struct {
	Words   string           `protobuf:"bytes,1,opt,name=words,proto3" json:"words,omitempty"`
	List    []int32          `protobuf:"varint,2,rep,packed,name=list,proto3" json:"list,omitempty"`
	Dict    map[string]int32 `` /* 150-byte string literal not displayed */
	Integer int32            `protobuf:"varint,4,opt,name=integer,proto3" json:"integer,omitempty"`
	Float   float32          `protobuf:"fixed32,5,opt,name=float,proto3" json:"float,omitempty"`
	// contains filtered or unexported fields
}

func (*ProtoSample) Descriptor deprecated

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

Deprecated: Use ProtoSample.ProtoReflect.Descriptor instead.

func (*ProtoSample) GetDict

func (x *ProtoSample) GetDict() map[string]int32

func (*ProtoSample) GetFloat

func (x *ProtoSample) GetFloat() float32

func (*ProtoSample) GetInteger

func (x *ProtoSample) GetInteger() int32

func (*ProtoSample) GetList

func (x *ProtoSample) GetList() []int32

func (*ProtoSample) GetWords

func (x *ProtoSample) GetWords() string

func (*ProtoSample) ProtoMessage

func (*ProtoSample) ProtoMessage()

func (*ProtoSample) ProtoReflect

func (x *ProtoSample) ProtoReflect() protoreflect.Message

func (*ProtoSample) Reset

func (x *ProtoSample) Reset()

func (*ProtoSample) String

func (x *ProtoSample) String() string

type Serializer

type Serializer struct {
}

func NewSerializer

func NewSerializer() *Serializer

func (*Serializer) Marshal

func (s *Serializer) Marshal(data interface{}) ([]byte, error)

func (*Serializer) Unmarshal

func (s *Serializer) Unmarshal(data []byte, format interface{}) error

Jump to

Keyboard shortcuts

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