protobuf

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: Apache-2.0 Imports: 12 Imported by: 2

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
}

Jump to

Keyboard shortcuts

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