Documentation
¶
Index ¶
- func MakeGetAPIStatusEndpoint() endpoint.Endpoint
- func MakeGetTradeEndpoint(s trader.Service) endpoint.Endpoint
- func MakeGetTradesEndpoint(s trader.Service) endpoint.Endpoint
- func MakePostTradeEndpoint(s trader.Service) endpoint.Endpoint
- type Endpoints
- type GetAPIStatusRequest
- type GetAPIStatusResponse
- type GetTradeRequest
- type GetTradeResponse
- type GetTradesRequest
- type GetTradesResponse
- type PostTradeRequest
- type PostTradeResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeGetAPIStatusEndpoint ¶
MakeGetAPIStatusEndpoint returns an endpoint via the passed service. Primarily useful in a server.
func MakeGetTradeEndpoint ¶
MakeGetTradeEndpoint returns an endpoint via the passed service. Primarily useful in a server.
func MakeGetTradesEndpoint ¶
MakeGetTradesEndpoint returns an endpoint via the passed service. Primarily useful in a server.
Types ¶
type Endpoints ¶
type Endpoints struct { PostTradeEndpoint endpoint.Endpoint GetTradesEndpoint endpoint.Endpoint GetTradeEndpoint endpoint.Endpoint GetAPIStatusEndpoint endpoint.Endpoint }
Endpoints collects all of the endpoints part of Trader
func MakeServerEndpoints ¶
MakeServerEndpoints returns an Endpoints struct where each endpoint invokes the corresponding method on the provided trader.Service. Useful in a trader.Service server.
type GetAPIStatusResponse ¶
type GetAPIStatusResponse struct { Status string `json:"status,omitempty"` Err error `json:"err,omitempty"` }
GetAPIStatusResponse response object
type GetTradeResponse ¶
type GetTradeResponse struct { Trade trader.Trade `json:"trade,omitempty"` Err error `json:"err,omitempty"` }
GetTradeResponse response object
type GetTradesResponse ¶
type GetTradesResponse struct { Trades []trader.Trade `json:"trades,omitempty"` Err error `json:"err,omitempty"` }
GetTradesResponse response object
type PostTradeRequest ¶
PostTradeRequest request object
type PostTradeResponse ¶
PostTradeResponse response object