Documentation ¶
Index ¶
- type Server
- func (s *Server) ApiHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) BlockHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) CountBlocksInDB() int
- func (s *Server) CreateRouter() *mux.Router
- func (s *Server) GetBlock(hash *chainhash.Hash) (*btcjson.GetBlockVerboseResult, error)
- func (s *Server) GetBlockAPI(w http.ResponseWriter, r *http.Request)
- func (s *Server) GetBlockCount() int64
- func (s *Server) GetBlockCountAPI(w http.ResponseWriter, r *http.Request)
- func (s *Server) GetBlockFromDB(hash string) (*btcjson.GetBlockVerboseResult, error)
- func (s *Server) GetBlockHash(height int64) (*chainhash.Hash, error)
- func (s *Server) GetBlockHashAPI(w http.ResponseWriter, r *http.Request)
- func (s *Server) GetConnectionCountAPI(w http.ResponseWriter, r *http.Request)
- func (s *Server) GetDifficultyAPI(w http.ResponseWriter, r *http.Request)
- func (s *Server) GetLatestBlocksAPI(w http.ResponseWriter, r *http.Request)
- func (s *Server) GetNetworkHashPSAPI(w http.ResponseWriter, r *http.Request)
- func (s *Server) GetRawTransactionAPI(w http.ResponseWriter, r *http.Request)
- func (s *Server) GetTransaction(hash *chainhash.Hash) (*btcjson.TxRawResult, error)
- func (s *Server) GetTxFromDB(hash string) (*btcjson.TxRawResult, error)
- func (s *Server) IndexHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) Port() string
- func (s *Server) StoreBlock(block *btcjson.GetBlockVerboseResult) error
- func (s *Server) StoreTx(tx *btcjson.TxRawResult) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(config config.Configuration) *Server
func (*Server) ApiHandler ¶
func (s *Server) ApiHandler(w http.ResponseWriter, r *http.Request)
func (*Server) BlockHandler ¶
func (s *Server) BlockHandler(w http.ResponseWriter, r *http.Request)
func (*Server) CountBlocksInDB ¶
Count the amount of blocks inside the database
func (*Server) CreateRouter ¶
func (*Server) GetBlockAPI ¶
func (s *Server) GetBlockAPI(w http.ResponseWriter, r *http.Request)
Backend Handlers
func (*Server) GetBlockCountAPI ¶
func (s *Server) GetBlockCountAPI(w http.ResponseWriter, r *http.Request)
func (*Server) GetBlockFromDB ¶
func (s *Server) GetBlockFromDB(hash string) (*btcjson.GetBlockVerboseResult, error)
Fetch a block based on its hash
func (*Server) GetBlockHash ¶
Get a blockhash specified by height
func (*Server) GetBlockHashAPI ¶
func (s *Server) GetBlockHashAPI(w http.ResponseWriter, r *http.Request)
func (*Server) GetConnectionCountAPI ¶
func (s *Server) GetConnectionCountAPI(w http.ResponseWriter, r *http.Request)
func (*Server) GetDifficultyAPI ¶
func (s *Server) GetDifficultyAPI(w http.ResponseWriter, r *http.Request)
func (*Server) GetLatestBlocksAPI ¶
func (s *Server) GetLatestBlocksAPI(w http.ResponseWriter, r *http.Request)
func (*Server) GetNetworkHashPSAPI ¶
func (s *Server) GetNetworkHashPSAPI(w http.ResponseWriter, r *http.Request)
func (*Server) GetRawTransactionAPI ¶
func (s *Server) GetRawTransactionAPI(w http.ResponseWriter, r *http.Request)
func (*Server) GetTransaction ¶
func (*Server) GetTxFromDB ¶
func (s *Server) GetTxFromDB(hash string) (*btcjson.TxRawResult, error)
Fetch a transaction based on its ID
func (*Server) IndexHandler ¶
func (s *Server) IndexHandler(w http.ResponseWriter, r *http.Request)
Frontend Handlers
func (*Server) StoreBlock ¶
func (s *Server) StoreBlock(block *btcjson.GetBlockVerboseResult) error
Click to show internal directories.
Click to hide internal directories.