aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go26
1 files changed, 13 insertions, 13 deletions
diff --git a/main.go b/main.go
index 174bde6..05a2a19 100644
--- a/main.go
+++ b/main.go
@@ -140,13 +140,13 @@ func main() {
}
kv := consul_client.KV()
- // Create gobottin server
- gobottin := Server{
- logger: log.New(os.Stdout, "[gobottin] ", log.LstdFlags),
+ // Create bottin server
+ bottin := Server{
+ logger: log.New(os.Stdout, "[bottin] ", log.LstdFlags),
config: config,
kv: kv,
}
- err = gobottin.init()
+ err = bottin.init()
if err != nil {
panic(err)
}
@@ -154,15 +154,15 @@ func main() {
// Create routes
routes := ldap.NewRouteMux()
- routes.Bind(gobottin.handleBind)
- routes.Search(gobottin.handleSearch)
- routes.Add(gobottin.handleAdd)
- routes.Compare(gobottin.handleCompare)
- routes.Delete(gobottin.handleDelete)
- routes.Modify(gobottin.handleModify)
+ routes.Bind(bottin.handleBind)
+ routes.Search(bottin.handleSearch)
+ routes.Add(bottin.handleAdd)
+ routes.Compare(bottin.handleCompare)
+ routes.Delete(bottin.handleDelete)
+ routes.Modify(bottin.handleModify)
if config.TLSConfig != nil {
- routes.Extended(gobottin.handleStartTLS).
+ routes.Extended(bottin.handleStartTLS).
RequestName(ldap.NoticeOfStartTLS).Label("StartTLS")
}
@@ -173,7 +173,7 @@ func main() {
if config.Bind != "" {
ldapServer = ldap.NewServer()
ldapServer.Handle(routes)
- ldapServer.NewUserState = gobottin.newUserState
+ ldapServer.NewUserState = bottin.newUserState
go func() {
err := ldapServer.ListenAndServe(config.Bind)
if err != nil {
@@ -187,7 +187,7 @@ func main() {
if config.TLSConfig != nil {
ldapServerSecure := ldap.NewServer()
ldapServerSecure.Handle(routes)
- ldapServerSecure.NewUserState = gobottin.newUserState
+ ldapServerSecure.NewUserState = bottin.newUserState
secureConn := func(s *ldap.Server) {
s.Listener = tls.NewListener(s.Listener, config.TLSConfig)
}