Documentation ¶
Index ¶
- Variables
- func Decrypt() error
- func Encrypt() error
- type CasesDB
- func (c *CasesDB) Delete(orderID string) error
- func (c *CasesDB) GetAll(offsetId string, limit int) ([]repo.Case, error)
- func (c *CasesDB) GetCaseMetadata(caseID string) (buyerContract, vendorContract *pb.RicardianContract, ...)
- func (c *CasesDB) GetPayoutDetails(caseID string) (buyerContract, vendorContract *pb.RicardianContract, ...)
- func (c *CasesDB) MarkAsClosed(caseID string, resolution *pb.DisputeResolution) error
- func (c *CasesDB) MarkAsRead(orderID string) error
- func (c *CasesDB) Put(caseID string, state pb.OrderState, buyerOpened bool, claim string) error
- func (c *CasesDB) UpdateBuyerInfo(caseID string, buyerContract *pb.RicardianContract, ...) error
- func (c *CasesDB) UpdateVendorInfo(caseID string, vendorContract *pb.RicardianContract, ...) error
- type ChatDB
- func (c *ChatDB) DeleteConversation(peerId string) error
- func (c *ChatDB) DeleteMessage(msgID string) error
- func (c *ChatDB) GetConversations() []repo.ChatConversation
- func (c *ChatDB) GetMessages(peerID string, subject string, offsetId string, limit int) []repo.ChatMessage
- func (c *ChatDB) GetUnreadCount(subject string) (int, error)
- func (c *ChatDB) MarkAsRead(peerID string, subject string, outgoing bool, messageId string) (string, bool, error)
- func (c *ChatDB) Put(messageId string, peerId string, subject string, message string, ...) error
- type ConfigDB
- type CouponDB
- type FollowerDB
- type FollowingDB
- type InventoryDB
- func (i *InventoryDB) Delete(slug string, variantIndex int) error
- func (i *InventoryDB) DeleteAll(slug string) error
- func (i *InventoryDB) Get(slug string) (map[int]int, error)
- func (i *InventoryDB) GetAll() (map[string]map[int]int, error)
- func (i *InventoryDB) GetSpecific(slug string, variantIndex int) (int, error)
- func (i *InventoryDB) Put(slug string, variantIndex int, count int) error
- type KeysDB
- func (k *KeysDB) GetAll() ([]spvwallet.KeyPath, error)
- func (k *KeysDB) GetKeyForScript(scriptPubKey []byte) (*btcec.PrivateKey, error)
- func (k *KeysDB) GetLastKeyIndex(purpose spvwallet.KeyPurpose) (int, bool, error)
- func (k *KeysDB) GetLookaheadWindows() map[spvwallet.KeyPurpose]int
- func (k *KeysDB) GetPathForScript(scriptPubKey []byte) (spvwallet.KeyPath, error)
- func (k *KeysDB) GetUnused(purpose spvwallet.KeyPurpose) ([]int, error)
- func (k *KeysDB) ImportKey(scriptPubKey []byte, key *btcec.PrivateKey) error
- func (k *KeysDB) MarkKeyAsUsed(scriptPubKey []byte) error
- func (k *KeysDB) Put(scriptPubKey []byte, keyPath spvwallet.KeyPath) error
- type ModeratedDB
- type NotficationsDB
- type OfflineMessagesDB
- type PointersDB
- func (p *PointersDB) Delete(id peer.ID) error
- func (p *PointersDB) DeleteAll(purpose ipfs.Purpose) error
- func (p *PointersDB) Get(id peer.ID) (ipfs.Pointer, error)
- func (p *PointersDB) GetAll() ([]ipfs.Pointer, error)
- func (p *PointersDB) GetByPurpose(purpose ipfs.Purpose) ([]ipfs.Pointer, error)
- func (p *PointersDB) Put(pointer ipfs.Pointer) error
- type PurchasesDB
- func (p *PurchasesDB) Delete(orderID string) error
- func (p *PurchasesDB) GetAll(offsetId string, limit int) ([]repo.Purchase, error)
- func (p *PurchasesDB) GetByOrderId(orderId string) (*pb.RicardianContract, pb.OrderState, bool, []*spvwallet.TransactionRecord, ...)
- func (p *PurchasesDB) GetByPaymentAddress(addr btc.Address) (*pb.RicardianContract, pb.OrderState, bool, []*spvwallet.TransactionRecord, ...)
- func (p *PurchasesDB) MarkAsRead(orderID string) error
- func (p *PurchasesDB) Put(orderID string, contract pb.RicardianContract, state pb.OrderState, read bool) error
- func (p *PurchasesDB) UpdateFunding(orderId string, funded bool, records []*spvwallet.TransactionRecord) error
- type SQLiteDatastore
- func (d *SQLiteDatastore) Cases() repo.Cases
- func (d *SQLiteDatastore) Chat() repo.Chat
- func (d *SQLiteDatastore) Close()
- func (d *SQLiteDatastore) Config() repo.Config
- func (d *SQLiteDatastore) Copy(dbPath string, password string) error
- func (d *SQLiteDatastore) Coupons() repo.Coupons
- func (d *SQLiteDatastore) Followers() repo.Followers
- func (d *SQLiteDatastore) Following() repo.Following
- func (d *SQLiteDatastore) Inventory() repo.Inventory
- func (d *SQLiteDatastore) Keys() spvwallet.Keys
- func (d *SQLiteDatastore) ModeratedStores() repo.ModeratedStores
- func (d *SQLiteDatastore) Notifications() repo.Notifications
- func (d *SQLiteDatastore) OfflineMessages() repo.OfflineMessages
- func (d *SQLiteDatastore) Pointers() repo.Pointers
- func (d *SQLiteDatastore) Purchases() repo.Purchases
- func (d *SQLiteDatastore) Sales() repo.Sales
- func (d *SQLiteDatastore) Settings() repo.Settings
- func (d *SQLiteDatastore) Stxos() spvwallet.Stxos
- func (d *SQLiteDatastore) TxMetadata() repo.TxMetadata
- func (d *SQLiteDatastore) Txns() spvwallet.Txns
- func (d *SQLiteDatastore) Utxos() spvwallet.Utxos
- func (d *SQLiteDatastore) WatchedScripts() spvwallet.WatchedScripts
- type SalesDB
- func (s *SalesDB) Delete(orderID string) error
- func (s *SalesDB) GetAll(offsetId string, limit int) ([]repo.Sale, error)
- func (s *SalesDB) GetByOrderId(orderId string) (*pb.RicardianContract, pb.OrderState, bool, []*spvwallet.TransactionRecord, ...)
- func (s *SalesDB) GetByPaymentAddress(addr btc.Address) (*pb.RicardianContract, pb.OrderState, bool, []*spvwallet.TransactionRecord, ...)
- func (s *SalesDB) MarkAsRead(orderID string) error
- func (s *SalesDB) Put(orderID string, contract pb.RicardianContract, state pb.OrderState, read bool) error
- func (s *SalesDB) UpdateFunding(orderId string, funded bool, records []*spvwallet.TransactionRecord) error
- type SettingsDB
- type StxoDB
- type TxMetadataDB
- type TxnsDB
- func (t *TxnsDB) Delete(txid *chainhash.Hash) error
- func (t *TxnsDB) Get(txid chainhash.Hash) (*wire.MsgTx, spvwallet.Txn, error)
- func (t *TxnsDB) GetAll() ([]spvwallet.Txn, error)
- func (t *TxnsDB) MarkAsDead(txid chainhash.Hash) error
- func (t *TxnsDB) Put(txn *wire.MsgTx, value, height int, timestamp time.Time) error
- type UtxoDB
- type WatchedScriptsDB
Constants ¶
This section is empty.
Variables ¶
View Source
var SettingsNotSetError error = errors.New("Settings not set")
Functions ¶
Types ¶
type CasesDB ¶
type CasesDB struct {
// contains filtered or unexported fields
}
func (*CasesDB) GetCaseMetadata ¶
func (c *CasesDB) GetCaseMetadata(caseID string) (buyerContract, vendorContract *pb.RicardianContract, buyerValidationErrors, vendorValidationErrors []string, state pb.OrderState, read bool, timestamp time.Time, buyerOpened bool, claim string, resolution *pb.DisputeResolution, err error)
func (*CasesDB) GetPayoutDetails ¶
func (c *CasesDB) GetPayoutDetails(caseID string) (buyerContract, vendorContract *pb.RicardianContract, buyerPayoutAddress, vendorPayoutAddress string, buyerOutpoints, vendorOutpoints []*pb.Outpoint, state pb.OrderState, err error)
func (*CasesDB) MarkAsClosed ¶
func (c *CasesDB) MarkAsClosed(caseID string, resolution *pb.DisputeResolution) error
func (*CasesDB) MarkAsRead ¶
func (*CasesDB) UpdateBuyerInfo ¶
type ChatDB ¶
type ChatDB struct {
// contains filtered or unexported fields
}
func (*ChatDB) DeleteConversation ¶
func (*ChatDB) DeleteMessage ¶
func (*ChatDB) GetConversations ¶
func (c *ChatDB) GetConversations() []repo.ChatConversation
func (*ChatDB) GetMessages ¶
func (*ChatDB) MarkAsRead ¶
type ConfigDB ¶
type ConfigDB struct {
// contains filtered or unexported fields
}
func (*ConfigDB) GetIdentityKey ¶
func (*ConfigDB) GetMnemonic ¶
func (*ConfigDB) IsEncrypted ¶
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) FollowsMe ¶
func (f *FollowerDB) FollowsMe(peerId string) bool
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) IsFollowing ¶
func (f *FollowingDB) IsFollowing(peerId string) bool
func (*FollowingDB) Put ¶
func (f *FollowingDB) Put(follower string) error
type InventoryDB ¶
type InventoryDB struct {
// contains filtered or unexported fields
}
func (*InventoryDB) DeleteAll ¶
func (i *InventoryDB) DeleteAll(slug string) error
func (*InventoryDB) GetSpecific ¶
func (i *InventoryDB) GetSpecific(slug string, variantIndex int) (int, error)
type KeysDB ¶
type KeysDB struct {
// contains filtered or unexported fields
}
func (*KeysDB) GetKeyForScript ¶
func (k *KeysDB) GetKeyForScript(scriptPubKey []byte) (*btcec.PrivateKey, error)
func (*KeysDB) GetLastKeyIndex ¶
func (*KeysDB) GetLookaheadWindows ¶
func (k *KeysDB) GetLookaheadWindows() map[spvwallet.KeyPurpose]int
func (*KeysDB) GetPathForScript ¶
func (*KeysDB) ImportKey ¶
func (k *KeysDB) ImportKey(scriptPubKey []byte, key *btcec.PrivateKey) error
func (*KeysDB) MarkKeyAsUsed ¶
type ModeratedDB ¶
type ModeratedDB struct {
// contains filtered or unexported fields
}
func (*ModeratedDB) Delete ¶
func (m *ModeratedDB) Delete(follower string) error
func (*ModeratedDB) Put ¶
func (m *ModeratedDB) Put(peerId string) error
type NotficationsDB ¶
type NotficationsDB struct {
// contains filtered or unexported fields
}
func (*NotficationsDB) Delete ¶
func (n *NotficationsDB) Delete(notifID int) error
func (*NotficationsDB) GetAll ¶
func (n *NotficationsDB) GetAll(offsetId int, limit int) []notif.Notification
func (*NotficationsDB) MarkAsRead ¶
func (n *NotficationsDB) MarkAsRead(notifID int) 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) GetByPurpose ¶
type PurchasesDB ¶
type PurchasesDB struct {
// contains filtered or unexported fields
}
func (*PurchasesDB) Delete ¶
func (p *PurchasesDB) Delete(orderID string) error
func (*PurchasesDB) GetByOrderId ¶
func (p *PurchasesDB) GetByOrderId(orderId string) (*pb.RicardianContract, pb.OrderState, bool, []*spvwallet.TransactionRecord, bool, error)
func (*PurchasesDB) GetByPaymentAddress ¶
func (p *PurchasesDB) GetByPaymentAddress(addr btc.Address) (*pb.RicardianContract, pb.OrderState, bool, []*spvwallet.TransactionRecord, error)
func (*PurchasesDB) MarkAsRead ¶
func (p *PurchasesDB) MarkAsRead(orderID string) error
func (*PurchasesDB) Put ¶
func (p *PurchasesDB) Put(orderID string, contract pb.RicardianContract, state pb.OrderState, read bool) error
func (*PurchasesDB) UpdateFunding ¶
func (p *PurchasesDB) UpdateFunding(orderId string, funded bool, records []*spvwallet.TransactionRecord) error
type SQLiteDatastore ¶
type SQLiteDatastore struct {
// contains filtered or unexported fields
}
func (*SQLiteDatastore) Cases ¶
func (d *SQLiteDatastore) Cases() repo.Cases
func (*SQLiteDatastore) Chat ¶
func (d *SQLiteDatastore) Chat() repo.Chat
func (*SQLiteDatastore) Close ¶
func (d *SQLiteDatastore) Close()
func (*SQLiteDatastore) Config ¶
func (d *SQLiteDatastore) Config() repo.Config
func (*SQLiteDatastore) Coupons ¶
func (d *SQLiteDatastore) Coupons() repo.Coupons
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) ModeratedStores ¶
func (d *SQLiteDatastore) ModeratedStores() repo.ModeratedStores
func (*SQLiteDatastore) Notifications ¶
func (d *SQLiteDatastore) Notifications() repo.Notifications
func (*SQLiteDatastore) OfflineMessages ¶
func (d *SQLiteDatastore) OfflineMessages() repo.OfflineMessages
func (*SQLiteDatastore) Pointers ¶
func (d *SQLiteDatastore) Pointers() repo.Pointers
func (*SQLiteDatastore) Purchases ¶
func (d *SQLiteDatastore) Purchases() repo.Purchases
func (*SQLiteDatastore) Sales ¶
func (d *SQLiteDatastore) Sales() repo.Sales
func (*SQLiteDatastore) Settings ¶
func (d *SQLiteDatastore) Settings() repo.Settings
func (*SQLiteDatastore) Stxos ¶
func (d *SQLiteDatastore) Stxos() spvwallet.Stxos
func (*SQLiteDatastore) TxMetadata ¶
func (d *SQLiteDatastore) TxMetadata() repo.TxMetadata
func (*SQLiteDatastore) Txns ¶
func (d *SQLiteDatastore) Txns() spvwallet.Txns
func (*SQLiteDatastore) Utxos ¶
func (d *SQLiteDatastore) Utxos() spvwallet.Utxos
func (*SQLiteDatastore) WatchedScripts ¶
func (d *SQLiteDatastore) WatchedScripts() spvwallet.WatchedScripts
type SalesDB ¶
type SalesDB struct {
// contains filtered or unexported fields
}
func (*SalesDB) GetByOrderId ¶
func (s *SalesDB) GetByOrderId(orderId string) (*pb.RicardianContract, pb.OrderState, bool, []*spvwallet.TransactionRecord, bool, error)
func (*SalesDB) GetByPaymentAddress ¶
func (s *SalesDB) GetByPaymentAddress(addr btc.Address) (*pb.RicardianContract, pb.OrderState, bool, []*spvwallet.TransactionRecord, error)
func (*SalesDB) MarkAsRead ¶
func (*SalesDB) Put ¶
func (s *SalesDB) Put(orderID string, contract pb.RicardianContract, state pb.OrderState, read bool) error
func (*SalesDB) UpdateFunding ¶
type SettingsDB ¶
type SettingsDB struct {
// contains filtered or unexported fields
}
func (*SettingsDB) Delete ¶
func (s *SettingsDB) Delete() error
Delete removes all settings from the database. It's a destructive action that should be used with care.
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 TxMetadataDB ¶
type TxMetadataDB struct {
// contains filtered or unexported fields
}
func (*TxMetadataDB) Delete ¶
func (t *TxMetadataDB) Delete(txid string) error
type WatchedScriptsDB ¶
type WatchedScriptsDB struct {
// contains filtered or unexported fields
}
func (*WatchedScriptsDB) Delete ¶
func (w *WatchedScriptsDB) Delete(scriptPubKey []byte) error
func (*WatchedScriptsDB) GetAll ¶
func (w *WatchedScriptsDB) GetAll() ([][]byte, error)
func (*WatchedScriptsDB) Put ¶
func (w *WatchedScriptsDB) Put(scriptPubKey []byte) error
Click to show internal directories.
Click to hide internal directories.