api

package
v1.23.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 38 Imported by: 0

Documentation

Overview

Package api provides the api for the explorer service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleJSONAmountStat added in v0.0.81

func HandleJSONAmountStat(r *gqlClient.GetAmountStatistic) *model.ValueResult

HandleJSONAmountStat converts the gqlClient.GetAmountStatistic to model.ValueResul.

func HandleJSONDailyStat added in v0.0.81

HandleJSONDailyStat converts the gqlClient.GetDailyStatisticsByChain to the []*model.DateResultByChain type.

func InitDB

func InitDB(ctx context.Context, address string, readOnly bool, handler metrics.Handler) (db.ConsumerDB, error)

InitDB initializes a database given a database type and path.

func RehydrateCache added in v0.0.81

func RehydrateCache(parentCtx context.Context, client *gqlClient.Client, service cache.Service, handler metrics.Handler) (err error)

RehydrateCache rehydrates the cache.

nolint:dupl,gocognit,cyclop,maintidx

func Start

func Start(ctx context.Context, cfg serverConfig.Config, handler metrics.Handler) error

Start starts the api server.

nolint:cyclop

Types

This section is empty.

Directories

Path Synopsis
Package cache caches data for the frontend
Package cache caches data for the frontend

Jump to

Keyboard shortcuts

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