Documentation ¶
Index ¶
- func NewRouterHandler(e *echo.Echo, us mvc.RouterUsecase, logger log.Logger)
- type ResponseError
- type RouterHandler
- func (a *RouterHandler) GetBestSingleRouteQuote(c echo.Context) error
- func (a *RouterHandler) GetCandidateRoutes(c echo.Context) error
- func (a *RouterHandler) GetCustomQuote(c echo.Context) error
- func (a *RouterHandler) GetOptimalQuote(c echo.Context) error
- func (a *RouterHandler) StoreRouterStateInFiles(c echo.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRouterHandler ¶
NewRouterHandler will initialize the pools/ resources endpoint
Types ¶
type ResponseError ¶
type ResponseError struct {
Message string `json:"message"`
}
ResponseError represent the response error struct
type RouterHandler ¶
type RouterHandler struct { RUsecase mvc.RouterUsecase // contains filtered or unexported fields }
RouterHandler represent the httphandler for the router
func (*RouterHandler) GetBestSingleRouteQuote ¶
func (a *RouterHandler) GetBestSingleRouteQuote(c echo.Context) error
GetBestSingleRouteQuote returns the best single route quote to be done directly without a split.
func (*RouterHandler) GetCandidateRoutes ¶
func (a *RouterHandler) GetCandidateRoutes(c echo.Context) error
GetCandidateRoutes returns the candidate routes for a given tokenIn and tokenOutDenom
func (*RouterHandler) GetCustomQuote ¶
func (a *RouterHandler) GetCustomQuote(c echo.Context) error
GetCustomQuote returns a direct custom quote. It ensures that the route contains all the pools listed in the specific order, returns error if such route is not found.
func (*RouterHandler) GetOptimalQuote ¶
func (a *RouterHandler) GetOptimalQuote(c echo.Context) error
GetOptimalQuote will determine the optimal quote for a given tokenIn and tokenOutDenom Return the optimal quote.
func (*RouterHandler) StoreRouterStateInFiles ¶
func (a *RouterHandler) StoreRouterStateInFiles(c echo.Context) error
TODO: authentication for the endpoint and enable only in dev mode.