owl

package
v3.11.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2017 License: Apache-2.0, Apache-2.0 Imports: 9 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KeyByDbUuid

func KeyByDbUuid(dbUuid db.DbUuid) string

func KeyByUuid

func KeyByUuid(uuid uuid.UUID) string

Types

type CityService

type CityService struct {
	// contains filtered or unexported fields
}

func NewCityService

func NewCityService(cacheConfig cache.DataCacheConfig) *CityService

func (*CityService) GetCity2ById

func (s *CityService) GetCity2ById(cityId int16) *owlModel.City2

Loads city by id(or from cache)

The id, which cannot be found, would not be put into cache.

func (*CityService) GetCity2sByIds

func (s *CityService) GetCity2sByIds(cityIds ...int16) []*owlModel.City2

func (*CityService) GetCity2sByName

func (s *CityService) GetCity2sByName(name string) []*owlModel.City2

Loads city by name(or from cache)

The name, which cannot find any data, would not be put into cache.

type GroupTagService

type GroupTagService struct {
	// contains filtered or unexported fields
}

func NewGroupTagService

func NewGroupTagService(cacheConfig cache.DataCacheConfig) *GroupTagService

func (*GroupTagService) GetGroupTagById

func (s *GroupTagService) GetGroupTagById(groupTagId int32) *owlModel.GroupTag

func (*GroupTagService) GetGroupTagsByIds

func (s *GroupTagService) GetGroupTagsByIds(groupTagIds ...int32) []*owlModel.GroupTag

type IspService

type IspService struct {
	// contains filtered or unexported fields
}

func NewIspService

func NewIspService(cacheConfig cache.DataCacheConfig) *IspService

func (*IspService) GetIspById

func (s *IspService) GetIspById(ispId int16) *owlModel.Isp

Loads isp by id(or from cache)

The id, which cannot be found, would not be put into cache.

func (*IspService) GetIspsByIds

func (s *IspService) GetIspsByIds(ids ...int16) []*owlModel.Isp

func (*IspService) GetIspsByName

func (s *IspService) GetIspsByName(name string) []*owlModel.Isp

Loads isp by name(or from cache)

The name, which cannot find any data, would not be put into cache.

type NameTagService

type NameTagService struct {
	// contains filtered or unexported fields
}

func NewNameTagService

func NewNameTagService(cacheConfig cache.DataCacheConfig) *NameTagService

func (*NameTagService) GetNameTagById

func (s *NameTagService) GetNameTagById(nameTagId int16) *owlModel.NameTag

func (*NameTagService) GetNameTagsByIds

func (s *NameTagService) GetNameTagsByIds(nameTagIds ...int16) []*owlModel.NameTag

type ProvinceService

type ProvinceService struct {
	// contains filtered or unexported fields
}

func NewProvinceService

func NewProvinceService(cacheConfig cache.DataCacheConfig) *ProvinceService

func (*ProvinceService) GetProvinceById

func (s *ProvinceService) GetProvinceById(provinceId int16) *owlModel.Province

Loads province by id(or from cache)

The id, which cannot be found, would not be put into cache.

func (*ProvinceService) GetProvincesByIds

func (s *ProvinceService) GetProvincesByIds(provinceIds ...int16) []*owlModel.Province

func (*ProvinceService) GetProvincesByName

func (s *ProvinceService) GetProvincesByName(name string) []*owlModel.Province

Loads province by name(or from cache)

The name, which cannot find any data, would not be put into cache.

type QueryService

type QueryService struct {
	// contains filtered or unexported fields
}

func NewQueryService

func NewQueryService(config QueryServiceConfig) *QueryService

The max size of cache and size of bucket

<= 100 - 2
<= 1000 - 4
<= 5000 - 8
> 10000 - 16

The prune size is size of cache / 8

func (*QueryService) CreateOrLoadQuery

func (s *QueryService) CreateOrLoadQuery(query *model.Query)

Loads object of query or creating one

func (*QueryService) LoadQueryByUuid

func (s *QueryService) LoadQueryByUuid(uuid uuid.UUID) *model.Query

type QueryServiceConfig

type QueryServiceConfig struct {
	Name          string
	CacheSize     int64
	CacheDuration time.Duration
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL