Documentation ¶
Index ¶
- Variables
- func TestRun(t *testing.T, test func(ctx *testcontext.Context, t *testing.T, db *DB))
- type Cid
- type DB
- type Pin
- type PinDB
- func (p *PinDB) AllNodes(ctx context.Context) ([]Cid, error)
- func (p *PinDB) AllPins(ctx context.Context) ([]Pin, error)
- func (p *PinDB) Create(ctx context.Context, tx string, ix uint, cid string, amount *big.Int) error
- func (p *PinDB) CreateNode(ctx context.Context, txHash string, ix int, cid string, days uint) (err error)
- func (p *PinDB) FindNew(ctx context.Context) ([]Pin, error)
- func (p *PinDB) Node(ctx context.Context, hash string) (Cid, error)
- func (p *PinDB) PinsOfHash(ctx context.Context, cid string) ([]Pin, error)
- func (p *PinDB) RecordError(ctx context.Context, transaction string, index uint, cid string, s string) error
- type TestDB
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPinDB = errs.Class("PinDB")
ErrPinDB indicates about internal wallets DB error.
View Source
var ( // Error is the default easypindb errs class. Error = errs.Class("easypindb") )
Functions ¶
Types ¶
type DB ¶
DB is easypindb database.
func (*DB) MigrateToLatest ¶
MigrateToLatest migrates pindb to the latest version.
func (*DB) PostgresMigration ¶
PostgresMigration returns steps needed for migrating postgres database.
type Pin ¶
type Pin struct { Cid string Amount *big.Int Transaction string LogIndex uint Processed bool Error string }
Pin represents an entry in the pin table.
type PinDB ¶
type PinDB struct {
// contains filtered or unexported fields
}
PinDB is database stores the pinning events.
architecture: Database
func (*PinDB) CreateNode ¶
func (p *PinDB) CreateNode(ctx context.Context, txHash string, ix int, cid string, days uint) (err error)
CreateNode inserts node record to the table (represents a pinned resource).
func (*PinDB) PinsOfHash ¶
type TestDB ¶
type TestDB struct { *DB // contains filtered or unexported fields }
TestDB is test storjscan database with unique schema which performs cleanup on close.
Click to show internal directories.
Click to hide internal directories.