mysql

package
v0.0.0-...-e01acf0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

func NewDB

func NewDB(cfg config.Mysql) (*DB, error)

func (DB) CreateAccounts

func (m DB) CreateAccounts(accounts []dmodels.Account) error

func (DB) CreateProposals

func (m DB) CreateProposals(proposals []dmodels.Proposal) error

func (DB) CreateValidators

func (m DB) CreateValidators(validators []dmodels.Validator) error

func (DB) GetAccount

func (m DB) GetAccount(address string) (account dmodels.Account, err error)

func (DB) GetAccounts

func (m DB) GetAccounts(filter filters.Accounts) (accounts []dmodels.Account, err error)

func (DB) GetAccountsTotal

func (m DB) GetAccountsTotal(filter filters.Accounts) (total uint64, err error)

func (DB) GetParser

func (m DB) GetParser(title string) (parser dmodels.Parser, err error)

func (DB) GetParsers

func (m DB) GetParsers() (parsers []dmodels.Parser, err error)

func (DB) GetProposals

func (m DB) GetProposals(filter filters.Proposals) (proposals []dmodels.Proposal, err error)

func (DB) UpdateAccount

func (m DB) UpdateAccount(account dmodels.Account) error

func (DB) UpdateParser

func (m DB) UpdateParser(parser dmodels.Parser) error

func (DB) UpdateProposal

func (m DB) UpdateProposal(proposal dmodels.Proposal) error

func (DB) UpdateValidators

func (m DB) UpdateValidators(validator dmodels.Validator) error

Jump to

Keyboard shortcuts

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