Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { Lookup(word string) ([]Definition, error) Contains(word string) (bool, error) Save(word string, defs []Definition) error }
type CachedDefiner ¶
type CachedDefiner struct {
// contains filtered or unexported fields
}
func NewCachedDefiner ¶
func NewCachedDefiner(c Cache, d Definer) *CachedDefiner
func (*CachedDefiner) Define ¶
func (d *CachedDefiner) Define(word string) ([]Definition, error)
type Definer ¶
type Definer interface {
Define(word string) ([]Definition, error)
}
type Definition ¶
Definition is a single dictionary entry for a word
type FileCache ¶
type FileCache struct {
// contains filtered or unexported fields
}
func NewFileCache ¶
NewFileCache returns a new file-based dictionary cache. A default is supplied if no dir is passed
type WebAPI ¶
type WebAPI struct {
// contains filtered or unexported fields
}
WebAPI lets you interact with a dictionary API
func NewDefaultWebAPI ¶
func NewDefaultWebAPI() WebAPI
NewDefaultWebAPI creates a new instance for connecting to a dictionary API
Click to show internal directories.
Click to hide internal directories.