protorpc

package
v0.22.4 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthEnvelope        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEnvelope          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEnvelope = fmt.Errorf("proto: unexpected end of group")
)

Functions

func NewCodec

func NewCodec(rwc io.ReadWriteCloser) codec.Codec

func ReadNetString

func ReadNetString(r io.Reader) (data []byte, err error)

ReadNetString reads data from a big-endian netstring.

func WriteNetString

func WriteNetString(w io.Writer, data []byte) (written int, err error)

WriteNetString writes data to a big-endian netstring on a Write. Size is always a 32-bit unsigned int.

Types

type Request

type Request struct {
	ServiceMethod        string   `protobuf:"bytes,1,opt,name=service_method,json=serviceMethod,proto3" json:"service_method,omitempty"`
	Seq                  uint64   `protobuf:"fixed64,2,opt,name=seq,proto3" json:"seq,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Request) Descriptor

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

func (*Request) GetSeq

func (m *Request) GetSeq() uint64

func (*Request) GetServiceMethod

func (m *Request) GetServiceMethod() string

func (*Request) Marshal

func (m *Request) Marshal() (dAtA []byte, err error)

func (*Request) MarshalTo

func (m *Request) MarshalTo(dAtA []byte) (int, error)

func (*Request) MarshalToSizedBuffer

func (m *Request) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) Size

func (m *Request) Size() (n int)

func (*Request) String

func (m *Request) String() string

func (*Request) Unmarshal

func (m *Request) Unmarshal(dAtA []byte) error

func (*Request) XXX_DiscardUnknown

func (m *Request) XXX_DiscardUnknown()

func (*Request) XXX_Marshal

func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Request) XXX_Merge

func (m *Request) XXX_Merge(src proto.Message)

func (*Request) XXX_Size

func (m *Request) XXX_Size() int

func (*Request) XXX_Unmarshal

func (m *Request) XXX_Unmarshal(b []byte) error

type Response

type Response struct {
	ServiceMethod        string   `protobuf:"bytes,1,opt,name=service_method,json=serviceMethod,proto3" json:"service_method,omitempty"`
	Seq                  uint64   `protobuf:"fixed64,2,opt,name=seq,proto3" json:"seq,omitempty"`
	Error                string   `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Response) Descriptor

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

func (*Response) GetError

func (m *Response) GetError() string

func (*Response) GetSeq

func (m *Response) GetSeq() uint64

func (*Response) GetServiceMethod

func (m *Response) GetServiceMethod() string

func (*Response) Marshal

func (m *Response) Marshal() (dAtA []byte, err error)

func (*Response) MarshalTo

func (m *Response) MarshalTo(dAtA []byte) (int, error)

func (*Response) MarshalToSizedBuffer

func (m *Response) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) Size

func (m *Response) Size() (n int)

func (*Response) String

func (m *Response) String() string

func (*Response) Unmarshal

func (m *Response) Unmarshal(dAtA []byte) error

func (*Response) XXX_DiscardUnknown

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal

func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Response) XXX_Merge

func (m *Response) XXX_Merge(src proto.Message)

func (*Response) XXX_Size

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal

func (m *Response) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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