mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-14 03:55:19 +00:00
27 lines
667 B
Go
27 lines
667 B
Go
package rest
|
|
|
|
import (
|
|
"github.com/gorilla/mux"
|
|
|
|
"github.com/cosmos/cosmos-sdk/client/context"
|
|
"github.com/cosmos/cosmos-sdk/types/rest"
|
|
)
|
|
|
|
const (
|
|
RestMarketID = "market_id"
|
|
)
|
|
|
|
// PostPriceReq defines the properties of a PostPrice request's body.
|
|
type PostPriceReq struct {
|
|
BaseReq rest.BaseReq `json:"base_req"`
|
|
MarketID string `json:"market_id"`
|
|
Price string `json:"price"`
|
|
Expiry string `json:"expiry"`
|
|
}
|
|
|
|
// RegisterRoutes - Central function to define routes that get registered by the main application
|
|
func RegisterRoutes(cliCtx context.CLIContext, r *mux.Router) {
|
|
registerQueryRoutes(cliCtx, r)
|
|
registerTxRoutes(cliCtx, r)
|
|
}
|