From 7962e7b26201506d38bff049d6d20c0fb81df38e Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 31 Jan 2020 22:15:40 +0100 Subject: Rebrand to Bottin (with Superboum's benediction) --- main.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'main.go') 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) } -- cgit v1.2.3