Documentation
¶
Index ¶
- type Metadata
- func (m *Metadata) AddStore(name string)
- func (m *Metadata) Close() error
- func (m *Metadata) Ping()
- func (m *Metadata) RemoveStore(name string)
- func (m *Metadata) Sync() error
- func (m *Metadata) Timestamp() time.Time
- func (m *Metadata) Type() string
- func (m *Metadata) WithBackups(backups ...models.Backup) *Metadata
- func (m *Metadata) WithCreated(created time.Time) *Metadata
- func (m *Metadata) WithLastOpened(lastOpened time.Time) *Metadata
- func (m *Metadata) WithStores(stores ...string) *Metadata
- func (m *Metadata) WithWriter(w io.WriteCloser) *Metadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metadata ¶
type Metadata struct { KeeperType string `json:"type"` Created time.Time `json:"created,omitempty"` LastOpened time.Time `json:"last_opened,omitempty"` KnownStores []string `json:"stores,omitempty"` Backups map[string]models.Backup `json:"backups,omitempty"` // contains filtered or unexported fields }
Metadata is a struct that holds the metadata for a [Keeper]'s DB. This is critical for migrating data between [Keeper]s. The only absolute requirement is that the [Type] field is set.
func NewMetaFile ¶
func OpenMetaFile ¶
func (*Metadata) RemoveStore ¶
func (*Metadata) WithStores ¶
func (*Metadata) WithWriter ¶
func (m *Metadata) WithWriter(w io.WriteCloser) *Metadata
Click to show internal directories.
Click to hide internal directories.