Documentation ¶
Index ¶
- Variables
- func MakeArithStringEndpoint(svc service.ServiceMetricString) endpoint.Endpoint
- func MakeArithmeticEndpoint(svc service.ServiceMetricMath) endpoint.Endpoint
- type ArithStringEndpoint
- type ArithStringRequest
- type ArithStringResponse
- type ArithmeticEndpoint
- type ArithmeticRequest
- type ArithmeticResponse
- type EndpointAll
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrMetricInvalidRequestType = errors.New("RequestType has only four type: Add,Subtract,Multiply,Divide")
)
View Source
var (
ErrStringInvalidRequestType = errors.New("RequestType has only four type: Add,Diff")
)
Functions ¶
func MakeArithStringEndpoint ¶
func MakeArithStringEndpoint(svc service.ServiceMetricString) endpoint.Endpoint
MakeArithStringEndpoint make endpoint
func MakeArithmeticEndpoint ¶
func MakeArithmeticEndpoint(svc service.ServiceMetricMath) endpoint.Endpoint
MakeArithmeticEndpoint make endpoint
Types ¶
type ArithStringEndpoint ¶
CalculateEndpoint define endpoint
type ArithStringRequest ¶
type ArithStringRequest struct { RequestType string `json:"request_type"` A string `json:"a"` B string `json:"b"` }
ArithStringRequest define request struct
type ArithStringResponse ¶
ArithStringResponse define response struct
type ArithmeticEndpoint ¶
CalculateEndpoint define endpoint
type ArithmeticRequest ¶
type ArithmeticRequest struct { RequestType string `json:"request_type"` A int `json:"a"` B int `json:"b"` }
ArithmeticRequest define request struct
type ArithmeticResponse ¶
ArithmeticResponse define response struct
Click to show internal directories.
Click to hide internal directories.