Documentation ¶
Index ¶
Constants ¶
View Source
const ( StorageChannelCapacity = 100 StorageConcurrencyRoutineCount = 20 )
View Source
const ( VerifyUrl = "http://www.baidu.com" TIME_OUT = 5 TITLE = "百度一下,你就知道" )
Validator
View Source
const (
GetLimit = 20
)
model
View Source
const (
UserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
)
common
Variables ¶
View Source
var ( ErrModelLimitInvalid = errors.New("limit Invalid") ErrStorageNotSupport = errors.New("Storage Type Not Support") ErrMysqlHandlerNotInit = errors.New("Mysql Handler Not Init") ErrConfigHandlerNotInit = errors.New("Config Handler Not Init") ErrParserNotSupport = errors.New("The Parser Not Support") ErrRedisHandlerNotInit = errors.New("Redis Handler Not Init") ErrBeginPageNumLessThanOne = errors.New("BeginPageNum Shouldn't Less Than One") ErrEndPageNumLessThanZero = errors.New("EndPageNum Shouldn't Less Than Zero") )
Functions ¶
func GetConfigHandler ¶
func GetConfigHandler() *config
func InitConfig ¶
func InitConfig(path string)
Types ¶
type Duration ¶
Duration 配置中使用的时长
func (*Duration) UnmarshalText ¶
UnmarshalText 将字符串形式的时长信息转换为Duration类型
type MysqlConfig ¶
Click to show internal directories.
Click to hide internal directories.