Documentation
¶
Index ¶
- Constants
- Variables
- func Hash(info common.Dictionary) string
- func InitDicts(conf *config.Config)
- func Reorder(order map[string]int)
- func SaveDictsSettings(settingsMap map[string]*DictionarySettings) error
- type DictionaryListSorter
- type DictionarySettings
- func (ds *DictionarySettings) Fuzzy() bool
- func (ds *DictionarySettings) Glob() bool
- func (ds *DictionarySettings) Regex() bool
- func (ds *DictionarySettings) SetFuzzy(enable bool)
- func (ds *DictionarySettings) SetGlob(enable bool)
- func (ds *DictionarySettings) SetRegex(enable bool)
- func (ds *DictionarySettings) SetStartWith(enable bool)
- func (ds *DictionarySettings) StartWith() bool
Constants ¶
View Source
const ( FlagNoFuzzy uint16 = 2 << iota FlagNoStartWith FlagNoRegex FlagNoGlob )
Variables ¶
View Source
var ( DictList []common.Dictionary DictByName = map[string]common.Dictionary{} DictsOrder map[string]int DictSettingsMap = map[string]*DictionarySettings{} )
Functions ¶
func Hash ¶
func Hash(info common.Dictionary) string
func SaveDictsSettings ¶
func SaveDictsSettings(settingsMap map[string]*DictionarySettings) error
Types ¶
type DictionaryListSorter ¶
type DictionaryListSorter struct { Order map[string]int List []common.Dictionary }
func (DictionaryListSorter) Len ¶
func (s DictionaryListSorter) Len() int
func (DictionaryListSorter) Less ¶
func (s DictionaryListSorter) Less(i, j int) bool
func (DictionaryListSorter) Swap ¶
func (s DictionaryListSorter) Swap(i, j int)
type DictionarySettings ¶
type DictionarySettings struct { Symbol string `json:"symbol"` Order int `json:"order"` Hash string `json:"hash"` Flags uint16 `json:"flags,omitempty"` HideTermsHeader bool `json:"hide_terms_header,omitempty"` AudioVolume int `json:"audio_volume,omitempty"` }
func NewDictSettings ¶
func NewDictSettings(dic common.Dictionary, index int) *DictionarySettings
func (*DictionarySettings) Fuzzy ¶
func (ds *DictionarySettings) Fuzzy() bool
func (*DictionarySettings) Glob ¶
func (ds *DictionarySettings) Glob() bool
func (*DictionarySettings) Regex ¶
func (ds *DictionarySettings) Regex() bool
func (*DictionarySettings) SetFuzzy ¶
func (ds *DictionarySettings) SetFuzzy(enable bool)
func (*DictionarySettings) SetGlob ¶
func (ds *DictionarySettings) SetGlob(enable bool)
func (*DictionarySettings) SetRegex ¶
func (ds *DictionarySettings) SetRegex(enable bool)
func (*DictionarySettings) SetStartWith ¶
func (ds *DictionarySettings) SetStartWith(enable bool)
func (*DictionarySettings) StartWith ¶
func (ds *DictionarySettings) StartWith() bool
Click to show internal directories.
Click to hide internal directories.