db

package
v0.6.11 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2019 License: MIT Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConflictError added in v0.1.10

func ConflictError(err error) bool

func NewBlockMessageStore added in v0.1.10

func NewBlockMessageStore(db *sql.DB, lock *sync.Mutex) repo.BlockMessageStore

func NewBlockStore

func NewBlockStore(db *sql.DB, lock *sync.Mutex) repo.BlockStore

func NewCafeClientMessageStore added in v0.1.10

func NewCafeClientMessageStore(db *sql.DB, lock *sync.Mutex) repo.CafeClientMessageStore

func NewCafeClientNonceStore added in v0.1.10

func NewCafeClientNonceStore(db *sql.DB, lock *sync.Mutex) repo.CafeClientNonceStore

func NewCafeClientStore added in v0.1.10

func NewCafeClientStore(db *sql.DB, lock *sync.Mutex) repo.CafeClientStore

func NewCafeClientThreadStore added in v0.1.10

func NewCafeClientThreadStore(db *sql.DB, lock *sync.Mutex) repo.CafeClientThreadStore

func NewCafeMessageStore added in v0.1.10

func NewCafeMessageStore(db *sql.DB, lock *sync.Mutex) repo.CafeMessageStore

func NewCafeRequestStore added in v0.1.10

func NewCafeRequestStore(db *sql.DB, lock *sync.Mutex) repo.CafeRequestStore

func NewCafeSessionStore added in v0.1.10

func NewCafeSessionStore(db *sql.DB, lock *sync.Mutex) repo.CafeSessionStore

func NewCafeTokenStore added in v0.1.10

func NewCafeTokenStore(db *sql.DB, lock *sync.Mutex) repo.CafeTokenStore

func NewConfigStore

func NewConfigStore(db *sql.DB, lock *sync.Mutex, path string) repo.ConfigStore

func NewFileStore added in v0.1.10

func NewFileStore(db *sql.DB, lock *sync.Mutex) repo.FileStore

func NewInviteStore added in v0.1.10

func NewInviteStore(db *sql.DB, lock *sync.Mutex) repo.InviteStore

func NewNotificationStore

func NewNotificationStore(db *sql.DB, lock *sync.Mutex) repo.NotificationStore

func NewPeerStore

func NewPeerStore(db *sql.DB, lock *sync.Mutex) repo.PeerStore

func NewThreadPeerStore added in v0.1.10

func NewThreadPeerStore(db *sql.DB, lock *sync.Mutex) repo.ThreadPeerStore

func NewThreadStore

func NewThreadStore(db *sql.DB, lock *sync.Mutex) repo.ThreadStore

Types

type BlockDB

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

func (*BlockDB) Add

func (c *BlockDB) Add(block *pb.Block) error

func (*BlockDB) AddAttempt added in v0.4.1

func (c *BlockDB) AddAttempt(id string) error

func (*BlockDB) BeginTransaction

func (m *BlockDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*BlockDB) Count

func (c *BlockDB) Count(query string) int

func (*BlockDB) Delete

func (c *BlockDB) Delete(id string) error

func (*BlockDB) DeleteByThread added in v0.1.10

func (c *BlockDB) DeleteByThread(threadId string) error

func (*BlockDB) ExecuteQuery

func (m *BlockDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*BlockDB) Get

func (c *BlockDB) Get(id string) *pb.Block

func (*BlockDB) List

func (c *BlockDB) List(offset string, limit int, query string) *pb.BlockList

func (*BlockDB) PrepareAndExecuteQuery

func (m *BlockDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*BlockDB) PrepareQuery

