Documentation ¶
Index ¶
- func NewByDirItem(dirItem *model.DirItem) (*model.DictionaryItem, error)
- type DictService
- func (ds *DictService) BuildIndexById(dictId string) error
- func (ds *DictService) Dicts() []*model.PlainDictionaryItem
- func (ds *DictService) FindFromDir(dictId string, key string) ([]byte, error)
- func (ds *DictService) GetDictById(id string) *model.DictionaryItem
- func (ds *DictService) GetDictPlain(id string) (*model.PlainDictionaryItem, bool)
- func (ds *DictService) Locate(dictid string, idx *model.KeyQueryIndex) (string, error)
- func (ds *DictService) Lookup(dictId string, keyword string) ([]byte, error)
- func (ds *DictService) LookupResource(dictId string, keyword string) ([]byte, error)
- func (ds *DictService) Search(dictId string, keyword string) ([]*model.KeyQueryIndex, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewByDirItem ¶
func NewByDirItem(dirItem *model.DirItem) (*model.DictionaryItem, error)
Types ¶
type DictService ¶
type DictService struct {
// contains filtered or unexported fields
}
func NewDictService ¶
func NewDictService(config *config.Config) (*DictService, error)
func (*DictService) BuildIndexById ¶
func (ds *DictService) BuildIndexById(dictId string) error
func (*DictService) Dicts ¶
func (ds *DictService) Dicts() []*model.PlainDictionaryItem
func (*DictService) FindFromDir ¶
func (ds *DictService) FindFromDir(dictId string, key string) ([]byte, error)
func (*DictService) GetDictById ¶
func (ds *DictService) GetDictById(id string) *model.DictionaryItem
func (*DictService) GetDictPlain ¶
func (ds *DictService) GetDictPlain(id string) (*model.PlainDictionaryItem, bool)
func (*DictService) Locate ¶
func (ds *DictService) Locate(dictid string, idx *model.KeyQueryIndex) (string, error)
func (*DictService) Lookup ¶
func (ds *DictService) Lookup(dictId string, keyword string) ([]byte, error)
func (*DictService) LookupResource ¶
func (ds *DictService) LookupResource(dictId string, keyword string) ([]byte, error)
func (*DictService) Search ¶
func (ds *DictService) Search(dictId string, keyword string) ([]*model.KeyQueryIndex, error)
Click to show internal directories.
Click to hide internal directories.