protobuf

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2021 License: Apache-2.0 Imports: 12 Imported by: 4 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_kitex_pkg_remote_codec_protobuf_error_proto protoreflect.FileDescriptor

Functions

func NewGRPCCodec

func NewGRPCCodec() remote.Codec

NewGRPCCodec create grpc and protobuf codec

func NewProtobufCodec

func NewProtobufCodec() remote.PayloadCodec

NewProtobufCodec ...

Types

type ErrorProto

type ErrorProto struct {
	TypeID  int32  `protobuf:"varint,1,opt,name=TypeID,proto3" json:"TypeID,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"`
	// contains filtered or unexported fields
}

Messages used for transporting error between server and client.

func (*ErrorProto) Descriptor deprecated

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

Deprecated: Use ErrorProto.ProtoReflect.Descriptor instead.

func (*ErrorProto) GetMessage

func (x *ErrorProto) GetMessage() string

func (*ErrorProto) GetTypeID

func (x *ErrorProto) GetTypeID() int32

func (*ErrorProto) ProtoMessage

func (*ErrorProto) ProtoMessage()

func (*ErrorProto) ProtoReflect

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

func (*ErrorProto) Reset

func (x *ErrorProto) Reset()

func (*ErrorProto) String

func (x *ErrorProto) String() string

type MockReq

type MockReq struct {
	Msg     string            `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	StrMap  map[string]string `` /* 153-byte string literal not displayed */
	StrList []string          `protobuf:"bytes,3,rep,name=strList,proto3" json:"strList,omitempty"`
	// contains filtered or unexported fields
}

func (*MockReq) Descriptor deprecated

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

Deprecated: Use MockReq.ProtoReflect.Descriptor instead.

func (*MockReq) GetMsg

func (x *MockReq) GetMsg() string

func (*MockReq) GetStrList

func (x *MockReq) GetStrList() []string

func (*MockReq) GetStrMap

func (x *MockReq) GetStrMap() map[string]string

func (*MockReq) ProtoMessage

func (*MockReq) ProtoMessage()

func (*MockReq) ProtoReflect

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

func (*MockReq) Reset

func (x *MockReq) Reset()

func (*MockReq) String

func (x *MockReq) String() string

type PBError

type PBError interface {
	error
	TypeID() int32
	Marshal(out []byte) ([]byte, error)
	Unmarshal(in []byte) error
}

func NewPbError added in v0.0.5

func NewPbError(typeID int32, message string) PBError

Jump to

Keyboard shortcuts

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