Documentation ¶
Index ¶
- Variables
- type Database
- func (db *Database) Close()
- func (db *Database) GetAosVersion(id string) (version uint64, err error)
- func (db *Database) GetModuleState(id string) (state []byte, err error)
- func (db *Database) GetUpdateState() (state []byte, err error)
- func (db *Database) SetAosVersion(id string, version uint64) (err error)
- func (db *Database) SetModuleState(id string, state []byte) (err error)
- func (db *Database) SetUpdateState(state []byte) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMigrationFailedStr = "database migration failed" //nolint:gochecknoglobals
ErrMigrationFailedStr is returned if migration was failed and db returned to the previous state.
View Source
var ErrNotExistStr = "entry doesn't exist" //nolint:gochecknoglobals
ErrNotExistStr is returned when requested entry not exist in DB.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database structure with database information.
func (*Database) GetAosVersion ¶
GetAosVersion returns module Aos version.
func (*Database) GetModuleState ¶
GetModuleState returns module state.
func (*Database) GetUpdateState ¶
GetUpdateState returns update state.
func (*Database) SetAosVersion ¶
SetAosVersion sets module Aos version.
func (*Database) SetModuleState ¶
SetModuleState sets module state.
func (*Database) SetUpdateState ¶
SetUpdateState stores update state.
Click to show internal directories.
Click to hide internal directories.