Documentation ¶
Index ¶
- func AuthMiddleware(r *mux.Router, chainSvc *service.BlockchainService, handler authErrorHandler) mux.MiddlewareFunc
- func JsonRpcValidationMiddleware(next http.Handler) http.Handler
- func LogTracingMiddleware(prefix string) mux.MiddlewareFunc
- func LoggingMiddleware(next http.Handler) http.Handler
- func MetricsMiddleware(next http.Handler) http.Handler
- func MustServe(svcFactory *service.Factory)
- func Shutdown() error
- func Wrap(controllerFunc func(hc *handlerContext) (interface{}, error), module string) func(w http.ResponseWriter, r *http.Request)
- type BillingController
- type Config
- type JrBillingApi
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthMiddleware ¶
func AuthMiddleware(r *mux.Router, chainSvc *service.BlockchainService, handler authErrorHandler) mux.MiddlewareFunc
func LogTracingMiddleware ¶
func LogTracingMiddleware(prefix string) mux.MiddlewareFunc
Types ¶
type BillingController ¶
type BillingController struct {
// contains filtered or unexported fields
}
func NewBillingController ¶
func NewBillingController(billingSvc *service.BillingService) *BillingController
func (*BillingController) Bill ¶
func (bc *BillingController) Bill(hc *handlerContext) (interface{}, error)
type JrBillingApi ¶
type JrBillingApi struct {
// contains filtered or unexported fields
}
func (*JrBillingApi) Bill ¶
func (api *JrBillingApi) Bill(r *http.Request, args *service.BillingRequest, reply **model.BusinessError) error
JSON-RPC billing API can be requested like: {"jsonrpc":"2.0","method":"web3pay.Bill","params":[{ "dryRun": true, "resourceId": "default"}],"id":1}
func (*JrBillingApi) BillBatch ¶
func (api *JrBillingApi) BillBatch(r *http.Request, args *service.BillingBatchRequest, reply **model.BusinessError) error
JSON-RPC billing batch API can be requested like: {"jsonrpc":"2.0","method":"web3pay.BillBatch","params":[{ "dryRun": true, "resourceUses": {"default":1}}],"id":1}
Click to show internal directories.
Click to hide internal directories.