gitee.com/h79/goutils@v1.22.10/common/server/const.go (about)

     1  package server
     2  
     3  type (
     4  	// AuthType 认证 1=用户名, 2=手机 3=邮箱 4=微信 5=微博 6=QQ 7=小程序
     5  	AuthType int8
     6  
     7  	//AuthMethod 认证方法
     8  	AuthMethod int8
     9  
    10  	//AuthStatus 认证状态
    11  	AuthStatus int8
    12  
    13  	//ValidatingType 验证类型
    14  	ValidatingType int32
    15  )
    16  
    17  const (
    18  	AtDefault = AuthType(0)
    19  	AtName    = AuthType(1)  //用户名
    20  	AtPhone   = AuthType(2)  //手机
    21  	AtEmail   = AuthType(3)  //邮箱
    22  	AtWeiXin  = AuthType(4)  //微信(第三方)
    23  	AtWeibo   = AuthType(5)  //微博(第三方)
    24  	AtQq      = AuthType(6)  //QQ (第三方)
    25  	AtWxMini  = AuthType(7)  //微信小程序(第三方)
    26  	ATWxSer   = AuthType(8)  //微信服务号(第三方)
    27  	AtToday   = AuthType(9)  //今日头条(第三方)
    28  	AtBaidu   = AuthType(10) //百度(第三方)
    29  	AtToken   = AuthType(99) //业务TOKEN验证
    30  	AtVisitor = AuthType(100)
    31  	AtInner   = AuthType(101)
    32  	AtEnd     = AuthType(102)
    33  )
    34  
    35  func (a AuthType) Int() int8 {
    36  	return int8(a)
    37  }
    38  
    39  const (
    40  	AsDefault    = AuthStatus(0) //0=未激活 1=正在.. 2=已激活 3=删除
    41  	AsActivating = AuthStatus(1)
    42  	AsActivated  = AuthStatus(2)
    43  	AsDeleted    = AuthStatus(3)
    44  )
    45  
    46  func (a AuthStatus) Int() int8 {
    47  	return int8(a)
    48  }
    49  
    50  const (
    51  	AmDefault = AuthMethod(0)
    52  	AmPass    = AuthMethod(1) //密码
    53  	AmSms     = AuthMethod(2) //短信
    54  	AmEnd     = AuthMethod(3)
    55  )
    56  
    57  func (a AuthMethod) Int() int8 {
    58  	return int8(a)
    59  }
    60  
    61  const (
    62  	VtDefault   = ValidatingType(0)
    63  	VtRegSms    = ValidatingType(1) //注册短信
    64  	VtLogSms    = ValidatingType(2) //登录短信
    65  	VtRegInvite = ValidatingType(3) //注册邀请
    66  	VtActEmail  = ValidatingType(4)
    67  	VtEnd       = ValidatingType(255)
    68  )
    69  
    70  func (a ValidatingType) Int() int32 {
    71  	return int32(a)
    72  }
    73  
    74  const (
    75  	PlatPc     = "pc"
    76  	PlatMac    = "mac"
    77  	PlatIPhone = "iphone"
    78  	PlatIPad   = "ipad"
    79  	PlatAPhone = "aphone"
    80  	PlatAPad   = "apad"
    81  	PlatTv     = "tv"
    82  )