Documentation ¶
Index ¶
Constants ¶
View Source
const ( Publish = "pub" Subscribe = "sub" )
all permit actions
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
Auth auth
func (*Auth) AuthenticateAccount ¶
func (a *Auth) AuthenticateAccount(username, password string) *Authorizer
AuthenticateAccount auth client account, then return authorizer if pass
func (*Auth) AuthenticateCert ¶
func (a *Auth) AuthenticateCert(serialNumber string) *Authorizer
AuthenticateCert auth client cert, then return authorizer if pass
type Authorizer ¶
Authorizer checks topic permission
func (*Authorizer) Authorize ¶
func (p *Authorizer) Authorize(action, topic string) bool
Authorize auth action
Click to show internal directories.
Click to hide internal directories.