db

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: MIT Imports: 12 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RestoreConnectionWorker

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

Types

type Instance

type Instance struct {
	Gorm *gorm.DB
}

func New

func New(uri, env string) (*Instance, error)

func (*Instance) AddSubscriptions

func (i *Instance) AddSubscriptions(subscriptions []models.Subscription, ctx context.Context) error

func (*Instance) DeleteSubscriptions

func (i *Instance) DeleteSubscriptions(subscriptions []models.Subscription, ctx context.Context) error

func (*Instance) GetLastParsedBlockNumber

func (i *Instance) GetLastParsedBlockNumber(coin string, ctx context.Context) (int64, error)

func (*Instance) GetSubscriptions added in v1.1.4

func (i *Instance) GetSubscriptions(coin uint, addresses []string, ctx context.Context) ([]models.Subscription, error)

func (*Instance) SetLastParsedBlockNumber

func (i *Instance) SetLastParsedBlockNumber(coin string, num int64, ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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