service

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: MIT Imports: 2 Imported by: 0

README

protoc ./arith.proto --gogofaster_out=./

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

type ArithRequest struct {
	A int32
	B int32
}

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.

Jump to

Keyboard shortcuts

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