func (m *BlockDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

func (*BlockDB) Replace added in v0.4.1

func (c *BlockDB) Replace(block *pb.Block) error

type BlockMessageDB added in v0.1.10

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

func (*BlockMessageDB) Add added in v0.1.10

func (c *BlockMessageDB) Add(msg *pb.BlockMessage) error

func (*BlockMessageDB) BeginTransaction added in v0.1.10

func (m *BlockMessageDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*BlockMessageDB) Delete added in v0.1.10

func (c *BlockMessageDB) Delete(id string) error

func (*BlockMessageDB) ExecuteQuery added in v0.1.10

func (m *BlockMessageDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*BlockMessageDB) List added in v0.1.10

func (c *BlockMessageDB) List(offset string, limit int) []pb.BlockMessage

func (*BlockMessageDB) PrepareAndExecuteQuery added in v0.1.10

func (m *BlockMessageDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*BlockMessageDB) PrepareQuery added in v0.1.10

func (m *BlockMessageDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

type CafeClientDB added in v0.1.10

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

func (*CafeClientDB) Add added in v0.1.10

func (c *CafeClientDB) Add(client *pb.CafeClient) error

func (*CafeClientDB) BeginTransaction added in v0.1.10

func (m *CafeClientDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*CafeClientDB) Count added in v0.1.10

func (c *CafeClientDB) Count() int

func (*CafeClientDB) Delete added in v0.1.10

func (c *CafeClientDB) Delete(id string) error

func (*CafeClientDB) ExecuteQuery added in v0.1.10

func (m *CafeClientDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*CafeClientDB) Get added in v0.1.10

func (c *CafeClientDB) Get(id string) *pb.CafeClient

func (*CafeClientDB) List added in v0.1.10

func (c *CafeClientDB) List() []pb.CafeClient

func (*CafeClientDB) ListByAddress added in v0.1.10

func (c *CafeClientDB) ListByAddress(address string) []pb.CafeClient

func (*CafeClientDB) PrepareAndExecuteQuery added in v0.1.10

func (m *CafeClientDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*CafeClientDB) PrepareQuery added in v0.1.10

func (m *CafeClientDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

func (*CafeClientDB) UpdateLastSeen added in v0.1.10

func (c *CafeClientDB) UpdateLastSeen(id string, date time.Time) error

type CafeClientMessagesDB added in v0.1.10

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

func (*CafeClientMessagesDB) AddOrUpdate added in v0.1.10

func (c *CafeClientMessagesDB) AddOrUpdate(message *pb.CafeClientMessage) error

func (*CafeClientMessagesDB) BeginTransaction added in v0.1.10

func (m *CafeClientMessagesDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*CafeClientMessagesDB) CountByClient added in v0.1.10

func (c *CafeClientMessagesDB) CountByClient(clientId string) int

func (*CafeClientMessagesDB) Delete added in v0.1.10

func (c *CafeClientMessagesDB) Delete(id string, clientId string) error

func (*CafeClientMessagesDB) DeleteByClient added in v0.1.10

func (c *CafeClientMessagesDB) DeleteByClient(clientId string, limit int) error

func (*CafeClientMessagesDB) ExecuteQuery added in v0.1.10

func (m *CafeClientMessagesDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*CafeClientMessagesDB) ListByClient added in v0.1.10

func (c *CafeClientMessagesDB) ListByClient(clientId string, limit int) []pb.CafeClientMessage

func (*CafeClientMessagesDB) PrepareAndExecuteQuery added in v0.1.10

func (m *CafeClientMessagesDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*CafeClientMessagesDB) PrepareQuery added in v0.1.10

func (m *CafeClientMessagesDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

type CafeClientNonceDB added in v0.1.10

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

func (*CafeClientNonceDB) Add added in v0.1.10

func (c *CafeClientNonceDB) Add(nonce *pb.CafeClientNonce) error

func (*CafeClientNonceDB) BeginTransaction added in v0.1.10

func (m *CafeClientNonceDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*CafeClientNonceDB) Delete added in v0.1.10

func (c *CafeClientNonceDB) Delete(value string) error

func (*CafeClientNonceDB) ExecuteQuery added in v0.1.10

func (m *CafeClientNonceDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*CafeClientNonceDB) Get added in v0.1.10

func (c *CafeClientNonceDB) Get(value string) *pb.CafeClientNonce

func (*CafeClientNonceDB) PrepareAndExecuteQuery added in v0.1.10

func (m *CafeClientNonceDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*CafeClientNonceDB) PrepareQuery added in v0.1.10

func (m *CafeClientNonceDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

type CafeClientThreadDB added in v0.1.10

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

func (*CafeClientThreadDB) AddOrUpdate added in v0.1.10

func (c *CafeClientThreadDB) AddOrUpdate(thrd *pb.CafeClientThread) error

func (*CafeClientThreadDB) BeginTransaction added in v0.1.10

func (m *CafeClientThreadDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*CafeClientThreadDB) Delete added in v0.1.10

func (c *CafeClientThreadDB) Delete(id string, clientId string) error

func (*CafeClientThreadDB) DeleteByClient added in v0.1.10

func (c *CafeClientThreadDB) DeleteByClient(clientId string) error

func (*CafeClientThreadDB) ExecuteQuery added in v0.1.10

func (m *CafeClientThreadDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*CafeClientThreadDB) ListByClient added in v0.1.10

func (c *CafeClientThreadDB) ListByClient(clientId string) []pb.CafeClientThread

func (*CafeClientThreadDB) PrepareAndExecuteQuery added in v0.1.10

func (m *CafeClientThreadDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*CafeClientThreadDB) PrepareQuery added in v0.1.10

func (m *CafeClientThreadDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

type CafeMessageDB added in v0.1.10

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

func (*CafeMessageDB) Add added in v0.1.10

func (c *CafeMessageDB) Add(req *pb.CafeMessage) error

func (*CafeMessageDB) AddAttempt added in v0.1.10

func (c *CafeMessageDB) AddAttempt(id string) error

func (*CafeMessageDB) BeginTransaction added in v0.1.10

func (m *CafeMessageDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*CafeMessageDB) Delete added in v0.1.10

func (c *CafeMessageDB) Delete(id string) error

func (*CafeMessageDB) ExecuteQuery added in v0.1.10

func (m *CafeMessageDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*CafeMessageDB) List added in v0.1.10

func (c *CafeMessageDB) List(offset string, limit int) []pb.CafeMessage

func (*CafeMessageDB) PrepareAndExecuteQuery added in v0.1.10

func (m *CafeMessageDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*CafeMessageDB) PrepareQuery added in v0.1.10

func (m *CafeMessageDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

type CafeRequestDB added in v0.1.10

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

func (*CafeRequestDB) Add added in v0.1.10

func (c *CafeRequestDB) Add(req *pb.CafeRequest) error

func (*CafeRequestDB) AddAttempt added in v0.3.0

func (c *CafeRequestDB) AddAttempt(id string) error

func (*CafeRequestDB) BeginTransaction added in v0.1.10

func (m *CafeRequestDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*CafeRequestDB) Count added in v0.3.0

func (c *CafeRequestDB) Count(status pb.CafeRequest_Status) int

func (*CafeRequestDB) Delete added in v0.1.10

func (c *CafeRequestDB) Delete(id string) error

func (*CafeRequestDB) DeleteByCafe added in v0.1.10

func (c *CafeRequestDB) DeleteByCafe(cafeId string) error

func (*CafeRequestDB) DeleteByGroup added in v0.1.12

func (c *CafeRequestDB) DeleteByGroup(groupId string) error

func (*CafeRequestDB) DeleteBySyncGroup added in v0.3.0

func (c *CafeRequestDB) DeleteBySyncGroup(syncGroupId string) error

func (*CafeRequestDB) DeleteCompleteSyncGroups added in v0.3.0

func (c *CafeRequestDB) DeleteCompleteSyncGroups() error

func (*CafeRequestDB) ExecuteQuery added in v0.1.10

func (m *CafeRequestDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*CafeRequestDB) Get added in v0.1.12

func (c *CafeRequestDB) Get(id string) *pb.CafeRequest

func (*CafeRequestDB) GetGroup added in v0.3.0

func (c *CafeRequestDB) GetGroup(group string) *pb.CafeRequestList

func (*CafeRequestDB) GetSyncGroup added in v0.3.0

func (c *CafeRequestDB) GetSyncGroup(group string) string

func (*CafeRequestDB) List added in v0.1.10

func (c *CafeRequestDB) List(offset string, limit int) *pb.CafeRequestList

func (*CafeRequestDB) ListGroups added in v0.3.0

func (c *CafeRequestDB) ListGroups(offset string, limit int) []string

func (*CafeRequestDB) PrepareAndExecuteQuery added in v0.1.10

func (m *CafeRequestDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*CafeRequestDB) PrepareQuery added in v0.1.10

func (m *CafeRequestDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

func (*CafeRequestDB) SyncGroupComplete added in v0.3.0

func (c *CafeRequestDB) SyncGroupComplete(syncGroupId string) bool

func (*CafeRequestDB) SyncGroupStatus added in v0.3.0

func (c *CafeRequestDB) SyncGroupStatus(groupId string) *pb.CafeSyncGroupStatus

func (*CafeRequestDB) UpdateGroupProgress added in v0.4.2

func (c *CafeRequestDB) UpdateGroupProgress(groupId string, transferred int64, total int64) error

func (*CafeRequestDB) UpdateGroupStatus added in v0.3.0

func (c *CafeRequestDB) UpdateGroupStatus(groupId string, status pb.CafeRequest_Status) error

func (*CafeRequestDB) UpdateStatus added in v0.1.12

func (c *CafeRequestDB) UpdateStatus(id string, status pb.CafeRequest_Status) error

type CafeSessionDB added in v0.1.10

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

func (*CafeSessionDB) AddOrUpdate added in v0.1.10

func (c *CafeSessionDB) AddOrUpdate(session *pb.CafeSession) error

func (*CafeSessionDB) BeginTransaction added in v0.1.10

func (m *CafeSessionDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*CafeSessionDB) Delete added in v0.1.10

func (c *CafeSessionDB) Delete(cafeId string) error

func (*CafeSessionDB) ExecuteQuery added in v0.1.10

func (m *CafeSessionDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*CafeSessionDB) Get added in v0.1.10

func (c *CafeSessionDB) Get(cafeId string) *pb.CafeSession

func (*CafeSessionDB) List added in v0.1.10

func (c *CafeSessionDB) List() *pb.CafeSessionList

func (*CafeSessionDB) PrepareAndExecuteQuery added in v0.1.10

func (m *CafeSessionDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*CafeSessionDB) PrepareQuery added in v0.1.10

func (m *CafeSessionDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

type CafeTokenDB added in v0.1.10

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

func (*CafeTokenDB) Add added in v0.1.10

func (c *CafeTokenDB) Add(token *pb.CafeToken) error

func (*CafeTokenDB) BeginTransaction added in v0.1.10

func (m *CafeTokenDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*CafeTokenDB) Delete added in v0.1.10

func (c *CafeTokenDB) Delete(id string) error

func (*CafeTokenDB) ExecuteQuery added in v0.1.10

func (m *CafeTokenDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*CafeTokenDB) Get added in v0.1.10

func (c *CafeTokenDB) Get(id string) *pb.CafeToken

func (*CafeTokenDB) List added in v0.1.10

func (c *CafeTokenDB) List() []pb.CafeToken

func (*CafeTokenDB) PrepareAndExecuteQuery added in v0.1.10

func (m *CafeTokenDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*CafeTokenDB) PrepareQuery added in v0.1.10

func (m *CafeTokenDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

type ConfigDB

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

func (*ConfigDB) Configure

func (c *ConfigDB) Configure(accnt *keypair.Full, created time.Time) error

func (*ConfigDB) GetAccount added in v0.1.10

func (c *ConfigDB) GetAccount() (*keypair.Full, error)

func (*ConfigDB) GetCreationDate

func (c *ConfigDB) GetCreationDate() (time.Time, error)

func (*ConfigDB) GetLastDaily added in v0.1.10

func (c *ConfigDB) GetLastDaily() (time.Time, error)

func (*ConfigDB) Init

func (c *ConfigDB) Init(pin string) error

func (*ConfigDB) IsEncrypted

func (c *ConfigDB) IsEncrypted() bool

func (*ConfigDB) SetLastDaily added in v0.1.10

func (c *ConfigDB) SetLastDaily() error

type FileDB added in v0.1.10

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

func (*FileDB) Add added in v0.1.10

func (c *FileDB) Add(file *pb.FileIndex) error

func (*FileDB) AddTarget added in v0.1.10

func (c *FileDB) AddTarget(hash string, target string) error

func (*FileDB) BeginTransaction added in v0.1.10

func (m *FileDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*FileDB) Count added in v0.1.10

func (c *FileDB) Count() int

func (*FileDB) Delete added in v0.1.10

func (c *FileDB) Delete(hash string) error

func (*FileDB) ExecuteQuery added in v0.1.10

func (m *FileDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*FileDB) Get added in v0.1.10

func (c *FileDB) Get(hash string) *pb.FileIndex

func (*FileDB) GetByPrimary added in v0.1.10

func (c *FileDB) GetByPrimary(mill string, checksum string) *pb.FileIndex

func (*FileDB) GetBySource added in v0.1.10

func (c *FileDB) GetBySource(mill string, source string, opts string) *pb.FileIndex

func (*FileDB) PrepareAndExecuteQuery added in v0.1.10

func (m *FileDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*FileDB) PrepareQuery added in v0.1.10

func (m *FileDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

func (*FileDB) RemoveTarget added in v0.1.10

func (c *FileDB) RemoveTarget(hash string, target string) error

type InviteDB added in v0.1.10

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

func (*InviteDB) Add added in v0.1.10

func (c *InviteDB) Add(invite *pb.Invite) error

func (*InviteDB) BeginTransaction added in v0.1.10

func (m *InviteDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*InviteDB) Delete added in v0.1.10

func (c *InviteDB) Delete(id string) error

func (*InviteDB) ExecuteQuery added in v0.1.10

func (m *InviteDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*InviteDB) Get added in v0.1.10

func (c *InviteDB) Get(id string) *pb.Invite

func (*InviteDB) List added in v0.1.10

func (c *InviteDB) List() *pb.InviteList

func (*InviteDB) PrepareAndExecuteQuery added in v0.1.10

func (m *InviteDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*InviteDB) PrepareQuery added in v0.1.10

func (m *InviteDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

type NotificationDB

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

func (*NotificationDB) Add

func (c *NotificationDB) Add(notification *pb.Notification) error

func (*NotificationDB) BeginTransaction

func (m *NotificationDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*NotificationDB) CountUnread

func (c *NotificationDB) CountUnread() int

func (*NotificationDB) Delete

func (c *NotificationDB) Delete(id string) error

func (*NotificationDB) DeleteByActor added in v0.1.10

func (c *NotificationDB) DeleteByActor(actorId string) error

func (*NotificationDB) DeleteByBlock added in v0.1.10

func (c *NotificationDB) DeleteByBlock(blockId string) error

func (*NotificationDB) DeleteBySubject added in v0.1.10

func (c *NotificationDB) DeleteBySubject(subjectId string) error

func (*NotificationDB) ExecuteQuery

func (m *NotificationDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*NotificationDB) Get

func (c *NotificationDB) Get(id string) *pb.Notification

func (*NotificationDB) List

func (c *NotificationDB) List(offset string, limit int) *pb.NotificationList

func (*NotificationDB) PrepareAndExecuteQuery

func (m *NotificationDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*NotificationDB) PrepareQuery

func (m *NotificationDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

func (*NotificationDB) Read

func (c *NotificationDB) Read(id string) error

func (*NotificationDB) ReadAll

func (c *NotificationDB) ReadAll() error

type PeerDB

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

func (*PeerDB) Add

func (c *PeerDB) Add(peer *pb.Peer) error

func (*PeerDB) AddOrUpdate added in v0.1.10

func (c *PeerDB) AddOrUpdate(peer *pb.Peer) error

func (*PeerDB) BeginTransaction

func (m *PeerDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*PeerDB) Count

func (c *PeerDB) Count(query string) int

func (*PeerDB) Delete

func (c *PeerDB) Delete(id string) error

func (*PeerDB) DeleteByAddress added in v0.1.10

func (c *PeerDB) DeleteByAddress(address string) error

func (*PeerDB) ExecuteQuery

func (m *PeerDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*PeerDB) Find added in v0.1.10

func (c *PeerDB) Find(address string, name string, exclude []string) []*pb.Peer

func (*PeerDB) Get

func (c *PeerDB) Get(id string) *pb.Peer

func (*PeerDB) GetBestUser added in v0.1.12

func (c *PeerDB) GetBestUser(id string) *pb.User

func (*PeerDB) List

func (c *PeerDB) List(query string) []*pb.Peer

func (*PeerDB) PrepareAndExecuteQuery

func (m *PeerDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*PeerDB) PrepareQuery

func (m *PeerDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

func (*PeerDB) UpdateAvatar added in v0.1.10

func (c *PeerDB) UpdateAvatar(id string, avatar string) error

func (*PeerDB) UpdateInboxes added in v0.1.10

func (c *PeerDB) UpdateInboxes(id string, inboxes []*pb.Cafe) error

func (*PeerDB) UpdateName added in v0.1.10

func (c *PeerDB) UpdateName(id string, name string) error

type SQLiteDatastore

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

func Create

func Create(repoPath, pin string) (*SQLiteDatastore, error)

func (*SQLiteDatastore) BlockMessages added in v0.1.10

func (d *SQLiteDatastore) BlockMessages() repo.BlockMessageStore

func (*SQLiteDatastore) Blocks

func (d *SQLiteDatastore) Blocks() repo.BlockStore

func (*SQLiteDatastore) CafeClientMessages added in v0.1.10

func (d *SQLiteDatastore) CafeClientMessages() repo.CafeClientMessageStore

func (*SQLiteDatastore) CafeClientNonces added in v0.1.10

func (d *SQLiteDatastore) CafeClientNonces() repo.CafeClientNonceStore

func (*SQLiteDatastore) CafeClientThreads added in v0.1.10

func (d *SQLiteDatastore) CafeClientThreads() repo.CafeClientThreadStore

func (*SQLiteDatastore) CafeClients added in v0.1.10

func (d *SQLiteDatastore) CafeClients() repo.CafeClientStore

func (*SQLiteDatastore) CafeMessages added in v0.1.10

func (d *SQLiteDatastore) CafeMessages() repo.CafeMessageStore

func (*SQLiteDatastore) CafeRequests added in v0.1.10

func (d *SQLiteDatastore) CafeRequests() repo.CafeRequestStore

func (*SQLiteDatastore) CafeSessions added in v0.1.10

func (d *SQLiteDatastore) CafeSessions() repo.CafeSessionStore

func (*SQLiteDatastore) CafeTokens added in v0.1.10

func (d *SQLiteDatastore) CafeTokens() repo.CafeTokenStore

func (*SQLiteDatastore) Close

func (d *SQLiteDatastore) Close()

func (*SQLiteDatastore) Config

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

func (*SQLiteDatastore) Copy

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

func (*SQLiteDatastore) Files added in v0.1.10

func (d *SQLiteDatastore) Files() repo.FileStore

func (*SQLiteDatastore) InitTables

func (d *SQLiteDatastore) InitTables(pin string) error

func (*SQLiteDatastore) Invites added in v0.1.10

func (d *SQLiteDatastore) Invites() repo.InviteStore

func (*SQLiteDatastore) Notifications

func (d *SQLiteDatastore) Notifications() repo.NotificationStore

func (*SQLiteDatastore) Peers

func (d *SQLiteDatastore) Peers() repo.PeerStore

func (*SQLiteDatastore) Ping

func (d *SQLiteDatastore) Ping() error

func (*SQLiteDatastore) ThreadPeers added in v0.1.10

func (d *SQLiteDatastore) ThreadPeers() repo.ThreadPeerStore

func (*SQLiteDatastore) Threads

func (d *SQLiteDatastore) Threads() repo.ThreadStore

type ThreadDB

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

func (*ThreadDB) Add

func (c *ThreadDB) Add(thread *pb.Thread) error

func (*ThreadDB) BeginTransaction

func (m *ThreadDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*ThreadDB) Count

func (c *ThreadDB) Count() int

func (*ThreadDB) Delete

func (c *ThreadDB) Delete(id string) error

func (*ThreadDB) ExecuteQuery

func (m *ThreadDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*ThreadDB) Get

func (c *ThreadDB) Get(id string) *pb.Thread

func (*ThreadDB) GetByKey added in v0.1.10

func (c *ThreadDB) GetByKey(key string) *pb.Thread

func (*ThreadDB) List

func (c *ThreadDB) List() *pb.ThreadList

func (*ThreadDB) PrepareAndExecuteQuery

func (m *ThreadDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*ThreadDB) PrepareQuery

func (m *ThreadDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

func (*ThreadDB) UpdateHead

func (c *ThreadDB) UpdateHead(id string, heads []string) error

func (*ThreadDB) UpdateName added in v0.1.10

func (c *ThreadDB) UpdateName(id string, name string) error

func (*ThreadDB) UpdateSchema added in v0.1.12

func (c *ThreadDB) UpdateSchema(id string, hash string) error

type ThreadPeerDB added in v0.1.10

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

func (*ThreadPeerDB) Add added in v0.1.10

func (c *ThreadPeerDB) Add(peer *pb.ThreadPeer) error

func (*ThreadPeerDB) BeginTransaction added in v0.1.10

func (m *ThreadPeerDB) BeginTransaction() (*sql.Tx, error)

BeginTransaction returns a *sql.Tx for transactional query support

func (*ThreadPeerDB) Count added in v0.1.10

func (c *ThreadPeerDB) Count(distinct bool) int

func (*ThreadPeerDB) Delete added in v0.1.10

func (c *ThreadPeerDB) Delete(id string, threadId string) error

func (*ThreadPeerDB) DeleteById added in v0.1.10

func (c *ThreadPeerDB) DeleteById(id string) error

func (*ThreadPeerDB) DeleteByThread added in v0.1.10

func (c *ThreadPeerDB) DeleteByThread(threadId string) error

func (*ThreadPeerDB) ExecuteQuery added in v0.1.10

func (m *ThreadPeerDB) ExecuteQuery(query string, args ...interface{}) (sql.Result, error)

ExecuteQuery returns the *sql.Result for the executed query without returning Rows

func (*ThreadPeerDB) List added in v0.1.10

func (c *ThreadPeerDB) List() []pb.ThreadPeer

func (*ThreadPeerDB) ListById added in v0.1.10

func (c *ThreadPeerDB) ListById(id string) []pb.ThreadPeer

func (*ThreadPeerDB) ListByThread added in v0.1.10

func (c *ThreadPeerDB) ListByThread(threadId string) []pb.ThreadPeer

func (*ThreadPeerDB) ListUnwelcomedByThread added in v0.1.10

func (c *ThreadPeerDB) ListUnwelcomedByThread(threadId string) []pb.ThreadPeer

func (*ThreadPeerDB) PrepareAndExecuteQuery added in v0.1.10

func (m *ThreadPeerDB) PrepareAndExecuteQuery(query string, args ...interface{}) (*sql.Rows, error)

PrepareAndExecuteQuery returns the resulting *sql.Rows for the executed query

func (*ThreadPeerDB) PrepareQuery added in v0.1.10

func (m *ThreadPeerDB) PrepareQuery(query string) (*sql.Stmt, error)

PrepareQuery returns a *sql.Stmt to the wrapped DB

func (*ThreadPeerDB) WelcomeByThread added in v0.1.10

func (c *ThreadPeerDB) WelcomeByThread(threadId string) error

Jump to

Keyboard shortcuts

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