Documentation ¶
Index ¶
- type Handlers
- func (h Handlers) GetCurrentRoundFromAPI(ctx context.Context, w http.ResponseWriter, r *http.Request) error
- func (h Handlers) GetEarliestSyncedRound(ctx context.Context, w http.ResponseWriter, r *http.Request) error
- func (h Handlers) GetLatestSyncedRound(ctx context.Context, w http.ResponseWriter, r *http.Request) error
- func (h Handlers) GetRound(ctx context.Context, w http.ResponseWriter, r *http.Request) error
- func (h Handlers) GetRoundFromAPI(ctx context.Context, w http.ResponseWriter, r *http.Request) error
- func (h Handlers) GetRoundsPagination(ctx context.Context, w http.ResponseWriter, r *http.Request) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handlers ¶
func (Handlers) GetCurrentRoundFromAPI ¶
func (h Handlers) GetCurrentRoundFromAPI(ctx context.Context, w http.ResponseWriter, r *http.Request) error
GetCurrentRoundFromAPI retrieves the current round and returns the block data from Algod API
func (Handlers) GetEarliestSyncedRound ¶
func (h Handlers) GetEarliestSyncedRound(ctx context.Context, w http.ResponseWriter, r *http.Request) error
GetEarliestSyncedRound retrieves the earliest block from CouchDB.
func (Handlers) GetLatestSyncedRound ¶
func (h Handlers) GetLatestSyncedRound(ctx context.Context, w http.ResponseWriter, r *http.Request) error
GetLatestSyncedRound the latest block from CouchDB.
func (Handlers) GetRoundFromAPI ¶
func (h Handlers) GetRoundFromAPI(ctx context.Context, w http.ResponseWriter, r *http.Request) error
GetRoundFromAPI retrieves a block from the Algod API based on the round number (num)
func (Handlers) GetRoundsPagination ¶
func (h Handlers) GetRoundsPagination(ctx context.Context, w http.ResponseWriter, r *http.Request) error
GetRoundsPagination accepts the following parameters: - limit: number of items per page - latest_blk: the latest block number client wants to start with - page: number of pages - order: asc/desc The application counts from the latest_blk, calculates the number of pages using the number of items specified and retrieves the list of block for different pages. It returns the number of pages, number of blocks til the end and the list of blocks of interest as the response.