project

package
v0.0.0-...-3faa710 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2020 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package project project User: 姜伟 Time: 2020-02-26 14:48:04

Index

Constants

View Source
const (

	// HTTPHeadKeyCookie 请求头名称-cookie
	HTTPHeadKeyCookie = "Set-Cookie"
	// HTTPHeadKeyContentType 请求头名称-内容类型
	HTTPHeadKeyContentType = "Content-Type"
	// HTTPHeadKeyContentLength 请求头名称-内容长度
	HTTPHeadKeyContentLength = "Content-Length"
	// HTTPContentTypeForm http内容类型-表单
	HTTPContentTypeForm = "application/x-www-form-urlencoded; charset=utf-8"
	// HTTPContentTypeJSON http内容类型-json
	HTTPContentTypeJSON = "application/json; charset=utf-8"
	// HTTPContentTypeXML http内容类型-xml
	HTTPContentTypeXML = "application/xml; charset=utf-8"
	// HTTPContentTypeHTML http内容类型-html
	HTTPContentTypeHTML = "text/html; charset=utf-8"
	// HTTPContentTypeText http内容类型-text
	HTTPContentTypeText = "text/plain; charset=utf-8"

	// RegexWxOpenid 微信openid
	RegexWxOpenid = `^[0-9a-zA-Z\-_]{28}$`
	// RegexPhone 手机号码
	RegexPhone = `^1[0-9]{10}$`
	// RegexDigit 数字
	RegexDigit = `^[0-9]+$`
	// RegexAlpha 字母
	RegexAlpha = `^[a-zA-Z]+$`
	// RegexDigitAlpha 数字和字母
	RegexDigitAlpha = `^[0-9a-zA-Z]+$`
	// RegexDigitLower 数字和小写字母
	RegexDigitLower = `^[0-9a-z]+$`
	// RegexDigitUpper 数字和大写字母
	RegexDigitUpper = `^[0-9A-Z]+$`
	// RegexIP ip
	RegexIP = `^(\.(\d|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])){4}$`
	// RegexEmail 邮箱
	RegexEmail = `^\w+([-+.]\w+)*\@\w+([-.]\w+)*\.\w+([-.]\w+)*$`
	// RegexURLHTTP http链接
	RegexURLHTTP = `^(http|https)://\S+$`

	// DataPrefixXML 前缀-xml
	DataPrefixXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
	// DataParamKeyReqID 参数键名-请求ID
	DataParamKeyReqID = "_mp_req_id"
	// DataParamKeyReqURL 参数键名-请求url
	DataParamKeyReqURL = "_mp_req_url"
	// DataParamKeyRespData 参数键名-响应数据
	DataParamKeyRespData = "_mp_resp_data"
	// DataParamKeyRespType 参数键名-响应类型
	DataParamKeyRespType = "_mp_resp_type"

	// RedisPrefixCommonUniqueID 公用-唯一ID
	RedisPrefixCommonUniqueID = "common_unique_id"
	// RedisPrefixWxAccount 微信-公众号
	RedisPrefixWxAccount = "wx_account"
	// RedisPrefixWxOpenAccount 微信开放平台-账号
	RedisPrefixWxOpenAccount = "wx_open_account"
	// RedisPrefixWxOpenAuthorize 微信开放平台-授权公众号
	RedisPrefixWxOpenAuthorize = "wx_open_authorize"
	// RedisPrefixWxOpenAuthorizeCodeSecret 微信开放平台-授权小程序代码保护密钥
	RedisPrefixWxOpenAuthorizeCodeSecret = "wx_open_authorize_code_secret"
	// RedisPrefixWxCorp 企业微信-账号
	RedisPrefixWxCorp = "wx_corp"
	// RedisPrefixWxProviderAccount 企业微信服务商-账号
	RedisPrefixWxProviderAccount = "wx_provider_account"
	// RedisPrefixWxProviderSuite 企业微信服务商-套件
	RedisPrefixWxProviderSuite = "wx_provider_suite"
	// RedisPrefixWxProviderAuthorize 企业微信服务商-授权企业
	RedisPrefixWxProviderAuthorize = "wx_provider_authorize"
	// RedisPrefixAliPayAccount 支付宝-商户号
	RedisPrefixAliPayAccount = "alipay_account"
	// RedisPrefixDingTalkCorp 钉钉-企业
	RedisPrefixDingTalkCorp = "dingtalk_corp"
	// RedisPrefixDingTalkProviderAccount 钉钉服务商-账号
	RedisPrefixDingTalkProviderAccount = "dingtalk_provider_account"
	// RedisPrefixDingTalkProviderSuite 钉钉服务商-套件
	RedisPrefixDingTalkProviderSuite = "dingtalk_provider_suite"
	// RedisPrefixDingTalkProviderAuthorize 钉钉服务商-授权企业
	RedisPrefixDingTalkProviderAuthorize = "dingtalk_provider_authorize"
	// RedisPrefixJpushUIDPush 极光推送唯一标识符-推送
	RedisPrefixJpushUIDPush = "jpush_uid_push"
	// RedisPrefixJpushUIDSchedule 极光推送唯一标识符-定时任务
	RedisPrefixJpushUIDSchedule = "jpush_uid_schedule"
	// RedisPrefixPrintFeiYinAccount 飞印打印-账号
	RedisPrefixPrintFeiYinAccount = "print_feiyin_account"
	// RedisPrefixMQRedis 消息队列-Redis
	RedisPrefixMQRedis = "mq_redis"

	// LocalPrefixFuse 熔断器
	LocalPrefixFuse = "0000"

	// WxOpenAuthorizeStatusCancel 授权公众号状态-取消授权
	WxOpenAuthorizeStatusCancel = 0
	// WxOpenAuthorizeStatusAllow 授权公众号状态-允许授权
	WxOpenAuthorizeStatusAllow = 1
	// WxOpenAuthorizeOperateAuthorized 授权公众号操作类型-允许授权
	WxOpenAuthorizeOperateAuthorized = 1
	// WxOpenAuthorizeOperateUnauthorized 授权公众号操作类型-取消授权
	WxOpenAuthorizeOperateUnauthorized = 2
	// WxOpenAuthorizeOperateAuthorizedRefresh 授权公众号操作类型-更新授权
	WxOpenAuthorizeOperateAuthorizedRefresh = 3

	// WxProviderAuthorizeStatusCancel 企业微信状态-取消授权
	WxProviderAuthorizeStatusCancel = 0
	// WxProviderAuthorizeStatusAllow 企业微信状态-允许授权
	WxProviderAuthorizeStatusAllow = 1
	// WxProviderAuthorizeOperateAuthCreate 企业微信操作类型-成功授权
	WxProviderAuthorizeOperateAuthCreate = 1
	// WxProviderAuthorizeOperateAuthCancel 企业微信操作类型-取消授权
	WxProviderAuthorizeOperateAuthCancel = 2
	// WxProviderAuthorizeOperateAuthRefresh 企业微信操作类型-更新授权
	WxProviderAuthorizeOperateAuthRefresh = 3

	// WxConfigStatusInvalid 状态-无效
	WxConfigStatusInvalid = 0
	// WxConfigStatusValid 状态-有效
	WxConfigStatusValid = 0
	// WxConfigAuthorizeStatusEmpty 第三方授权状态-不存在
	WxConfigAuthorizeStatusEmpty = -1
	// WxConfigAuthorizeStatusNo 第三方授权状态-未授权
	WxConfigAuthorizeStatusNo = 0
	// WxConfigAuthorizeStatusYes 第三方授权状态-已授权
	WxConfigAuthorizeStatusYes = 1
	// WxConfigCorpStatusInvalid 企业微信状态-无效
	WxConfigCorpStatusInvalid = 0
	// WxConfigCorpStatusValid 企业微信状态-有效
	WxConfigCorpStatusValid = 1
	// WxConfigDefaultClientIP 默认客户端IP
	WxConfigDefaultClientIP = "127.0.0.1"

	// AliPayStatusInvalid 状态-无效
	AliPayStatusInvalid = 0
	// AliPayStatusValid  状态-有效
	AliPayStatusValid = 1

	// DingTalkConfigCorpStatusInvalid 企业钉钉状态-无效
	DingTalkConfigCorpStatusInvalid = 0
	// DingTalkConfigCorpStatusValid 企业钉钉状态-有效
	DingTalkConfigCorpStatusValid = 1
)

