protobuf

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 13 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 IsProtobufCodec added in v0.10.0

func IsProtobufCodec(c remote.PayloadCodec) bool

IsProtobufCodec checks if the codec is protobufCodec

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 MessageReaderWithMethodWithContext added in v0.9.0

type MessageReaderWithMethodWithContext interface {
	ReadPb(ctx context.Context, method string, in []byte) error
}

MessageReaderWithMethodWithContext read from ActualMsgBuf with method

type MessageWriterWithContext added in v0.9.0

type MessageWriterWithContext interface {
	WritePb(ctx context.Context, method string) (interface{}, error)
}

MessageWriterWithContext writes to output bytebuffer

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

type ProtobufMsgCodec added in v0.9.0

type ProtobufMsgCodec interface {
	Marshal(out []byte) ([]byte, error)
	Unmarshal(in []byte) error
}

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