Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTokenTimeout = errors.New("mqtt token timeout") Inc = &Emq{} )
View Source
var (
API = &AuthAPI{}
)
Functions ¶
func DailWithOption ¶
func DailWithOption(opt DialOptions) (c mqtt.Client, err error)
func SetGlobalMqttTopicOption ¶
func SetGlobalMqttTopicOption(opt *MqttTopicOption)
Types ¶
type AuthAPI ¶
type AuthAPI struct { AuthFunc MqttFunc AclFunc MqttFunc IsSuperFunc func(*AuthRequest) bool }
func (*AuthAPI) ACL ¶
func (a *AuthAPI) ACL(c iris.Context, d *AuthRequest) (result *AuthResult, err error)
ACL ...
func (*AuthAPI) Auth ¶
func (a *AuthAPI) Auth(c iris.Context, d *AuthRequest) (result *AuthResult, err error)
Auth ...
type AuthRequest ¶
type AuthRequest struct { Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` ClientId string `json:"clientid,omitempty"` PeerHost string `json:"peerhost,omitempty"` ProtoName string `json:"proto_name,omitempty"` MountPoint string `json:"mountpoint,omitempty"` Action string `json:"action,omitempty"` Topic string `json:"topic,omitempty"` Qos string `json:"qos,omitempty"` Retain string `json:"retain,omitempty"` }
func (*AuthRequest) IsSuperuser ¶
func (a *AuthRequest) IsSuperuser() bool
func (*AuthRequest) Reset ¶
func (a *AuthRequest) Reset()
Reset Empty struct to be used in PoolAuthRequest
type AuthResult ¶
type DialOptions ¶
type Emq ¶
type Emq struct {
// contains filtered or unexported fields
}
Emq ...
type MqttFunc ¶
type MqttFunc func(c iris.Context, d *AuthRequest) (result *AuthResult, err error)
Click to show internal directories.
Click to hide internal directories.