more camelCase

This commit is contained in:
Michael Quigley 2022-12-14 14:41:54 -05:00
parent 028ef8518b
commit c9c4ca6c49
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
10 changed files with 16 additions and 16 deletions

View File

@ -4,7 +4,7 @@ import (
"context" "context"
"fmt" "fmt"
"github.com/openziti-test-kitchen/zrok/endpoints" "github.com/openziti-test-kitchen/zrok/endpoints"
"github.com/openziti-test-kitchen/zrok/endpoints/publicFrontend/notfound_ui" "github.com/openziti-test-kitchen/zrok/endpoints/publicFrontend/notFoundUi"
"github.com/openziti-test-kitchen/zrok/model" "github.com/openziti-test-kitchen/zrok/model"
"github.com/openziti-test-kitchen/zrok/util" "github.com/openziti-test-kitchen/zrok/util"
"github.com/openziti-test-kitchen/zrok/zrokdir" "github.com/openziti-test-kitchen/zrok/zrokdir"
@ -83,7 +83,7 @@ func newServiceProxy(cfg *Config, ctx ziti.Context) (*httputil.ReverseProxy, err
} }
proxy.ErrorHandler = func(w http.ResponseWriter, r *http.Request, err error) { proxy.ErrorHandler = func(w http.ResponseWriter, r *http.Request, err error) {
logrus.Errorf("error proxying: %v", err) logrus.Errorf("error proxying: %v", err)
notfound_ui.WriteNotFound(w) notFoundUi.WriteNotFound(w)
} }
return proxy, nil return proxy, nil
} }
@ -183,15 +183,15 @@ func authHandler(svcToken string, handler http.Handler, realm string, cfg *Confi
} }
} else { } else {
logrus.Warnf("%v -> no auth scheme for '%v'", r.RemoteAddr, svcToken) logrus.Warnf("%v -> no auth scheme for '%v'", r.RemoteAddr, svcToken)
notfound_ui.WriteNotFound(w) notFoundUi.WriteNotFound(w)
} }
} else { } else {
logrus.Warnf("%v -> no proxy config for '%v'", r.RemoteAddr, svcToken) logrus.Warnf("%v -> no proxy config for '%v'", r.RemoteAddr, svcToken)
notfound_ui.WriteNotFound(w) notFoundUi.WriteNotFound(w)
} }
} else { } else {
logrus.Warnf("%v -> service '%v' not found", r.RemoteAddr, svcToken) logrus.Warnf("%v -> service '%v' not found", r.RemoteAddr, svcToken)
notfound_ui.WriteNotFound(w) notFoundUi.WriteNotFound(w)
} }
} }
} }

View File

@ -1,4 +1,4 @@
package health_ui package healthUi
import "embed" import "embed"

View File

@ -1,4 +1,4 @@
package health_ui package healthUi
import ( import (
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"

View File

@ -4,8 +4,8 @@ import (
"context" "context"
"fmt" "fmt"
"github.com/openziti-test-kitchen/zrok/endpoints" "github.com/openziti-test-kitchen/zrok/endpoints"
"github.com/openziti-test-kitchen/zrok/endpoints/publicFrontend/health_ui" "github.com/openziti-test-kitchen/zrok/endpoints/publicFrontend/healthUi"
"github.com/openziti-test-kitchen/zrok/endpoints/publicFrontend/notfound_ui" "github.com/openziti-test-kitchen/zrok/endpoints/publicFrontend/notFoundUi"
"github.com/openziti-test-kitchen/zrok/model" "github.com/openziti-test-kitchen/zrok/model"
"github.com/openziti-test-kitchen/zrok/util" "github.com/openziti-test-kitchen/zrok/util"
"github.com/openziti-test-kitchen/zrok/zrokdir" "github.com/openziti-test-kitchen/zrok/zrokdir"
@ -93,7 +93,7 @@ func newServiceProxy(cfg *Config, ctx ziti.Context) (*httputil.ReverseProxy, err
} }
proxy.ErrorHandler = func(w http.ResponseWriter, r *http.Request, err error) { proxy.ErrorHandler = func(w http.ResponseWriter, r *http.Request, err error) {
logrus.Errorf("error proxying: %v", err) logrus.Errorf("error proxying: %v", err)
notfound_ui.WriteNotFound(w) notFoundUi.WriteNotFound(w)
} }
return proxy, nil return proxy, nil
} }
@ -195,19 +195,19 @@ func authHandler(handler http.Handler, realm string, cfg *Config, ctx ziti.Conte
} }
} else { } else {
logrus.Warnf("%v -> no auth scheme for '%v'", r.RemoteAddr, svcToken) logrus.Warnf("%v -> no auth scheme for '%v'", r.RemoteAddr, svcToken)
notfound_ui.WriteNotFound(w) notFoundUi.WriteNotFound(w)
} }
} else { } else {
logrus.Warnf("%v -> no proxy config for '%v'", r.RemoteAddr, svcToken) logrus.Warnf("%v -> no proxy config for '%v'", r.RemoteAddr, svcToken)
notfound_ui.WriteNotFound(w) notFoundUi.WriteNotFound(w)
} }
} else { } else {
logrus.Warnf("%v -> service '%v' not found", r.RemoteAddr, svcToken) logrus.Warnf("%v -> service '%v' not found", r.RemoteAddr, svcToken)
notfound_ui.WriteNotFound(w) notFoundUi.WriteNotFound(w)
} }
} else { } else {
logrus.Debugf("host '%v' did not match host match, returning health check", r.Host) logrus.Debugf("host '%v' did not match host match, returning health check", r.Host)
health_ui.WriteHealthOk(w) healthUi.WriteHealthOk(w)
} }
} }
} }

View File

@ -1,4 +1,4 @@
package notfound_ui package notFoundUi
import "embed" import "embed"

View File

@ -1,4 +1,4 @@
package notfound_ui package notFoundUi
import ( import (
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"