package
0.3.1
Repository: https://github.com/gridprotocol/platform-v2.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
get cp count.
get node list of a cp handler for get node list of a cp CpNodeHandler godoc @Summary list cp nodes @Description list cp nodes @Tags CpNodeHandler @Accept json @Produce json @Param cp path string true "cp address" @Success 200 {object} int @Failure 404 {object} string "page not found" @Router /v1/cp/{cp}/node/list [get].
No description provided by the author
calc order fee.
get the fee of an order FeeOrderHandler godoc @Summary get the fee of an order by id @Description get the fee of an order by id @Tags FeeOrderHandler @Accept json @Produce json @Param id path string true "order id" @Success 200 {object} int @Failure 404 {object} string "page not found" @Router /v1/order/fee/{id} [get].
get cp info get a cp info handler for get a cp info GetCpInfoHandler godoc @Summary get a cp info @Description get a cp info @Tags GetCpInfoHandler @Accept json @Produce json @Param cp path string true "cp address" @Success 200 {object} int @Failure 404 {object} string "page not found" @Router /v1/cp/{cp} [get].
get global info.
get node handler for get a node GetNodeHandler godoc @Summary get a node @Description get a node @Tags GetNodeHandler @Accept json @Produce json @Param cp path string true "cp address" @Param id path string true "node id" @Success 200 {object} int @Failure 404 {object} string "page not found" @Router /v1/node/{cp}/{id} [get].
get order count of a provider GetOrderCountHandler godoc @Summary get order count of a provider @Description get order count of a provider @Tags GetOrderCountHandler @Accept json @Produce json @Param address path string true "provider address" @Success 200 {object} int @Failure 404 {object} string "page not found" @Router /v1/provider/{address}/count [get].
get order by id handler for get order by id GetOrderHandler godoc @Summary get order by id @Description get order by id @Tags GetOrderHandler @Accept json @Produce json @Param id path string true "order id" @Success 200 {object} int @Failure 404 {object} string "page not found" @Router /v1/order/{id}/info [get].
get order list by user.
increase cp num by 1.
No description provided by the author
No description provided by the author
list a provider's all orders.
list all cp handler for list cp ListCpHandler godoc @Summary list cp info @Description list cp info @Tags ListCpHandler @Accept json @Produce json @Param start path string true "start" @Param num path string true "num" @Success 200 {object} int @Failure 404 {object} string "page not found" @Router /v1/cp/list/{start}/{num} [get].
list all nodes by specify node start and num handler for list nodes ListNodeHandler godoc @Summary List all nodes @Description list all nodes @Tags Listnodes @Accept json @Produce json @Param start path string true "start" @Param num path string true "number" @Success 200 {object} int @Failure 404 {object} string "page not found" @Router /v1/node/list/{start}/{num} [get].
list cp of an user with active orders ListOrderedProviderHandler godoc @Summary list cp of an user with active orders @Description list cp of an user with active orders @Tags ListOrderedProviderHandler @Accept json @Produce json @Param address path string true "user address" @Success 200 {object} int @Failure 404 {object} string "page not found" @Router /v1/user/{address}/provider/list [get].
active orders of an user.
list all nodes of an user handler for list user nodes ListUserNodesHandler godoc @Summary List an user nodes @Description list an usernodes @Tags ListUserNodes @Accept json @Produce json @Param user path string true "user" @Success 200 {object} int @Failure 404 {object} string "page not found" @Router /v1/user/node/list/{user} [get] get node list by an user.
orders of an user list all orders of an user handler for list user orders ListUserOrderHandler godoc @Summary List an user orders @Description list an user orders @Tags ListUserOrders @Accept json @Produce json @Param address path string true "user address" @Success 200 {object} int @Failure 404 {object} string "page not found" @Router /v1/user/{address}/order/list [get].
No description provided by the author
register all routes for server.
set node's status.
set an order's appname.
set an order's status.
check a provider's all orders, set status=4 if an order is end, and set the node's sold to false.

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
order info for calc order fee.
No description provided by the author