data

package
v0.0.0-...-de6b1b6 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseService

type DatabaseService struct {
	*pg.DB
	// contains filtered or unexported fields
}

func NewDatabaseService

func NewDatabaseService(dbConfig config.DatabaseConfig) *DatabaseService

func (*DatabaseService) DeleteAssetByAssetID

func (s *DatabaseService) DeleteAssetByAssetID(assetID uint64) error

DeleteAssetByAssetID removes an OwnedAsset listing from the database

func (*DatabaseService) InsertNewAsset

func (s *DatabaseService) InsertNewAsset(creatorAddr, managerAddr, reserveAddr, freezeAddr, clawbackAddr, assetID string) error

InsertNewAsset inserts a new asset into the database

func (*DatabaseService) Instantiate

func (s *DatabaseService) Instantiate() error

Instantiate creates DB tables if they don't exist

func (*DatabaseService) Ping

func (s *DatabaseService) Ping() error

Ping pings the database

func (*DatabaseService) SelectAllAssetsForAddress

func (s *DatabaseService) SelectAllAssetsForAddress(addr string) ([]*models.OwnedAssets, error)

SelectAllAssetsForAddress selects all assets where address is one of the addresses linked to it

func (*DatabaseService) UpdateAssetAddresses

func (s *DatabaseService) UpdateAssetAddresses(managerAddr, reserveAddr, freezeAddr, clawbackAddr, assetID string) error

UpdateAssetAddresses updates the mutable addresses linked to an asset

func (*DatabaseService) WaitUntilReady

func (s *DatabaseService) WaitUntilReady() *DatabaseService

WaitUntilReady returns when the database service has connected

Jump to

Keyboard shortcuts

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