Documentation ¶
Index ¶
- Constants
- Variables
- func MakeDivByZero(err error) *goa.ServiceError
- func MakeHasRemainder(err error) *goa.ServiceError
- func MakeTimeout(err error) *goa.ServiceError
- func NewDivideEndpoint(s Service) goa.Endpoint
- func NewIntegerDivideEndpoint(s Service) goa.Endpoint
- type Client
- type Endpoints
- type FloatOperands
- type IntOperands
- type Service
Constants ¶
const ServiceName = "divider"
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 = [2]string{"integer_divide", "divide"}
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 MakeDivByZero ¶
func MakeDivByZero(err error) *goa.ServiceError
MakeDivByZero builds a goa.ServiceError from an error.
func MakeHasRemainder ¶
func MakeHasRemainder(err error) *goa.ServiceError
MakeHasRemainder builds a goa.ServiceError from an error.
func MakeTimeout ¶
func MakeTimeout(err error) *goa.ServiceError
MakeTimeout builds a goa.ServiceError from an error.
func NewDivideEndpoint ¶
NewDivideEndpoint returns an endpoint function that calls the method "divide" of service "divider".
func NewIntegerDivideEndpoint ¶
NewIntegerDivideEndpoint returns an endpoint function that calls the method "integer_divide" of service "divider".
Types ¶
type Client ¶
Client is the "divider" service client.
func (*Client) IntegerDivide ¶
IntegerDivide calls the "integer_divide" endpoint of the "divider" service. IntegerDivide may return the following errors:
- "has_remainder" (type *goa.ServiceError): integer division has remainder
- error: internal error
type Endpoints ¶
Endpoints wraps the "divider" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "divider" service with endpoints.
type FloatOperands ¶
FloatOperands is the payload type of the divider service divide method.
type IntOperands ¶
IntOperands is the payload type of the divider service integer_divide method.