Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Arith ¶
type Arith struct{}
Arith defines the struct of arith.
func (*Arith) Multiply ¶
func (a *Arith) Multiply(req *ArithRequest, res *ArithResponse) error
Multiply operation
type ArithRequest ¶
ArithRequest defines the request of arith.
func (*ArithRequest) Marshal ¶
func (a *ArithRequest) Marshal() ([]byte, error)
Marshal returns the encoded bytes.
func (*ArithRequest) MarshalTo ¶
func (a *ArithRequest) MarshalTo(buf []byte) (int, error)
MarshalTo marshals into buf and returns the number of bytes.
func (*ArithRequest) Size ¶
func (a *ArithRequest) Size() int
Size returns the size of the buffer required to represent the data when encoded.
func (*ArithRequest) Unmarshal ¶
func (a *ArithRequest) Unmarshal(data []byte) error
Unmarshal unmarshals from data.
type ArithResponse ¶
type ArithResponse struct {
Pro int32 //product
}
ArithResponse defines the response of arith.
func (*ArithResponse) Marshal ¶
func (a *ArithResponse) Marshal() ([]byte, error)
Marshal returns the encoded bytes.
func (*ArithResponse) MarshalTo ¶
func (a *ArithResponse) MarshalTo(buf []byte) (int, error)
MarshalTo marshals into buf and returns the number of bytes.
func (*ArithResponse) Size ¶
func (a *ArithResponse) Size() int
Size returns the size of the buffer required to represent the data when encoded.
func (*ArithResponse) Unmarshal ¶
func (a *ArithResponse) Unmarshal(data []byte) error
Unmarshal unmarshals from data.
Click to show internal directories.
Click to hide internal directories.