db

package
v0.0.0-...-7bc409f Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2016 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt() error

Create a temp database, read the encrypted db into it then replace the encrypted db

func Encrypt

func Encrypt() error

Create a temp encrypted database, read the unencrypted db into it then replace the unencrypted db

Types

type CoinsDB

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

func (*CoinsDB) Delete

func (c *CoinsDB) Delete(txid []byte, index int) error

func (*CoinsDB) GetAll

func (c *CoinsDB) GetAll() []bitcoin.Utxo

func (*CoinsDB) GetValue

func (c *CoinsDB) GetValue(txid []byte, index int) (int, error)

func (*CoinsDB) Has

func (c *CoinsDB) Has(txid []byte, index int) bool

func (*CoinsDB) Put

func (c *CoinsDB) Put(utxo bitcoin.Utxo) error

type ConfigDB

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

func (*ConfigDB) GetIdentityKey

func (c *ConfigDB) GetIdentityKey() ([]byte, error)

func (*ConfigDB) GetMnemonic

func (c *ConfigDB) GetMnemonic() (string, error)

func (*ConfigDB) Init

func (c *ConfigDB) Init(mnemonic string, identityKey []byte, password string) error

func (*ConfigDB) IsEncrypted

func (c *ConfigDB) IsEncrypted() bool

type FollowerDB

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

func (*FollowerDB) Count

func (f *FollowerDB) Count() int

func (*FollowerDB) Delete

func (f *FollowerDB) Delete(follower string) error

func (*FollowerDB) Get

func (f *FollowerDB) Get(offset int, limit int) ([]string, error)

func (*FollowerDB) Put

func (f *FollowerDB) Put(follower string) error

type FollowingDB

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

func (*FollowingDB) Count

func (f *FollowingDB) Count() int

func (*FollowingDB) Delete

func (f *FollowingDB) Delete(follower string) error

func (*FollowingDB) Get

func (f *FollowingDB) Get(offset int, limit int) ([]string, error)

func (*FollowingDB) Put

func (f *FollowingDB) Put(follower string) error

type KeysDB

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

func (*KeysDB) GetAll

func (k *KeysDB) GetAll() ([]*b32.Key, error)

func (*KeysDB) GetKeyForScript

func (k *KeysDB) GetKeyForScript(scriptPubKey []byte) (*b32.Key, error)

func (*KeysDB) GetLastKey

func (k *KeysDB) GetLastKey(purpose bitcoin.KeyPurpose) (*b32.Key, bool, error)

func (*KeysDB) MarkKeyAsUsed

func (k *KeysDB) MarkKeyAsUsed(key *b32.Key) error

func (*KeysDB) Put

func (k *KeysDB) Put(key *b32.Key, scriptPubKey []byte, purpose bitcoin.KeyPurpose) error

type OfflineMessagesDB

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

func (*OfflineMessagesDB) Has

func (o *OfflineMessagesDB) Has(url string) bool

func (*OfflineMessagesDB) Put

func (o *OfflineMessagesDB) Put(url string) error

type PointersDB

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

func (*PointersDB) Delete

func (p *PointersDB) Delete(id peer.ID) error

func (*PointersDB) GetAll

func (p *PointersDB) GetAll() ([]ipfs.Pointer, error)

func (*PointersDB) Put

func (p *PointersDB) Put(pointer ipfs.Pointer) error

type SQLiteDatastore

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

func Create

func Create(repoPath, password string, testnet bool) (*SQLiteDatastore, error)

func (*SQLiteDatastore) Close

func (d *SQLiteDatastore) Close()

func (*SQLiteDatastore) Coins

func (d *SQLiteDatastore) Coins() repo.Coins

func (*SQLiteDatastore) Config

func (d *SQLiteDatastore) Config() repo.Config

func (*SQLiteDatastore) Copy

func (d *SQLiteDatastore) Copy(dbPath string, password string) error

func (*SQLiteDatastore) Followers

func (d *SQLiteDatastore) Followers() repo.Followers

func (*SQLiteDatastore) Following

func (d *SQLiteDatastore) Following() repo.Following

func (*SQLiteDatastore) Keys

func (d *SQLiteDatastore) Keys() repo.Keys

func (*SQLiteDatastore) OfflineMessages

func (d *SQLiteDatastore) OfflineMessages() repo.OfflineMessages

func (*SQLiteDatastore) Pointers

func (d *SQLiteDatastore) Pointers() repo.Pointers

func (*SQLiteDatastore) Transactions

func (d *SQLiteDatastore) Transactions() repo.Transactions

type TransactionsDB

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

func (*TransactionsDB) GetAll

func (t *TransactionsDB) GetAll() []bitcoin.TransactionInfo

func (*TransactionsDB) GetHeight

func (t *TransactionsDB) GetHeight(txid []byte) (int, error)

func (*TransactionsDB) GetUnconfirmed

func (t *TransactionsDB) GetUnconfirmed() []bitcoin.TransactionInfo

func (*TransactionsDB) Has

func (t *TransactionsDB) Has(txid []byte) bool

func (*TransactionsDB) Put

func (*TransactionsDB) UpdateHeight

func (t *TransactionsDB) UpdateHeight(txid []byte, height int) error

func (*TransactionsDB) UpdateState

func (t *TransactionsDB) UpdateState(txid []byte, state bitcoin.TransactionState) error

Jump to

Keyboard shortcuts

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