Documentation ¶
Index ¶
Constants ¶
View Source
const ( TopicAlwaysVerifyType = "topicAlwaysVerify" TopicNumAuthType = "topicNumAuth" TopicSetAuthType = "topicSetAuth" )
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(name string, provider Authenticator)
func UnRegister ¶
func UnRegister(name string)
Types ¶
type Authenticator ¶
type Authenticator interface { CheckPub(clientInfo *ClientInfo, topic string) bool CheckSub(clientInfo *ClientInfo, topic string) bool ProcessUnSub(clientInfo *ClientInfo, topic string) SetAuthFunc(f GetAuthFunc) }
sdk-lang=python3.6|sdk-version=3.0.0.96|sdk-arch=64|sdk-os=win-amd64
type ClientInfo ¶
type GetAuthFunc ¶
type GetAuthFunc func(clientInfo *ClientInfo, topic string) interface{}
type TopicAclManger ¶
type TopicAclManger struct {
// contains filtered or unexported fields
}
func NewTopicAclManger ¶
func NewTopicAclManger(providerName string, f GetAuthFunc) (*TopicAclManger, error)
func (*TopicAclManger) CheckPub ¶
func (this *TopicAclManger) CheckPub(clientInfo *ClientInfo, topic string) bool
func (*TopicAclManger) CheckSub ¶
func (this *TopicAclManger) CheckSub(clientInfo *ClientInfo, topic string) bool
func (*TopicAclManger) ProcessUnSub ¶
func (this *TopicAclManger) ProcessUnSub(clientInfo *ClientInfo, topic string)
func (*TopicAclManger) SetAuthFunc ¶
func (this *TopicAclManger) SetAuthFunc(f GetAuthFunc)
Click to show internal directories.
Click to hide internal directories.