db

package
v1.1.15 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: MIT Imports: 12 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup added in v1.1.15

func Setup(db *gorm.DB) error

Types

type Instance

type Instance struct {
	Gorm        *gorm.DB
	MemoryCache *gocache.Cache
}

func New

func New(url string, log bool) (*Instance, error)

func (*Instance) AddNewAssets added in v1.1.14

func (i *Instance) AddNewAssets(assets []models.Asset) error

func (*Instance) CreateSubscriptions added in v1.1.15

func (i *Instance) CreateSubscriptions(addresses []blockatlas.Subscription) error

func (*Instance) CreateSubscriptionsAssets added in v1.1.15

func (i *Instance) CreateSubscriptionsAssets(associations []models.SubscriptionsAssetAssociation) error

func (*Instance) DeleteSubscriptions

func (i *Instance) DeleteSubscriptions(addresses []string) error

func (*Instance) GetAsset added in v1.1.15

func (i *Instance) GetAsset(assetId string) (models.Asset, error)

func (*Instance) GetAssetsByIDs added in v1.1.14

func (i *Instance) GetAssetsByIDs(ids []string) ([]models.Asset, error)

func (*Instance) GetAssetsFrom added in v1.1.14

func (i *Instance) GetAssetsFrom(from time.Time) ([]models.Asset, error)

func (*Instance) GetLastParsedBlockNumber

func (i *Instance) GetLastParsedBlockNumber(coin string) (int64, error)

func (*Instance) GetSubscriptions added in v1.1.4

func (i *Instance) GetSubscriptions(addresses []string) ([]models.Subscription, error)

func (*Instance) GetSubscriptionsByAddressIDs added in v1.1.15

func (i *Instance) GetSubscriptionsByAddressIDs(ids []string, from time.Time) ([]models.SubscriptionsAssetAssociation, error)

func (*Instance) MemoryGet added in v1.1.14

func (i *Instance) MemoryGet(key string) ([]byte, error)

func (*Instance) MemorySet added in v1.1.14

func (i *Instance) MemorySet(key string, data []byte, exp time.Duration) error

func (*Instance) RestoreConnectionWorker added in v1.1.14

func (i *Instance) RestoreConnectionWorker(timeout time.Duration, uri string)

func (*Instance) SetLastParsedBlockNumber

func (i *Instance) SetLastParsedBlockNumber(coin string, num int64) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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