Documentation ¶
Index ¶
- Constants
- Variables
- func DbExists(pl platforms.Platform) bool
- func HistoryKey(entry HistoryEntry) string
- func NormalizeUid(uid string) string
- type Database
- func (d *Database) AddHistory(entry HistoryEntry) error
- func (d *Database) AddMapping(m Mapping) error
- func (d *Database) Close() error
- func (d *Database) DeleteMapping(id string) error
- func (d *Database) GetAllMappings() ([]Mapping, error)
- func (d *Database) GetEnabledMappings() ([]Mapping, error)
- func (d *Database) GetHistory() ([]HistoryEntry, error)
- func (d *Database) GetMapping(id string) (Mapping, error)
- func (d *Database) UpdateMapping(id string, m Mapping) error
- type HistoryEntry
- type Mapping
Constants ¶
View Source
const ( BucketHistory = "history" BucketMappings = "mappings" )
View Source
const ( MappingTypeUID = "uid" MappingTypeText = "text" MappingTypeData = "data" MatchTypeExact = "exact" MatchTypePartial = "partial" MatchTypeRegex = "regex" )
Variables ¶
View Source
var AllowedMappingTypes = []string{ MappingTypeUID, MappingTypeText, MappingTypeData, }
View Source
var AllowedMatchTypes = []string{ MatchTypeExact, MatchTypePartial, MatchTypeRegex, }
Functions ¶
func HistoryKey ¶
func HistoryKey(entry HistoryEntry) string
func NormalizeUid ¶
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func (*Database) AddHistory ¶
func (d *Database) AddHistory(entry HistoryEntry) error
func (*Database) AddMapping ¶
func (*Database) DeleteMapping ¶
func (*Database) GetAllMappings ¶
func (*Database) GetEnabledMappings ¶
func (*Database) GetHistory ¶
func (d *Database) GetHistory() ([]HistoryEntry, error)
Click to show internal directories.
Click to hide internal directories.