-
Notifications
You must be signed in to change notification settings - Fork 162
/
main.go
35 lines (28 loc) · 803 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package main
import (
log "github.com/sirupsen/logrus"
)
func Init(authOpts map[string]string, logLevel log.Level) error {
//Initialize your plugin with the necessary options
log.Infof("customPlugin initialized!")
log.Debugf("Received %d options.", len(authOpts))
return nil
}
func GetUser(username, password, clientid string) (bool, error) {
log.Debugf("Checking get user with custom plugin.")
return false, nil
}
func GetSuperuser(username string) (bool, error) {
log.Debugf("Checking get superuser with custom plugin.")
return false, nil
}
func CheckAcl(username, topic, clientid string, acc int32) (bool, error) {
log.Debugf("Checking acl with custom plugin.")
return false, nil
}
func GetName() string {
return "Custom plugin"
}
func Halt() {
//Do whatever cleanup is needed.
}