Documentation
¶
Index ¶
Constants ¶
View Source
const ( IntervalSecond = "SECOND" IntervalMinute = "MINUTE" IntervalHour = "HOUR" IntervalDay = "DAY" IntervalWeek = "WEEK" IntervalMonth = "MONTH" IntervalYear = "YEAR" IntervalSecondLabel = "秒" IntervalMinuteLabel = "分" IntervalHourLabel = "时" IntervalDayLabel = "天" IntervalWeekLabel = "周" IntervalMonthLabel = "月" IntervalYearLabel = "年" )
interval 定义
View Source
const ( DbClientGorm = "gorm" DbClientEs = "elastic" )
View Source
const ( DbTypeMysql = "mysql" DbTypePostgres = "postgres" DbTypePostgresql = "postgresql" DbTypePg = "pg" DbTypeSqlite = "sqlite" DbTypeMssql = "mssql" DbTypeOracle = "oracle" DbTypeSqlserver = "sqlserver" DbTypeTiDB = "tidb" )
关系数据库
View Source
const ( DbTypeMongo = "mongo" DbTypeRedis = "redis" )
kv数据库
View Source
const ( QueueTypeName = "消息队列" QueueTypeKafka = "kafka" // kafka消息队列 QueueTypeRabbit = "rabbit" QueueTypeRocketmq = "rocketmq" QueueTypeRabbitmq = "rabbitmq" )
消息队列
View Source
const ( QueueKafkaProducer = "kafka_producer" // kafka生产者 QueueKafkaConsumer = "kafka_consumer" // kafka消费者 )
View Source
const ( QueueRoleAsync = "async" // 异步 QueueRoleSync = "sync" // 同步 )
View Source
const ( FileTypeName = "文件" FileTypeFtp = "ftp" FileTypeSftp = "sftp" FileTypeLocal = "local" FileTypeOss = "oss" FileTypeMinio = "minio" FileTypeHdfs = "hdfs" )
文件存储
View Source
const ( ClusterEtcd = "etcd" ClusterNacos = "nacos" ClusterZookeeper = "zookeeper" )
集群类型
View Source
const ( ClientInfoHost = "host" ClientInfoUser = "user" ClientInfoPasswd = "passwd" )
View Source
const ( ExportFileTypeExcel = "excel" ExportFileTypeCsv = "csv" )
View Source
const ( ProgramLangJAVA = "java" ProgramLangPHP = "php" ProgramLangPYTHON = "python" ProgramLangGOLANG = "golang" ProgramLangLUA = "lua" )
View Source
const ( ProtocolTCP = "tcp" ProtocolUDP = "udp" )
Variables ¶
View Source
var ( ErrProtocolInvalid = errors.New("协议无效") ErrInvalidParam = errors.New("无效的参数") )
View Source
var ( Help bool // 打印显示帮助信息 Cpath string // 配置文件路径 Appath string // 当前路径 // @suppress SpellCheckingInspection Dbg bool // Debug 模式 CstSh = time.FixedZone("CST", 8*3600) // 东八区 PublicKeyByt []byte // 公钥 PrivateKeyByt []byte // 私钥 EnableParseParamsLog = true )
noinspection SpellCheckingInspection
View Source
var ( NumberRegexp = regexp.MustCompile(`^[0-9]+$`) SpecialChartPreg = regexp.MustCompile(`[\s;!@#$%^&*()\[\]\:\"\']`) WrapSplit = regexp.MustCompile("\r?\n") PhoneRegex = regexp.MustCompile(`^1(3|4|5|6|7|8|9)\d{9}`) // 手机号验证正则 EmailRegex = regexp.MustCompile(`(?i)^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$`) // 邮箱验证正则 PageCharacterSetPreg = regexp.MustCompile(`(?i)<meta[\s\S]+?charset=['"]?([\w-]+)['"][\s\S]*?>`) // 匹配页面 字符集 ALinkRegex = regexp.MustCompile(`(?i)\<(?:a|mip\-link)\s[\s\S]*?href=['"]([\s\S]*?)['"][\s\S]*?\>`) // 匹配页面 所有a标签的正则表达式 Nofollow = regexp.MustCompile(`(?i)rel=['"]nofollow['"]`) // 匹配 rel=nofollow TitleRegex = regexp.MustCompile(`(?i)\<title[\s\S]*?\>([\s\S]*?)\<\/title\>`) // 匹配页面 title的正则表达式 )
View Source
var (
ErrNotFound = errors.New(http.StatusText(http.StatusNotFound))
)
View Source
var IntervalKeyLabelMap = make(map[string]Interval)
View Source
var IntervalKeyMap = make(map[int]Interval)
View Source
var IntervalKeyValMap = make(map[string]Interval)
View Source
var IntervalLists = []Interval{ { Key: 1, Val: IntervalSecond, Label: IntervalSecondLabel, }, { Key: 60, Val: IntervalMinute, Label: IntervalMinuteLabel, }, { Key: 3600, Val: IntervalHour, Label: IntervalHourLabel, }, { Key: 86400, Val: IntervalDay, Label: IntervalDayLabel, }, { Key: 604800, Val: IntervalWeek, Label: IntervalWeekLabel, }, { Key: 2592000, Val: IntervalMonth, Label: IntervalMonthLabel, }, { Key: 31536000, Val: IntervalYear, Label: IntervalYearLabel, }, }
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.