postgres

package
v0.0.0-...-a1ac4f3 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMessagesInTipset

func GetMessagesInTipset(height uint) ([]api.Message, error)

Types

type Actor

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

func (*Actor) Get

func (t *Actor) Get(id string) (*lily.ActorItem, error)

func (*Actor) Init

func (t *Actor) Init(db Database) error

func (*Actor) List

func (t *Actor) List() ([]lily.ActorItem, error)

type BlockHeader

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

func (*BlockHeader) GetByMessage

func (t *BlockHeader) GetByMessage(height int64, id string) (*blocks.BlockHeader, error)

func (*BlockHeader) List

func (t *BlockHeader) List(address *string, limit *int, offset *int) ([]blocks.BlockHeader, error)

type DB

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

func GetInstanceDB

func GetInstanceDB() *DB

func (*DB) Close

func (db *DB) Close()

type Database

type Database struct {
	Db *pg.DB
}

func (*Database) Close

func (t *Database) Close() error

func (*Database) ConnString

func (t *Database) ConnString(host string, port int, user string, password string, dbName string, searchPath string) string

ConnString returns a connection string based on the parameters it's given This would normally also contain the password, however we're not using one

func (*Database) New

func (t *Database) New(host string, port int, user string, password string, dbName string, searchPath string) error

New makes a new database using the connection string and returns it, otherwise returns the error

type Message

type Message struct {
}

func (*Message) Get

func (t *Message) Get(id string) (*lily.MessageItem, error)

func (*Message) List

func (t *Message) List(limit int, offset int) ([]lily.MessageItem, error)

type MessageConfirmed

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

func (*MessageConfirmed) Get

func (t *MessageConfirmed) Get(id string, height *int) (*lily.GasOutputs, *lily.ParsedMessage, error)

func (*MessageConfirmed) GetMaxHeight

func (t *MessageConfirmed) GetMaxHeight() (int, error)

func (*MessageConfirmed) Init

func (t *MessageConfirmed) Init(cache *ristretto.Cache) error

func (*MessageConfirmed) List

func (t *MessageConfirmed) List(address *string, limit *int, offset *int) ([]derived.GasOutputs, error)

func (*MessageConfirmed) Search

func (t *MessageConfirmed) Search(address *model.Address, limit int, offset int) ([]derived.GasOutputs, error)

Jump to

Keyboard shortcuts

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