Documentation ¶
Index ¶
- Constants
- type Address
- func (s Address) Adjust() Address
- func (s Address) Clone() Address
- func (s Address) HasDomain() bool
- func (s Address) HasIP() bool
- func (s Address) HasPort() bool
- func (s Address) HasScheme() bool
- func (s Address) IsEqual(addr Address) bool
- func (s Address) IsHttp() bool
- func (s Address) IsScheme(scheme string) bool
- func (s Address) IsSelf(addr string) bool
- func (s Address) IsWs() bool
- func (s Address) SetHost(host string)
- func (s Address) To() string
- type Addresses
- type AuthMethod
- type AuthStatus
- type AuthType
- type Domain
- type Health
- type Server
- type ValidatingType
Constants ¶
View Source
const ( AtDefault = AuthType(0) AtName = AuthType(1) //用户名 AtPhone = AuthType(2) //手机 AtEmail = AuthType(3) //邮箱 AtWeiXin = AuthType(4) //微信(第三方) AtWeibo = AuthType(5) //微博(第三方) AtQq = AuthType(6) //QQ (第三方) AtWxMini = AuthType(7) //微信小程序(第三方) ATWxSer = AuthType(8) //微信服务号(第三方) AtToday = AuthType(9) //今日头条(第三方) AtBaidu = AuthType(10) //百度(第三方) AtToken = AuthType(99) //业务TOKEN验证 AtVisitor = AuthType(100) AtInner = AuthType(101) AtEnd = AuthType(102) )
View Source
const ( AsDefault = AuthStatus(0) //0=未激活 1=正在.. 2=已激活 3=删除 AsActivating = AuthStatus(1) AsActivated = AuthStatus(2) AsDeleted = AuthStatus(3) )
View Source
const ( AmDefault = AuthMethod(0) AmPass = AuthMethod(1) //密码 AmSms = AuthMethod(2) //短信 AmEnd = AuthMethod(3) )
View Source
const ( VtDefault = ValidatingType(0) VtRegSms = ValidatingType(1) //注册短信 VtLogSms = ValidatingType(2) //登录短信 VtRegInvite = ValidatingType(3) //注册邀请 VtActEmail = ValidatingType(4) VtEnd = ValidatingType(255) )
View Source
const ( PlatPc = "pc" PlatMac = "mac" PlatIPhone = "iphone" PlatIPad = "ipad" PlatAPhone = "aphone" PlatAPad = "apad" PlatTv = "tv" )
View Source
const ( GHealthTtl = 10 KGRpcProtocol = "grpc" KHttpProtocol = "http" KTCPProtocol = "tcp" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶ added in v0.1.2
type Address struct { Scheme string `json:"scheme" yaml:"scheme" xml:"scheme"` Host string `json:"host" yaml:"host" xml:"host"` Port int `json:"port" yaml:"port" xml:"port"` Path string `json:"path,omitempty" yaml:"path,omitempty" xml:"path,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty" xml:"name,omitempty"` Weight int `json:"weight,omitempty" yaml:"weight,omitempty" xml:"weight,omitempty"` Timeout int `json:"timeout,omitempty" yaml:"timeout,omitempty" xml:"timeout,omitempty"` }
func ParseWithSeparate ¶ added in v0.1.2
ParseWithSeparate info = name|scheme://host:post|timeout|weight
type Addresses ¶ added in v1.1.9
type Addresses []Address
type AuthMethod ¶
type AuthMethod int8
AuthMethod 认证方法
func (AuthMethod) Int ¶
func (a AuthMethod) Int() int8
type AuthStatus ¶
type AuthStatus int8
AuthStatus 认证状态
func (AuthStatus) Int ¶
func (a AuthStatus) Int() int8
type Domain ¶ added in v0.1.2
type Health ¶ added in v1.0.4
type Health struct { URL Address `json:"url"` Method string `json:"method"` Protocol string `json:"protocol"` Ttl bool `json:"ttl"` Interval time.Duration `json:"interval"` //(second) SuccessStatus int `json:"successStatus"` }
func ReadHealth ¶ added in v1.0.4
type ValidatingType ¶
type ValidatingType int32
ValidatingType 验证类型
func (ValidatingType) Int ¶
func (a ValidatingType) Int() int32
Click to show internal directories.
Click to hide internal directories.