Documentation ¶
Index ¶
- Constants
- func Contains(obj interface{}, target interface{}) bool
- func CurrentTimeMillis() int64
- func GenerateCode(size int) string
- func GetGID() uint64
- func GetStringParamsMapFromUrl(paramsStr string) map[string]string
- func GetValidDate(validTime time.Duration) time.Time
- func IsIdNoCorrect(idNo string) bool
- func LocalIP() string
- func Marshal(obj interface{}) ([]byte, error)
- func MarshalToString(obj interface{}) (string, error)
- func Mask(str string, before int, after int) string
- func NewOptions(config cc.IConfig, opts interface{})
- func ReadFile(localFile string) ([]byte, error)
- func SubStr(str string, start int, length int) (result string)
- func Unmarshal(bytes []byte, obj interface{}) error
- func UnmarshalFromString(str string, obj interface{}) error
- func Uuid() string
- func VerifyEmailFormat(email string) bool
- type DateTime
- type Error
- type Worker
Constants ¶
View Source
const ( TimeFormat = "2006-01-02 15:04:05" TimeFormatZero = "0001-01-01 00:00:00" )
View Source
const ( REGX_ID_PATTERN_15 = "^[1-9]\\d{7}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}$" REGX_ID_PATTERN_18 = "^[1-9]\\d{5}[1-9]\\d{3}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}([0-9]|X)$" )
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains(obj interface{}, target interface{}) bool
判断obj是否在target中,target支持的类型arrary,slice,map
func CurrentTimeMillis ¶
func CurrentTimeMillis() int64
func GenerateCode ¶
func IsIdNoCorrect ¶
func MarshalToString ¶
func NewOptions ¶
func UnmarshalFromString ¶
func VerifyEmailFormat ¶
Types ¶
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
定义一个woker工作节点所需要的基本参数
func NewWorkerWithRedis ¶
func NewWorkerWithRedis(r *redis.RedisClient, appName string) (*Worker, error)
func (*Worker) GetIdWithPrefix ¶
Click to show internal directories.
Click to hide internal directories.