Documentation
¶
Index ¶
- type LevelDBDatabase
- func (this *LevelDBDatabase) Define(name string, query string) []*dictd.Definition
- func (this *LevelDBDatabase) Description(name string) string
- func (this *LevelDBDatabase) Info(name string) string
- func (this *LevelDBDatabase) Match(name string, query string, strat string) (defs []*dictd.Definition)
- func (this *LevelDBDatabase) Strategies(name string) map[string]string
- func (this *LevelDBDatabase) WriteDefinition(word string, definition string)
- type UrbanDictionaryDatabase
- func (this *UrbanDictionaryDatabase) Define(name string, query string) (definitions []*dictd.Definition)
- func (this *UrbanDictionaryDatabase) Description(name string) string
- func (this *UrbanDictionaryDatabase) Info(name string) string
- func (this *UrbanDictionaryDatabase) Match(name string, query string, strat string) []*dictd.Definition
- func (this *UrbanDictionaryDatabase) Strategies(name string) map[string]string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LevelDBDatabase ¶
LevelDB Database container. This contains some fun bits (like the * leveldb.DB object, and the description the user gave us over in * NewLevelDBDatabase.
func NewLevelDBDatabase ¶
func NewLevelDBDatabase(path string, description string) (*LevelDBDatabase, error)
Create a new LevelDB Database. `path` should be the full filesystem path * to the leveldb database, and `description` should be what we tell the user * the database is when they ask about it. Something short, for `SHOW DB`.
func (*LevelDBDatabase) Define ¶
func (this *LevelDBDatabase) Define(name string, query string) []*dictd.Definition
Handle incoming `DEFINE` calls.
func (*LevelDBDatabase) Description ¶
func (this *LevelDBDatabase) Description(name string) string
Handle the short description of what this database does (for * inline `SHOW DB` output)
func (*LevelDBDatabase) Info ¶
func (this *LevelDBDatabase) Info(name string) string
Handle the information call (SHOW INFO `name`) for this database.
func (*LevelDBDatabase) Match ¶
func (this *LevelDBDatabase) Match(name string, query string, strat string) (defs []*dictd.Definition)
Handle incoming RFC2229 MATCH requests. * * Currently supported MATCH algorithms: * * [default] - Metaphone * - Prefix (byte prefixes) * - Soundex * - Levenshtein
func (*LevelDBDatabase) Strategies ¶
func (this *LevelDBDatabase) Strategies(name string) map[string]string
Get all valid Strategies
func (*LevelDBDatabase) WriteDefinition ¶
func (this *LevelDBDatabase) WriteDefinition(word string, definition string)
* Given a word `word`, defined by definition `definition`, write this out * to the LevelDB database, and generate all Indexes we need. *
type UrbanDictionaryDatabase ¶
*
func (*UrbanDictionaryDatabase) Define ¶
func (this *UrbanDictionaryDatabase) Define(name string, query string) (definitions []*dictd.Definition)
*
func (*UrbanDictionaryDatabase) Description ¶
func (this *UrbanDictionaryDatabase) Description(name string) string
*
func (*UrbanDictionaryDatabase) Info ¶
func (this *UrbanDictionaryDatabase) Info(name string) string
*
func (*UrbanDictionaryDatabase) Match ¶
func (this *UrbanDictionaryDatabase) Match(name string, query string, strat string) []*dictd.Definition
*
func (*UrbanDictionaryDatabase) Strategies ¶
func (this *UrbanDictionaryDatabase) Strategies(name string) map[string]string
*