rest

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RestDefChainID  = "def-chain-id"
	RestServiceName = "service-name"
	RestBindChainID = "bind-chain-id"
	RestReqChainID  = "req-chain-id"
	RestReqID       = "request-id"
	RestProvider    = "provider"
	RestConsumer    = "consumer"
	RestAddress     = "address"
)

Rest variable names nolint

Variables

This section is empty.

Functions

func FeesRefundHandlerFn

func FeesRefundHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

func FeesWithdrawHandlerFn

func FeesWithdrawHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

func RegisterRoutes

func RegisterRoutes(cliCtx context.CLIContext, r *mux.Router)

RegisterRoutes defines routes that get registered by the main application

Types

type BasicReq

type BasicReq struct {
	BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` // base req
}

type ServiceBindingEnableReq

type ServiceBindingEnableReq struct {
	BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` // base req
	Deposit string       `json:"deposit" yaml:"deposit"`
}

type ServiceBindingReq

type ServiceBindingReq struct {
	BaseReq     rest.BaseReq `json:"base_req" yaml:"base_req"` // base req
	ServiceName string       `json:"service_name" yaml:"service_name"`
	DefChainId  string       `json:"def_chain_id" yaml:"def_chain_id"`
	BindingType string       `json:"binding_type" yaml:"binding_type"`
	Deposit     string       `json:"deposit" yaml:"deposit"`
	Prices      []string     `json:"prices" yaml:"prices"`
	Level       types.Level  `json:"level" yaml:"level"`
	Provider    string       `json:"provider" yaml:"provider"`
}

type ServiceBindingUpdateReq

type ServiceBindingUpdateReq struct {
	BaseReq     rest.BaseReq `json:"base_req" yaml:"base_req"` // base req
	BindingType string       `json:"binding_type" yaml:"binding_type"`
	Deposit     string       `json:"deposit" yaml:"deposit"`
	Prices      []string     `json:"prices" yaml:"prices"`
	Level       types.Level  `json:"level" yaml:"level"`
}

type ServiceDefinitionReq

type ServiceDefinitionReq struct {
	BaseReq            rest.BaseReq `json:"base_req" yaml:"base_req"` // base req
	ServiceName        string       `json:"service_name" yaml:"service_name"`
	ServiceDescription string       `json:"service_description" yaml:"service_description"`
	AuthorDescription  string       `json:"author_description" yaml:"author_description"`
	Tags               []string     `json:"tags" yaml:"tags"`
	IdlContent         string       `json:"idl_content" yaml:"idl_content"`
	AuthorAddr         string       `json:"author_addr" yaml:"author_addr"`
}

type ServiceRequest

type ServiceRequest struct {
	ServiceName string `json:"service_name" yaml:"service_name"`
	BindChainId string `json:"bind_chain_id" yaml:"bind_chain_id"`
	DefChainId  string `json:"def_chain_id" yaml:"def_chain_id"`
	MethodId    int16  `json:"method_id" yaml:"method_id"`
	Provider    string `json:"provider" yaml:"provider"`
	Consumer    string `json:"consumer" yaml:"consumer"`
	ServiceFee  string `json:"service_fee" yaml:"service_fee"`
	Data        string `json:"data" yaml:"data"`
	Profiling   bool   `json:"profiling" yaml:"profiling"`
}

type ServiceRequestReq

type ServiceRequestReq struct {
	BaseReq  rest.BaseReq     `json:"base_req" yaml:"base_req"` // base req
	Requests []ServiceRequest `json:"requests" yaml:"requests"`
}

type ServiceResponseReq

type ServiceResponseReq struct {
	BaseReq    rest.BaseReq `json:"base_req" yaml:"base_req"` // base req
	ReqChainId string       `json:"req_chain_id" yaml:"req_chain_id"`
	RequestId  string       `json:"request_id" yaml:"request_id"`
	Data       string       `json:"data" yaml:"data"`
	Provider   string       `json:"provider" yaml:"provider"`
	ErrorMsg   string       `json:"error_msg" yaml:"error_msg"`
}

Jump to

Keyboard shortcuts

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