proto

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message interface {
	Marshal() ([]byte, error)
	TryGetFieldByNumber(fieldNumber int) (interface{}, error)
	TrySetFieldByNumber(fieldNumber int, val interface{}) error
}

func NewMessage

func NewMessage(descriptor MessageDescriptor) Message

type MessageDescriptor

type MessageDescriptor = *desc.MessageDescriptor

type ReadJSON

type ReadJSON struct {
	// contains filtered or unexported fields
}

ReadJSON implement of MessageReaderWithMethod

func NewReadJSON

func NewReadJSON(svc *descriptor.ServiceDescriptor, isClient bool) *ReadJSON

NewReadJSON build ReadJSON according to ServiceDescriptor

func (*ReadJSON) Read

func (m *ReadJSON) Read(ctx context.Context, method string, in thrift.TProtocol) (interface{}, error)

Read read data from in thrift.TProtocol and convert to json string

func (*ReadJSON) SetBinaryWithBase64

func (m *ReadJSON) SetBinaryWithBase64(enable bool)

SetBinaryWithBase64 enable/disable Base64 encoding for binary. Note that this method is not concurrent-safe.

type ServiceDescriptor

type ServiceDescriptor = *desc.ServiceDescriptor

type WriteJSON

type WriteJSON struct {
	// contains filtered or unexported fields
}

WriteJSON implement of MessageWriter

func NewWriteJSON

func NewWriteJSON(svc *desc.ServiceDescriptor, method string, isClient bool) (*WriteJSON, error)

func (*WriteJSON) SetBase64Binary

func (m *WriteJSON) SetBase64Binary(enable bool)

SetBase64Binary enable/disable Base64 decoding for binary. Note that this method is not concurrent-safe.

func (*WriteJSON) Write

func (m *WriteJSON) Write(ctx context.Context, out thrift.TProtocol, msg interface{}, requestBase *Base) error

Write write json string to out thrift.TProtocol

Jump to

Keyboard shortcuts

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