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 MessageReader ¶ added in v0.9.0
type MessageReader interface {
Read(ctx context.Context, method string, actualMsgBuf []byte) (interface{}, error)
}
MessageReader read from ActualMsgBuf with method and returns a string
type MessageWriter ¶ added in v0.9.0
MessageWriter writes to a converts json to protobufs wireformat and returns an output bytebuffer
type ReadJSON ¶ added in v0.9.0
type ReadJSON struct {
// contains filtered or unexported fields
}
ReadJSON implement of MessageReaderWithMethod
func NewReadJSON ¶ added in v0.9.0
func NewReadJSON(svc *dproto.ServiceDescriptor, isClient bool, convOpts *conv.Options) (*ReadJSON, error)
NewReadJSON build ReadJSON according to ServiceDescriptor
type ServiceDescriptor ¶
type ServiceDescriptor = *desc.ServiceDescriptor
type WriteJSON ¶ added in v0.9.0
type WriteJSON struct {
// contains filtered or unexported fields
}
WriteJSON implement of MessageWriter
func NewWriteJSON ¶ added in v0.9.0
func NewWriteJSON(svc *dproto.ServiceDescriptor, method string, isClient bool, convOpts *conv.Options) (*WriteJSON, error)
NewWriteJSON build WriteJSON according to ServiceDescriptor
Click to show internal directories.
Click to hide internal directories.