Documentation ¶
Index ¶
- Constants
- type DbError
- type ErrorCode
- type MemDatabase
- func (mb *MemDatabase) Delete(namespace string, key string) *DbError
- func (mb *MemDatabase) DeleteAll(namespace string) *DbError
- func (mb *MemDatabase) Get(namespace string, key string) ([]byte, *DbError)
- func (mb *MemDatabase) GetAll(namespace string) (map[string][]byte, *DbError)
- func (mb *MemDatabase) GetNamespaces() []string
- func (mb *MemDatabase) Init()
- func (mb *MemDatabase) Upsert(namespace string, key string, value []byte) *DbError
- type PGDatabase
- func (p PGDatabase) Delete(namespace string, key string) *DbError
- func (p PGDatabase) DeleteAll(namespace string) *DbError
- func (p PGDatabase) Get(namespace string, key string) ([]byte, *DbError)
- func (p PGDatabase) GetAll(namespace string) (map[string][]byte, *DbError)
- func (p PGDatabase) GetNamespaces() []string
- func (p *PGDatabase) Init()
- func (p PGDatabase) Upsert(namespace string, key string, value []byte) *DbError
- type SQLiteDatabase
- func (p SQLiteDatabase) Delete(namespace string, key string) *DbError
- func (p SQLiteDatabase) DeleteAll(namespace string) *DbError
- func (p SQLiteDatabase) Get(namespace string, key string) ([]byte, *DbError)
- func (p SQLiteDatabase) GetAll(namespace string) (map[string][]byte, *DbError)
- func (p SQLiteDatabase) GetNamespaces() []string
- func (p *SQLiteDatabase) Init()
- func (p SQLiteDatabase) Upsert(namespace string, key string, value []byte) *DbError
- type StorageDatabase
- func (s *StorageDatabase) Delete(namespace string, key string) *DbError
- func (s *StorageDatabase) DeleteAll(namespace string) *DbError
- func (s *StorageDatabase) Get(namespace string, key string) ([]byte, *DbError)
- func (s *StorageDatabase) GetAll(namespace string) (map[string][]byte, *DbError)
- func (s *StorageDatabase) GetNamespaces() []string
- func (s *StorageDatabase) Init()
- func (s *StorageDatabase) Upsert(namespace string, key string, value []byte) *DbError
Constants ¶
View Source
const ( INTERNAL_ERROR = 0 NAMESPACE_NOT_FOUND = 1 ID_NOT_FOUND = 2 UNABLE_TO_CREATE_TABLE = 3 FILESYSTEM_ERROR = 4 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemDatabase ¶
type MemDatabase struct {
// contains filtered or unexported fields
}
func (*MemDatabase) DeleteAll ¶
func (mb *MemDatabase) DeleteAll(namespace string) *DbError
func (*MemDatabase) Get ¶
func (mb *MemDatabase) Get(namespace string, key string) ([]byte, *DbError)
func (*MemDatabase) GetAll ¶
func (mb *MemDatabase) GetAll(namespace string) (map[string][]byte, *DbError)
func (*MemDatabase) GetNamespaces ¶
func (mb *MemDatabase) GetNamespaces() []string
func (*MemDatabase) Init ¶
func (mb *MemDatabase) Init()
type PGDatabase ¶
type PGDatabase struct { Host string User string Pass string // contains filtered or unexported fields }
func (PGDatabase) DeleteAll ¶
func (p PGDatabase) DeleteAll(namespace string) *DbError
func (PGDatabase) GetAll ¶
func (p PGDatabase) GetAll(namespace string) (map[string][]byte, *DbError)
func (PGDatabase) GetNamespaces ¶
func (p PGDatabase) GetNamespaces() []string
func (*PGDatabase) Init ¶
func (p *PGDatabase) Init()
type SQLiteDatabase ¶ added in v1.3.0
type SQLiteDatabase struct { DirPath string // contains filtered or unexported fields }
func (SQLiteDatabase) Delete ¶ added in v1.3.0
func (p SQLiteDatabase) Delete(namespace string, key string) *DbError
func (SQLiteDatabase) DeleteAll ¶ added in v1.3.0
func (p SQLiteDatabase) DeleteAll(namespace string) *DbError
func (SQLiteDatabase) Get ¶ added in v1.3.0
func (p SQLiteDatabase) Get(namespace string, key string) ([]byte, *DbError)
func (SQLiteDatabase) GetAll ¶ added in v1.3.0
func (p SQLiteDatabase) GetAll(namespace string) (map[string][]byte, *DbError)
func (SQLiteDatabase) GetNamespaces ¶ added in v1.3.0
func (p SQLiteDatabase) GetNamespaces() []string
func (*SQLiteDatabase) Init ¶ added in v1.3.0
func (p *SQLiteDatabase) Init()
type StorageDatabase ¶
type StorageDatabase struct {
RootDirPath string
}
func (*StorageDatabase) Delete ¶
func (s *StorageDatabase) Delete(namespace string, key string) *DbError
func (*StorageDatabase) DeleteAll ¶
func (s *StorageDatabase) DeleteAll(namespace string) *DbError
func (*StorageDatabase) Get ¶
func (s *StorageDatabase) Get(namespace string, key string) ([]byte, *DbError)
func (*StorageDatabase) GetAll ¶
func (s *StorageDatabase) GetAll(namespace string) (map[string][]byte, *DbError)
func (*StorageDatabase) GetNamespaces ¶
func (s *StorageDatabase) GetNamespaces() []string
func (*StorageDatabase) Init ¶
func (s *StorageDatabase) Init()
Click to show internal directories.
Click to hide internal directories.