Documentation ¶
Index ¶
- func Setup(router chi.Router, dbStore gorestapi.Ledger) error
- type Server
- func (s *Server) GetLedgerBlock() http.HandlerFunc
- func (s *Server) GetLedgerBlockData() http.HandlerFunc
- func (s *Server) GetLedgerGenesis() http.HandlerFunc
- func (s *Server) GetLedgerStateDelta() http.HandlerFunc
- func (s *Server) PutLedgerGenesis() http.HandlerFunc
- func (s *Server) PutLedgerStateDelta() http.HandlerFunc
- func (s *Server) SyncDelete() http.HandlerFunc
- func (s *Server) SyncGet() http.HandlerFunc
- func (s *Server) SyncPost() http.HandlerFunc
- type SyncGetResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the API web server
func (*Server) GetLedgerBlock ¶
func (s *Server) GetLedgerBlock() http.HandlerFunc
func (*Server) GetLedgerBlockData ¶
func (s *Server) GetLedgerBlockData() http.HandlerFunc
func (*Server) GetLedgerGenesis ¶
func (s *Server) GetLedgerGenesis() http.HandlerFunc
func (*Server) GetLedgerStateDelta ¶
func (s *Server) GetLedgerStateDelta() http.HandlerFunc
GetLedgerStateDelta Gets Block with deltas
@ID GetLedgerStateDelta @Tags Ledger @Summary GetLedgerStateDelta @Description GetLedgerStateDelta @Param round path int true "round number" example(1) @Success 200 @Failure 500 {object} server.ErrResponse "Internal Error" @Router /v2/deltas/{round} [get]
func (*Server) PutLedgerGenesis ¶
func (s *Server) PutLedgerGenesis() http.HandlerFunc
func (*Server) PutLedgerStateDelta ¶
func (s *Server) PutLedgerStateDelta() http.HandlerFunc
func (*Server) SyncDelete ¶
func (s *Server) SyncDelete() http.HandlerFunc
SyncDelete Deletes
@ID SyncDelete @Tags Sync @Summary Sync @Description Sync @Success 200 @Failure 500 {object} server.ErrResponse "Internal Error" @Router /v2/ledger/sync [delete]
func (*Server) SyncGet ¶
func (s *Server) SyncGet() http.HandlerFunc
SyncGet Gets
@ID SyncGet @Tags Sync @Summary Sync @Description Sync @Success 200 {object} SyncGetResponse @Failure 500 {object} server.ErrResponse "Internal Error" @Router /v2/ledger/sync [get]
func (*Server) SyncPost ¶
func (s *Server) SyncPost() http.HandlerFunc
SyncPost Posts
@ID SyncPost @Tags Sync @Summary Sync @Description Sync @Success 200 @Failure 500 {object} server.ErrResponse "Internal Error" @Router /v2/ledger/sync [post]
type SyncGetResponse ¶
type SyncGetResponse struct {
Round uint64 `json:"round"`
}