relation

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Relation

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

func NewRelation

func NewRelation(cfgFile string) (*Relation, error)

func (*Relation) AccountBlocks

func (r *Relation) AccountBlocks(address types.Address, limit int, offset int) ([]types.Hash, error)

func (*Relation) AddBlock

func (r *Relation) AddBlock(block *types.StateBlock) error

func (*Relation) AddBlocks added in v1.1.1

func (r *Relation) AddBlocks(txn *sqlx.Tx, blocks []*types.StateBlock) error

func (*Relation) BatchUpdate added in v1.2.0

func (r *Relation) BatchUpdate(fn func(txn *sqlx.Tx) error) error

func (*Relation) Blocks

func (r *Relation) Blocks(limit int, offset int) ([]types.Hash, error)

func (*Relation) BlocksCount

func (r *Relation) BlocksCount() (uint64, error)

func (*Relation) BlocksCountByType

func (r *Relation) BlocksCountByType() (map[string]uint64, error)

func (*Relation) Close

func (r *Relation) Close() error

func (*Relation) DeleteBlock

func (r *Relation) DeleteBlock(hash types.Hash) error

func (*Relation) EmptyStore added in v1.2.0

func (r *Relation) EmptyStore() error

func (*Relation) MessageBlocks

func (r *Relation) MessageBlocks(hash types.Hash, limit int, offset int) ([]types.Hash, error)

func (*Relation) PhoneBlocks

func (r *Relation) PhoneBlocks(phone []byte, sender bool, limit int, offset int) ([]types.Hash, error)

func (*Relation) SetEvent

func (r *Relation) SetEvent() error

func (*Relation) UnsubscribeEvent

func (r *Relation) UnsubscribeEvent() error

type Store

type Store interface {
	AccountBlocks(address types.Address, limit int, offset int) ([]types.Hash, error)
	BlocksCount() (uint64, error)
	BlocksCountByType() (map[string]uint64, error)
	Blocks(limit int, offset int) ([]types.Hash, error)
	PhoneBlocks(phone []byte, sender bool, limit int, offset int) ([]types.Hash, error)
	MessageBlocks(hash types.Hash, limit int, offset int) ([]types.Hash, error)
	AddBlock(block *types.StateBlock) error
	DeleteBlock(hash types.Hash) error
	Close() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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