forked from goadesign/plugins
/
service.go
37 lines (31 loc) · 1002 Bytes
/
service.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Code generated by goa v2.2.5, DO NOT EDIT.
//
// calc service
//
// Command:
// $ goa gen goa.design/plugins/goakit/examples/calc/design -o
// $(GOPATH)/src/goa.design/plugins/goakit/examples/calc
package calc
import (
"context"
)
// The calc service exposes public endpoints that uses go-kit.
type Service interface {
// Add adds up the two integer parameters and returns the results.
Add(context.Context, *AddPayload) (res int, err error)
}
// 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.
const ServiceName = "calc"
// 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.
var MethodNames = [1]string{"add"}
// AddPayload is the payload type of the calc service add method.
type AddPayload struct {
// Left operand
A int
// Right operand
B int
}