Documentation ¶
Index ¶
- type Controller
- func (c *Controller) GetAllTokens(ctx *fiber.Ctx) error
- func (c *Controller) NotionalTVL(ctx *fiber.Ctx) error
- func (c *Controller) TotalMessages(ctx *fiber.Ctx) error
- func (c *Controller) TotalNotionalTransferred(ctx *fiber.Ctx) error
- func (c *Controller) TotalNotionalTransferredTo(ctx *fiber.Ctx) error
- type EmitterKey
- type Repository
- func (r *Repository) Query(ctx context.Context, days int, projection bson.D, fn func(*StatisticDoc) error) error
- func (r *Repository) TVL(ctx context.Context) (*TVL, error)
- func (r *Repository) TotalMessages(ctx context.Context) (*TotalMessages, error)
- func (r *Repository) TotalNotionalTransferred(ctx context.Context) (*TotalNotionalTransferred, error)
- func (r *Repository) TotalNotionalTransferredTo(ctx context.Context) (*TotalNotionalTransferredTo, error)
- type Service
- func (s *Service) GetAllTokens(ctx context.Context) ([]*TokenDoc, error)
- func (s *Service) TVL(ctx context.Context) (*TVL, error)
- func (s *Service) TotalMessages(ctx context.Context) (*TotalMessages, error)
- func (s *Service) TotalNotionalTransferred(ctx context.Context) (*TotalNotionalTransferred, error)
- func (s *Service) TotalNotionalTransferredTo(ctx context.Context) (*TotalNotionalTransferredTo, error)
- type StatisticDoc
- type TVL
- type TVLKey
- type TokenDoc
- type TokenTransferKey
- type TokenTransferToKey
- type TotalMessages
- type TotalNotionalTransferred
- type TotalNotionalTransferredTo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(serv *Service, logger *zap.Logger) *Controller
func (*Controller) GetAllTokens ¶
func (c *Controller) GetAllTokens(ctx *fiber.Ctx) error
func (*Controller) NotionalTVL ¶
func (c *Controller) NotionalTVL(ctx *fiber.Ctx) error
func (*Controller) TotalMessages ¶
func (c *Controller) TotalMessages(ctx *fiber.Ctx) error
func (*Controller) TotalNotionalTransferred ¶
func (c *Controller) TotalNotionalTransferred(ctx *fiber.Ctx) error
func (*Controller) TotalNotionalTransferredTo ¶
func (c *Controller) TotalNotionalTransferredTo(ctx *fiber.Ctx) error
type EmitterKey ¶
type EmitterKey struct {
// contains filtered or unexported fields
}
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func (*Repository) Query ¶
func (r *Repository) Query(ctx context.Context, days int, projection bson.D, fn func(*StatisticDoc) error) error
func (*Repository) TotalMessages ¶
func (r *Repository) TotalMessages(ctx context.Context) (*TotalMessages, error)
func (*Repository) TotalNotionalTransferred ¶
func (r *Repository) TotalNotionalTransferred(ctx context.Context) (*TotalNotionalTransferred, error)
func (*Repository) TotalNotionalTransferredTo ¶
func (r *Repository) TotalNotionalTransferredTo(ctx context.Context) (*TotalNotionalTransferredTo, error)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
TODO: remove this
func NewService ¶
func NewService(r *Repository, logger *zap.Logger) *Service
func (*Service) GetAllTokens ¶
func (*Service) TotalMessages ¶
func (s *Service) TotalMessages(ctx context.Context) (*TotalMessages, error)
func (*Service) TotalNotionalTransferred ¶
func (s *Service) TotalNotionalTransferred(ctx context.Context) (*TotalNotionalTransferred, error)
func (*Service) TotalNotionalTransferredTo ¶
func (s *Service) TotalNotionalTransferredTo(ctx context.Context) (*TotalNotionalTransferredTo, error)
type StatisticDoc ¶
type StatisticDoc struct { ID string `bson:"_id" json:"id"` Date *time.Time `bson:"date" json:"date"` EmitterChain vaa.ChainID `bson:"emitterChain" json:"emitterChain"` EmitterAddr string `bson:"emitterAddr" json:"emitterAddr"` TokenChain vaa.ChainID `bson:"tokenChain" json:"tokenChain"` TargetChain vaa.ChainID `bson:"targetChain" json:"targetChain"` TokenAddress string `bson:"tokenAddress" json:"tokenAddress"` TotalVAACount uint32 `bson:"totalVAACount" json:"totalVAACount"` TotalTransferAmount string `bson:"totalTransferAmount" json:"totalTransferAmount"` TotalNotionalUSD float64 `bson:"totalNotionalUSD" json:"totalNotionalUSD"` UpdatedAt *time.Time `bson:"updatedAt" json:"updatedAt"` }
type TokenDoc ¶
type TokenDoc struct { ID string `bson:"_id" json:"id"` TokenAddress string `bson:"tokenAddress" json:"tokenAddress"` TokenChain vaa.ChainID `bson:"tokenChain" json:"tokenChain"` Decimals uint8 `bson:"decimals" json:"decimals"` Symbol string `bson:"symbol" json:"symbol"` Name string `bson:"name" json:"name"` NativeAddress string `bson:"nativeAddress" json:"nativeAddress"` CoinGeckoCoinId string `bson:"coinGeckoCoinId" json:"coinGeckoCoinId"` UpdatedAt *time.Time `bson:"updatedAt" json:"updatedAt"` }
type TokenTransferKey ¶
type TokenTransferKey struct {
// contains filtered or unexported fields
}
type TokenTransferToKey ¶
type TokenTransferToKey struct {
// contains filtered or unexported fields
}
type TotalMessages ¶
type TotalMessages struct {
TotalMessagesPerEmitter map[EmitterKey]uint32
}
type TotalNotionalTransferred ¶
type TotalNotionalTransferred struct {
TotalTransferred map[TokenTransferKey]float64
}
type TotalNotionalTransferredTo ¶
type TotalNotionalTransferredTo struct {
TotalTransferred map[TokenTransferToKey]float64
}
Click to show internal directories.
Click to hide internal directories.