http

package
v21.0.0-rc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouterHandler

func NewRouterHandler(e *echo.Echo, us mvc.RouterUsecase, logger log.Logger)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL