Documentation ¶
Index ¶
- Constants
- type NativeTokenTransferActivity
- type NativeTokenTransferByTime
- type NativeTokenTransferSummary
- type NttTimespan
- type Repository
- func (r *Repository) GetNativeTokenTransferActivity(ctx context.Context, isNotional bool, symbol string) ([]NativeTokenTransferActivity, error)
- func (r *Repository) GetNativeTokenTransferByTime(ctx context.Context, timespan NttTimespan, symbol string, isNotional bool, ...) ([]NativeTokenTransferByTime, error)
- func (r *Repository) GetNativeTokenTransferSummary(ctx context.Context, symbol string) (*NativeTokenTransferSummary, error)
- func (r *Repository) GetSymbolWithAssets(ctx context.Context, timeSpan SymbolWithAssetsTimeSpan) ([]SymbolWithAssetDTO, error)
- func (r *Repository) GetTopCorridores(ctx context.Context, timeSpan TopCorridorsTimeSpan) ([]TopCorridorsDTO, error)
- type Service
- func (s *Service) GetNativeTokenTransferActivity(ctx context.Context, isNotional bool, symbol string) ([]NativeTokenTransferActivity, error)
- func (s *Service) GetNativeTokenTransferAddressTop(ctx context.Context, symbol string, isNotional bool) ([]stats.NativeTokenTransferTopAddress, error)
- func (s *Service) GetNativeTokenTransferByTime(ctx context.Context, timespan NttTimespan, symbol string, isNotional bool, ...) ([]NativeTokenTransferByTime, error)
- func (s *Service) GetNativeTokenTransferSummary(ctx context.Context, symbol string) (*NativeTokenTransferSummary, error)
- func (s *Service) GetNativeTokenTransferTopHolder(ctx context.Context, symbol string) ([]stats.NativeTokenTransferTopHolder, error)
- func (s *Service) GetSymbolWithAssets(ctx context.Context, ts SymbolWithAssetsTimeSpan) ([]SymbolWithAssetDTO, error)
- func (s *Service) GetTopCorridors(ctx context.Context, ts TopCorridorsTimeSpan) ([]TopCorridorsDTO, error)
- type SymbolWithAssetDTO
- type SymbolWithAssetsTimeSpan
- type TopCorridorsDTO
- type TopCorridorsTimeSpan
Constants ¶
View Source
const ( TimeSpan7Days SymbolWithAssetsTimeSpan = "7d" TimeSpan15Days SymbolWithAssetsTimeSpan = "15d" TimeSpan30Days SymbolWithAssetsTimeSpan = "30d" TimeSpan2DaysTopCorridors TopCorridorsTimeSpan = "2d" TimeSpan7DaysTopCorridors TopCorridorsTimeSpan = "7d" HourNttTimespan NttTimespan = "1h" DayNttTimespan NttTimespan = "1d" MonthNttTimespan NttTimespan = "1mo" YearNttTimespan NttTimespan = "1y" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NativeTokenTransferSummary ¶
type NativeTokenTransferSummary struct { TotalValueTokenTransferred *decimal.Decimal `json:"totalValueTokenTransferred"` TotalTokenTransferred *decimal.Decimal `json:"totalTokenTransferred"` AverageTransferSize *decimal.Decimal `json:"averageTransferSize"` MedianTransferSize *decimal.Decimal `json:"medianTransferSize"` MarketCap *decimal.Decimal `json:"marketCap"` CirculatingSupply *decimal.Decimal `json:"circulatingSupply"` }
type NttTimespan ¶
type NttTimespan string
func ParseNttTimespan ¶
func ParseNttTimespan(s string) (*NttTimespan, error)
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository( nttRepo *stats.NTTRepository, client influxdb2.Client, org string, bucket24HoursRetention string, bucketInfiniteRetention string, coingeckoAPI *coingecko.CoinGeckoAPI, tokenProvider *domain.TokenProvider, logger *zap.Logger, ) *Repository
func (*Repository) GetNativeTokenTransferActivity ¶
func (r *Repository) GetNativeTokenTransferActivity(ctx context.Context, isNotional bool, symbol string) ([]NativeTokenTransferActivity, error)
func (*Repository) GetNativeTokenTransferByTime ¶
func (r *Repository) GetNativeTokenTransferByTime(ctx context.Context, timespan NttTimespan, symbol string, isNotional bool, from, to time.Time) ([]NativeTokenTransferByTime, error)
func (*Repository) GetNativeTokenTransferSummary ¶
func (r *Repository) GetNativeTokenTransferSummary(ctx context.Context, symbol string) (*NativeTokenTransferSummary, error)
func (*Repository) GetSymbolWithAssets ¶
func (r *Repository) GetSymbolWithAssets(ctx context.Context, timeSpan SymbolWithAssetsTimeSpan) ([]SymbolWithAssetDTO, error)
func (*Repository) GetTopCorridores ¶
func (r *Repository) GetTopCorridores(ctx context.Context, timeSpan TopCorridorsTimeSpan) ([]TopCorridorsDTO, error)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(repo *Repository, statsRepository *stats.AddressRepository, holderRepository *stats.HolderRepositoryReadable, cache cache.Cache, expiration time.Duration, metrics metrics.Metrics, logger *zap.Logger) *Service
NewService create a new Service.
func (*Service) GetNativeTokenTransferActivity ¶
func (*Service) GetNativeTokenTransferAddressTop ¶
func (*Service) GetNativeTokenTransferByTime ¶
func (s *Service) GetNativeTokenTransferByTime(ctx context.Context, timespan NttTimespan, symbol string, isNotional bool, from, to time.Time) ([]NativeTokenTransferByTime, error)
func (*Service) GetNativeTokenTransferSummary ¶
func (*Service) GetNativeTokenTransferTopHolder ¶
func (*Service) GetSymbolWithAssets ¶
func (s *Service) GetSymbolWithAssets(ctx context.Context, ts SymbolWithAssetsTimeSpan) ([]SymbolWithAssetDTO, error)
func (*Service) GetTopCorridors ¶
func (s *Service) GetTopCorridors(ctx context.Context, ts TopCorridorsTimeSpan) ([]TopCorridorsDTO, error)
type SymbolWithAssetDTO ¶
type SymbolWithAssetsTimeSpan ¶
type SymbolWithAssetsTimeSpan string
SymbolWithAssetsTimeSpan is used as an input parameter for the functions `GetTopAssets` and `GetTopChainPairs`.
func ParseSymbolsWithAssetsTimeSpan ¶
func ParseSymbolsWithAssetsTimeSpan(s string) (*SymbolWithAssetsTimeSpan, error)
ParseSymbolsWithAssetsTimeSpan parses a string and returns a `SymbolsWithAssetsTimeSpan`.
type TopCorridorsDTO ¶
type TopCorridorsTimeSpan ¶
type TopCorridorsTimeSpan string
func ParseTopCorridorsTimeSpan ¶
func ParseTopCorridorsTimeSpan(s string) (*TopCorridorsTimeSpan, error)
Click to show internal directories.
Click to hide internal directories.