api

package
v0.0.0-...-782215f Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var METHODS_SUPPORTED = map[string]string{

	"/ping":   "check if api service valid and backend bitcoin service healthy",
	"/health": "check system status",
	"/help":   "display this message",

	"/install":   "install receiver",
	"/uninstall": "uninstall/remove receiver",
	"/list":      "list all avaliable receivers",
}

http api list

Functions

func R

func R(data interface{}) gin.H

Types

type ApiServer

type ApiServer struct {
	// contains filtered or unexported fields
}

func NewApiServer

func NewApiServer(addr string) *ApiServer

Hook all HTTP routes and start listen on `addr`

func (*ApiServer) HealthCheck

func (api *ApiServer) HealthCheck() (err error)

Check eth rpc server connectivity.

func (*ApiServer) HttpListen

func (api *ApiServer) HttpListen() error

func (*ApiServer) InitAndStartEthClient

func (api *ApiServer) InitAndStartEthClient(cfg *ethclient.Config) (err error)

InitEthClient do the config validation for make initial call to eth backend. Error return if malformat config or rpc server unreachable.

Jump to

Keyboard shortcuts

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