diff options
author | Alex Auvolat <alex@adnab.me> | 2020-01-31 22:15:40 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-01-31 22:15:40 +0100 |
commit | 7962e7b26201506d38bff049d6d20c0fb81df38e (patch) | |
tree | be8a9472f743052a8314ca5621e32151c10ae000 /main.go | |
parent | e1f5c31402df97594116267b4f918582f2496ee0 (diff) | |
download | bottin-7962e7b26201506d38bff049d6d20c0fb81df38e.tar.gz bottin-7962e7b26201506d38bff049d6d20c0fb81df38e.zip |
Rebrand to Bottin (with Superboum's benediction)
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -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) } |