Documentation ¶
Index ¶
- type DbClient
- func (c *DbClient) Add(path string, entry *decoder.FileDataEntry)
- func (c *DbClient) Delete(path, key string)
- func (c *DbClient) DeleteFile(path string)
- func (c *DbClient) GetDataForFile(path string) []*decoder.FileDataEntry
- func (c *DbClient) GetDataForKey(key string) (*decoder.FileDataEntry, bool)
- func (c *DbClient) GetDataForPrefix(prefix string) []*decoder.FileDataEntry
- type FilesSystemDB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DbClient ¶
DbClient is database client
func (*DbClient) Add ¶
func (c *DbClient) Add(path string, entry *decoder.FileDataEntry)
Add puts new entry to the database, or updates the old one if given key already exists
func (*DbClient) Delete ¶
Delete removes key in given path.
func (*DbClient) DeleteFile ¶
DeleteFile removes file entry including all keys within
func (*DbClient) GetDataForFile ¶
func (c *DbClient) GetDataForFile(path string) []*decoder.FileDataEntry
GetDataForFile returns a map of key-value entries from given file
func (*DbClient) GetDataForKey ¶
func (c *DbClient) GetDataForKey(key string) (*decoder.FileDataEntry, bool)
GetDataForKey returns data for given key.
func (*DbClient) GetDataForPrefix ¶
func (c *DbClient) GetDataForPrefix(prefix string) []*decoder.FileDataEntry
GetDataForPrefix returns all values which match provided prefix
type FilesSystemDB ¶
type FilesSystemDB interface { // Add new key-value data under provided path (path represents file). Newly added data are stored with initial // revision, existing entries are updated Add(path string, entry *decoder.FileDataEntry) // Delete removes key-value data from provided file Delete(path, key string) // Delete file removes file entry from database, together with all underlying key-value data DeleteFile(path string) // GetValuesForPrefix filters the whole database and returns a map of key-value data GetDataForPrefix(prefix string) []*decoder.FileDataEntry // GetDataFromFile returns all the configuration for specific file GetDataForFile(path string) []*decoder.FileDataEntry // GetDataForKey returns data for key with flag whether the data was found or not GetDataForKey(key string) (*decoder.FileDataEntry, bool) }
FilesSystemDB provides methods to manipulate internal filesystem database
Click to show internal directories.
Click to hide internal directories.