Documentation ¶
Index ¶
Constants ¶
const ServiceName = "calc"
ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.
Variables ¶
var MethodNames = [1]string{"multiply"}
MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.
Functions ¶
func NewMultiplyEndpoint ¶
NewMultiplyEndpoint returns an endpoint function that calls the method "multiply" of service "calc".
func NewViewedMultiplyresponse ¶
func NewViewedMultiplyresponse(res *Multiplyresponse, view string) *calcviews.Multiplyresponse
NewViewedMultiplyresponse initializes viewed result type Multiplyresponse from result type Multiplyresponse using the given view.
Types ¶
type Client ¶
Client is the "calc" service client.
func (*Client) Multiply ¶
func (c *Client) Multiply(ctx context.Context, p *MultiplyPayload) (res *Multiplyresponse, err error)
Multiply calls the "multiply" endpoint of the "calc" service.
type Endpoints ¶
Endpoints wraps the "calc" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "calc" service with endpoints.
type MultiplyPayload ¶
MultiplyPayload is the payload type of the calc service multiply method.
type Multiplyresponse ¶
type Multiplyresponse struct { // Result of multiplication Multiple int }
Multiplyresponse is the result type of the calc service multiply method.
func NewMultiplyresponse ¶
func NewMultiplyresponse(vres *calcviews.Multiplyresponse) *Multiplyresponse
NewMultiplyresponse initializes result type Multiplyresponse from viewed result type Multiplyresponse.
type Service ¶
type Service interface { // Multiply implements multiply. Multiply(context.Context, *MultiplyPayload) (res *Multiplyresponse, err error) }
The calc service performs operations on numbers.