Versions in this module Expand all Collapse all v0 v0.0.1 Sep 9, 2024 Changes in this version + func MatchTopic(filter string, topic string) (elements []string, matched bool) + type ACLRule struct + Client RString + Filters Filters + Remote RString + Username RString + type ACLRules []ACLRule + type Access byte + const Deny + const ReadOnly + const ReadWrite + const WriteOnly + type AllowHook struct + func (h *AllowHook) ID() string + func (h *AllowHook) OnACLCheck(cl *mqtt.Client, topic string, write bool) bool + func (h *AllowHook) OnConnectAuthenticate(cl *mqtt.Client, pk packets.Packet) bool + func (h *AllowHook) Provides(b byte) bool + type AuthRule struct + Allow bool + Client RString + Password RString + Remote RString + Username RString + type AuthRules []AuthRule + type Filters map[RString]Access + type Hook struct + func (h *Hook) ID() string + func (h *Hook) Init(config any) error + func (h *Hook) OnACLCheck(cl *mqtt.Client, topic string, write bool) bool + func (h *Hook) OnConnectAuthenticate(cl *mqtt.Client, pk packets.Packet) bool + func (h *Hook) Provides(b byte) bool + type Ledger struct + ACL ACLRules + Auth AuthRules + Users Users + func (l *Ledger) ACLOk(cl *mqtt.Client, topic string, write bool) (n int, ok bool) + func (l *Ledger) AuthOk(cl *mqtt.Client, pk packets.Packet) (n int, ok bool) + func (l *Ledger) ToJSON() (data []byte, err error) + func (l *Ledger) ToYAML() (data []byte, err error) + func (l *Ledger) Unmarshal(data []byte) error + func (l *Ledger) Update(ln *Ledger) + type Options struct + Data []byte + Ledger *Ledger + type RString string + func (r RString) FilterMatches(a string) bool + func (r RString) Matches(a string) bool + type UserRule struct + ACL Filters + Disallow bool + Password RString + Username RString + type Users map[string]UserRule