Variables

This section is empty.

Functions

func DefaultLimit

func DefaultLimit() uint

DefaultLimit 默认每页条数

func DefaultPage

func DefaultPage() uint

DefaultPage 默认页数

func LoadProject

func LoadProject(conf *viper.Viper)

LoadProject 加载配置

func RedisPrefix

func RedisPrefix(key string) string

RedisPrefix redis前缀

func TimeClearLocalAliPayAccount

func TimeClearLocalAliPayAccount() int64

TimeClearLocalAliPayAccount 清理本地支付宝帐号配置时间

func TimeClearLocalDingTalkCorp

func TimeClearLocalDingTalkCorp() int64

TimeClearLocalDingTalkCorp 清理本地钉钉企业号配置时间

func TimeClearLocalJPushApp

func TimeClearLocalJPushApp() int64

TimeClearLocalJPushApp 清理本地极光推送app配置时间

func TimeClearLocalJPushGroup

func TimeClearLocalJPushGroup() int64

TimeClearLocalJPushGroup 清理本地极光推送分组配置时间

func TimeClearLocalWxAccount

func TimeClearLocalWxAccount() int64

TimeClearLocalWxAccount 清理本地微信帐号配置时间

func TimeClearLocalWxCorp

func TimeClearLocalWxCorp() int64

TimeClearLocalWxCorp 清理本地微信企业号配置时间

Types

This section is empty.

Jump to

Keyboard shortcuts

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