db

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2016 License: MIT Imports: 29 Imported by: 44

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 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(offsetId string, 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(offsetId string, limit int) ([]string, error)

func (*FollowingDB) Put

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

type InventoryDB

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

func (*InventoryDB) Delete

func (i *InventoryDB) Delete(path string) error

func (*InventoryDB) DeleteAll added in v0.1.1

func (i *InventoryDB) DeleteAll(slug string) error

func (*InventoryDB) Get

func (i *InventoryDB) Get(slug string) (map[string]int, error)

func (*InventoryDB) GetAll

func (i *InventoryDB) GetAll() (map[string]int, error)

func (*InventoryDB) GetSpecific added in v0.1.1

func (i *InventoryDB) GetSpecific(path string) (int, error)

func (*InventoryDB) Put

func (i *InventoryDB) Put(slug string, count int) error

type KeysDB

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

func (*KeysDB) GetAll

func (k *KeysDB) GetAll() ([]spvwallet.KeyPath, error)

func (*KeysDB) GetLastKeyIndex

func (k *KeysDB) GetLastKeyIndex(purpose spvwallet.KeyPurpose) (int, bool, error)

func (*KeysDB) GetLookaheadWindows

func (k *KeysDB) GetLookaheadWindows() map[spvwallet.KeyPurpose]int

func (*KeysDB) GetPathForScript

func (k *KeysDB) GetPathForScript(scriptPubKey []byte) (spvwallet.KeyPath, error)

func (*KeysDB) GetUnused

func (k *KeysDB) GetUnused(purpose spvwallet.KeyPurpose) (int, error)

func (*KeysDB) MarkKeyAsUsed

func (k *KeysDB) MarkKeyAsUsed(scriptPubKey []byte) error

func (*KeysDB) Put

func (k *KeysDB) Put(scriptPubKey []byte, keyPath spvwallet.KeyPath) 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) DeleteAll added in v0.1.1

func (p *PointersDB) DeleteAll(purpose ipfs.Purpose) 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) 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) Inventory

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

func (*SQLiteDatastore) Keys

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

func (*SQLiteDatastore) OfflineMessages

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

func (*SQLiteDatastore) Pointers

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

func (*SQLiteDatastore) Settings

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

func (*SQLiteDatastore) State

func (d *SQLiteDatastore) State() spvwallet.State

func (*SQLiteDatastore) Stxos

func (d *SQLiteDatastore) Stxos() spvwallet.Stxos

func (*SQLiteDatastore) Txns

func (d *SQLiteDatastore) Txns() spvwallet.Txns

func (*SQLiteDatastore) Utxos

func (d *SQLiteDatastore) Utxos() spvwallet.Utxos

type SettingsDB

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

func (*SettingsDB) Get

func (s *SettingsDB) Get() (repo.SettingsData, error)

func (*SettingsDB) Put

func (s *SettingsDB) Put(settings repo.SettingsData) error

func (*SettingsDB) Update

func (s *SettingsDB) Update(settings repo.SettingsData) error

type StateDB

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

func (*StateDB) Get

func (s *StateDB) Get(key string) (string, error)

func (*StateDB) Put

func (s *StateDB) Put(key, value string) error

type StxoDB

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

func (*StxoDB) Delete

func (s *StxoDB) Delete(stxo spvwallet.Stxo) error

func (*StxoDB) GetAll

func (s *StxoDB) GetAll() ([]spvwallet.Stxo, error)

func (*StxoDB) Put

func (s *StxoDB) Put(stxo spvwallet.Stxo) error

type TxnsDB

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

func (*TxnsDB) Delete

func (t *TxnsDB) Delete(txid *chainhash.Hash) error

func (*TxnsDB) Get

func (t *TxnsDB) Get(txid chainhash.Hash) (*wire.MsgTx, error)

func (*TxnsDB) GetAll

func (t *TxnsDB) GetAll() ([]*wire.MsgTx, error)

func (*TxnsDB) Put

func (t *TxnsDB) Put(txn *wire.MsgTx) error

type UtxoDB

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

func (*UtxoDB) Delete

func (u *UtxoDB) Delete(utxo spvwallet.Utxo) error

func (*UtxoDB) GetAll

func (u *UtxoDB) GetAll() ([]spvwallet.Utxo, error)

func (*UtxoDB) Put

func (u *UtxoDB) Put(utxo spvwallet.Utxo) error

Jump to

Keyboard shortcuts

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