Documentation ¶
Index ¶
Constants ¶
View Source
const ( AclAllow AclResult = "allow" AclDeny = "deny" AclIgnore = "ignore" )
View Source
const ( AuthAllow AuthResult = "allow" AuthDeny = "deny" AuthIgnore = "ignore" )
View Source
const ( RespCodeSuccess = 200 RespCodeNotFound = 404 )
View Source
const ( RespMsgNotFount = "not found" RespMsgIdNum = "id must be a int value" )
View Source
const ( DefaultTimeFormatter = "2006-01-02:15:04:05" DefaultCodeLen = 16 )
Variables ¶
This section is empty.
Functions ¶
func Auth ¶
func Auth(ctx iris.Context)
Auth http://host:port/mqtt/auth clientid=%c,username=%u,password=%P
func FormatTime ¶
func ResponseJSON ¶
func ResponseJSON(ctx iris.Context, j interface{})
Types ¶
type AclResp ¶
type AclResp struct {
Result AuthResult `json:"result,omitempty"`
}
type AuthResp ¶
type AuthResp struct { Result AuthResult `json:"result,omitempty"` IsSuperuser bool `json:"is_superuser,omitempty"` }
type AuthResult ¶
type AuthResult string
Click to show internal directories.
Click to hide internal directories.