Documentation ¶
Index ¶
- type BingDictionaryStruct
- func (service *BingDictionaryStruct) GetCache() (cache *CacheStruct)
- func (service *BingDictionaryStruct) GetServiceName() (value string)
- func (service *BingDictionaryStruct) Query(vocabularyAsk vocabulary4mydictionary.VocabularyAskStruct) (vocabularyAnswer vocabulary4mydictionary.VocabularyAnswerStruct)
- type CacheItemStruct
- type CacheStruct
- type IcibaCollinsStruct
- type MerriamWebsterStruct
- func (service *MerriamWebsterStruct) GetCache() (cache *CacheStruct)
- func (service *MerriamWebsterStruct) GetServiceName() (value string)
- func (service *MerriamWebsterStruct) Query(vocabularyAsk vocabulary4mydictionary.VocabularyAskStruct) (vocabularyAnswer vocabulary4mydictionary.VocabularyAnswerStruct)
- type ServiceInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BingDictionaryStruct ¶
type BingDictionaryStruct struct {
// contains filtered or unexported fields
}
BingDictionaryStruct : Bing Dictionary struct
func (*BingDictionaryStruct) GetCache ¶
func (service *BingDictionaryStruct) GetCache() (cache *CacheStruct)
GetCache : get cache
func (*BingDictionaryStruct) GetServiceName ¶
func (service *BingDictionaryStruct) GetServiceName() (value string)
GetServiceName : get service name
func (*BingDictionaryStruct) Query ¶
func (service *BingDictionaryStruct) Query(vocabularyAsk vocabulary4mydictionary.VocabularyAskStruct) (vocabularyAnswer vocabulary4mydictionary.VocabularyAnswerStruct)
Query : query vocabulary
type CacheItemStruct ¶
type CacheItemStruct struct { QueryString string `json:"queryString"` Word string `json:"word"` Definition []string `json:"definition"` Status string `json:"status"` CreationTime int64 `json:"creationTime"` }
CacheItemStruct : item struct
type CacheStruct ¶
type CacheStruct struct { Content []CacheItemStruct `json:"content"` // contains filtered or unexported fields }
CacheStruct : cache struct
func (*CacheStruct) Add ¶
func (cache *CacheStruct) Add(item CacheItemStruct)
Add : add item to cache
func (*CacheStruct) Query ¶
func (cache *CacheStruct) Query(queryString string) (item CacheItemStruct, err error)
Query : query item in cache
func (*CacheStruct) Read ¶
func (cache *CacheStruct) Read(path string, shelfLifeDay int64) (err error)
Read : read cache
func (*CacheStruct) Write ¶
func (cache *CacheStruct) Write() (information string, err error)
Write : write cache
type IcibaCollinsStruct ¶
type IcibaCollinsStruct struct {
// contains filtered or unexported fields
}
IcibaCollinsStruct : iCIBA Collins struct
func (*IcibaCollinsStruct) GetCache ¶
func (service *IcibaCollinsStruct) GetCache() (cache *CacheStruct)
GetCache : get cache
func (*IcibaCollinsStruct) GetServiceName ¶
func (service *IcibaCollinsStruct) GetServiceName() (value string)
GetServiceName : get service name
func (*IcibaCollinsStruct) Query ¶
func (service *IcibaCollinsStruct) Query(vocabularyAsk vocabulary4mydictionary.VocabularyAskStruct) (vocabularyAnswer vocabulary4mydictionary.VocabularyAnswerStruct)
Query : query vocabulary
type MerriamWebsterStruct ¶
type MerriamWebsterStruct struct {
// contains filtered or unexported fields
}
MerriamWebsterStruct : Merriam Webster struct
func (*MerriamWebsterStruct) GetCache ¶
func (service *MerriamWebsterStruct) GetCache() (cache *CacheStruct)
GetCache : get cache
func (*MerriamWebsterStruct) GetServiceName ¶
func (service *MerriamWebsterStruct) GetServiceName() (value string)
GetServiceName : get service name
func (*MerriamWebsterStruct) Query ¶
func (service *MerriamWebsterStruct) Query(vocabularyAsk vocabulary4mydictionary.VocabularyAskStruct) (vocabularyAnswer vocabulary4mydictionary.VocabularyAnswerStruct)
Query : query vocabulary
type ServiceInterface ¶
type ServiceInterface interface { GetServiceName() string GetCache() *CacheStruct Query(vocabulary4mydictionary.VocabularyAskStruct) vocabulary4mydictionary.VocabularyAnswerStruct }
ServiceInterface : service interface
Click to show internal directories.
Click to hide internal directories.