protobuf

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: Apache-2.0 Imports: 18 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
}

func NewPbError added in v0.0.5

func NewPbError(typeID int32, message string) PBError

Directories

Path Synopsis
Package encoding defines the interface for the compressor and codec, and functions to register and retrieve compressors and codecs.
Package encoding defines the interface for the compressor and codec, and functions to register and retrieve compressors and codecs.
gzip
Package gzip implements and registers the gzip compressor during the initialization.
Package gzip implements and registers the gzip compressor during the initialization.

Jump to

Keyboard shortcuts

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