From 65ff0f4f2352fdd9e32e1a6d53a0b2b12cfe49a3 Mon Sep 17 00:00:00 2001 From: Michael Quigley Date: Wed, 14 Dec 2022 14:40:45 -0500 Subject: [PATCH] let's try embracing more camel case --- .../{access_private.go => accessPrivate.go} | 6 +++--- cmd/zrok/{access_public.go => accessPublic.go} | 6 +++--- .../{admin_bootstrap.go => adminBootstrap.go} | 0 ...eate_frontend.go => adminCreateFrontend.go} | 0 ...eate_identity.go => adminCreateIdentity.go} | 0 ...lete_frontend.go => adminDeleteFrontend.go} | 0 cmd/zrok/{admin_gc.go => adminGc.go} | 0 ...list_frontends.go => adminListFrontends.go} | 0 ...date_frontend.go => adminUpdateFrontend.go} | 0 cmd/zrok/{endpoint_ui => endpointUi}/embed.go | 2 +- .../{endpoint_ui => endpointUi}/index.gohtml | 0 cmd/zrok/{share_private.go => sharePrivate.go} | 16 ++++++++-------- cmd/zrok/{share_public.go => sharePublic.go} | 16 ++++++++-------- .../{share_reserved.go => shareReserved.go} | 6 +++--- cmd/zrok/{test_endpoint.go => testEndpoint.go} | 4 ++-- controller/access.go | 4 ++-- controller/bootstrap.go | 16 ++++++++-------- .../{create_frontend.go => createFrontend.go} | 4 ++-- .../{create_identity.go => createIdentity.go} | 10 +++++----- .../{delete_frontend.go => deleteFrontend.go} | 0 controller/disable.go | 16 ++++++++-------- controller/{email_ui => emailUi}/embed.go | 2 +- controller/{email_ui => emailUi}/verify.gohtml | 0 controller/{email_ui => emailUi}/verify.gotext | 0 controller/enable.go | 8 ++++---- controller/gc.go | 18 +++++++++--------- controller/{get_service.go => getService.go} | 0 .../{list_frontends.go => listFrontends.go} | 0 .../{share_private.go => sharePrivate.go} | 10 +++++----- controller/{share_public.go => sharePublic.go} | 12 ++++++------ controller/unaccess.go | 4 ++-- controller/unshare.go | 12 ++++++------ .../{update_frontend.go => updateFrontend.go} | 0 controller/{update_share.go => updateShare.go} | 0 controller/{verify_email.go => verifyEmail.go} | 4 ++-- .../{zrok_edge_sdk => zrokEdgeSdk}/config.go | 2 +- .../{zrok_edge_sdk => zrokEdgeSdk}/erp.go | 2 +- .../{zrok_edge_sdk => zrokEdgeSdk}/identity.go | 2 +- .../{zrok_edge_sdk => zrokEdgeSdk}/serp.go | 2 +- .../{zrok_edge_sdk => zrokEdgeSdk}/service.go | 2 +- .../{zrok_edge_sdk => zrokEdgeSdk}/sp.go | 2 +- .../{zrok_edge_sdk => zrokEdgeSdk}/tags.go | 2 +- .../config.go | 2 +- .../http.go | 4 ++-- .../{proxy_backend => proxyBackend}/http.go | 2 +- .../metricsconn.go | 2 +- .../config.go | 2 +- .../health_ui/embed.go | 0 .../health_ui/handler.go | 0 .../health_ui/index.html | 0 .../http.go | 6 +++--- .../metrics.go | 2 +- .../metricsconn.go | 2 +- .../notfound_ui/embed.go | 0 .../notfound_ui/handler.go | 0 .../notfound_ui/index.html | 0 endpoints/{web_backend => webBackend}/web.go | 2 +- 57 files changed, 107 insertions(+), 107 deletions(-) rename cmd/zrok/{access_private.go => accessPrivate.go} (94%) rename cmd/zrok/{access_public.go => accessPublic.go} (87%) rename cmd/zrok/{admin_bootstrap.go => adminBootstrap.go} (100%) rename cmd/zrok/{admin_create_frontend.go => adminCreateFrontend.go} (100%) rename cmd/zrok/{admin_create_identity.go => adminCreateIdentity.go} (100%) rename cmd/zrok/{admin_delete_frontend.go => adminDeleteFrontend.go} (100%) rename cmd/zrok/{admin_gc.go => adminGc.go} (100%) rename cmd/zrok/{admin_list_frontends.go => adminListFrontends.go} (100%) rename cmd/zrok/{admin_update_frontend.go => adminUpdateFrontend.go} (100%) rename cmd/zrok/{endpoint_ui => endpointUi}/embed.go (74%) rename cmd/zrok/{endpoint_ui => endpointUi}/index.gohtml (100%) rename cmd/zrok/{share_private.go => sharePrivate.go} (91%) rename cmd/zrok/{share_public.go => sharePublic.go} (94%) rename cmd/zrok/{share_reserved.go => shareReserved.go} (96%) rename cmd/zrok/{test_endpoint.go => testEndpoint.go} (94%) rename controller/{create_frontend.go => createFrontend.go} (95%) rename controller/{create_identity.go => createIdentity.go} (86%) rename controller/{delete_frontend.go => deleteFrontend.go} (100%) rename controller/{email_ui => emailUi}/embed.go (80%) rename controller/{email_ui => emailUi}/verify.gohtml (100%) rename controller/{email_ui => emailUi}/verify.gotext (100%) rename controller/{get_service.go => getService.go} (100%) rename controller/{list_frontends.go => listFrontends.go} (100%) rename controller/{share_private.go => sharePrivate.go} (65%) rename controller/{share_public.go => sharePublic.go} (66%) rename controller/{update_frontend.go => updateFrontend.go} (100%) rename controller/{update_share.go => updateShare.go} (100%) rename controller/{verify_email.go => verifyEmail.go} (94%) rename controller/{zrok_edge_sdk => zrokEdgeSdk}/config.go (99%) rename controller/{zrok_edge_sdk => zrokEdgeSdk}/erp.go (98%) rename controller/{zrok_edge_sdk => zrokEdgeSdk}/identity.go (99%) rename controller/{zrok_edge_sdk => zrokEdgeSdk}/serp.go (99%) rename controller/{zrok_edge_sdk => zrokEdgeSdk}/service.go (98%) rename controller/{zrok_edge_sdk => zrokEdgeSdk}/sp.go (99%) rename controller/{zrok_edge_sdk => zrokEdgeSdk}/tags.go (94%) rename endpoints/{private_frontend => privateFrontend}/config.go (89%) rename endpoints/{private_frontend => privateFrontend}/http.go (98%) rename endpoints/{proxy_backend => proxyBackend}/http.go (99%) rename endpoints/{proxy_backend => proxyBackend}/metricsconn.go (97%) rename endpoints/{public_frontend => publicFrontend}/config.go (96%) rename endpoints/{public_frontend => publicFrontend}/health_ui/embed.go (100%) rename endpoints/{public_frontend => publicFrontend}/health_ui/handler.go (100%) rename endpoints/{public_frontend => publicFrontend}/health_ui/index.html (100%) rename endpoints/{public_frontend => publicFrontend}/http.go (97%) rename endpoints/{public_frontend => publicFrontend}/metrics.go (99%) rename endpoints/{public_frontend => publicFrontend}/metricsconn.go (97%) rename endpoints/{public_frontend => publicFrontend}/notfound_ui/embed.go (100%) rename endpoints/{public_frontend => publicFrontend}/notfound_ui/handler.go (100%) rename endpoints/{public_frontend => publicFrontend}/notfound_ui/index.html (100%) rename endpoints/{web_backend => webBackend}/web.go (98%) diff --git a/cmd/zrok/access_private.go b/cmd/zrok/accessPrivate.go similarity index 94% rename from cmd/zrok/access_private.go rename to cmd/zrok/accessPrivate.go index 5d893542..8588d75d 100644 --- a/cmd/zrok/access_private.go +++ b/cmd/zrok/accessPrivate.go @@ -3,7 +3,7 @@ package main import ( "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" - "github.com/openziti-test-kitchen/zrok/endpoints/private_frontend" + "github.com/openziti-test-kitchen/zrok/endpoints/privateFrontend" "github.com/openziti-test-kitchen/zrok/rest_client_zrok" "github.com/openziti-test-kitchen/zrok/rest_client_zrok/service" "github.com/openziti-test-kitchen/zrok/rest_model_zrok" @@ -78,7 +78,7 @@ func (cmd *accessPrivateCommand) run(_ *cobra.Command, args []string) { } logrus.Infof("allocated frontend '%v'", accessResp.Payload.FrontendToken) - cfg := private_frontend.DefaultConfig("backend") + cfg := privateFrontend.DefaultConfig("backend") cfg.SvcToken = svcToken cfg.Address = cmd.bindAddress @@ -90,7 +90,7 @@ func (cmd *accessPrivateCommand) run(_ *cobra.Command, args []string) { os.Exit(0) }() - frontend, err := private_frontend.NewHTTP(cfg) + frontend, err := privateFrontend.NewHTTP(cfg) if err != nil { if !panicInstead { showError("unable to create private frontend", err) diff --git a/cmd/zrok/access_public.go b/cmd/zrok/accessPublic.go similarity index 87% rename from cmd/zrok/access_public.go rename to cmd/zrok/accessPublic.go index a987b64c..6a7ef637 100644 --- a/cmd/zrok/access_public.go +++ b/cmd/zrok/accessPublic.go @@ -3,7 +3,7 @@ package main import ( "fmt" "github.com/michaelquigley/cf" - "github.com/openziti-test-kitchen/zrok/endpoints/public_frontend" + "github.com/openziti-test-kitchen/zrok/endpoints/publicFrontend" "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) @@ -29,7 +29,7 @@ func newAccessPublicCommand() *accessPublicCommand { } func (self *accessPublicCommand) run(_ *cobra.Command, args []string) { - cfg := public_frontend.DefaultConfig() + cfg := publicFrontend.DefaultConfig() if len(args) == 1 { if err := cfg.Load(args[0]); err != nil { if !panicInstead { @@ -39,7 +39,7 @@ func (self *accessPublicCommand) run(_ *cobra.Command, args []string) { } } logrus.Infof(cf.Dump(cfg, cf.DefaultOptions())) - frontend, err := public_frontend.NewHTTP(cfg) + frontend, err := publicFrontend.NewHTTP(cfg) if err != nil { if !panicInstead { showError("unable to create http frontend", err) diff --git a/cmd/zrok/admin_bootstrap.go b/cmd/zrok/adminBootstrap.go similarity index 100% rename from cmd/zrok/admin_bootstrap.go rename to cmd/zrok/adminBootstrap.go diff --git a/cmd/zrok/admin_create_frontend.go b/cmd/zrok/adminCreateFrontend.go similarity index 100% rename from cmd/zrok/admin_create_frontend.go rename to cmd/zrok/adminCreateFrontend.go diff --git a/cmd/zrok/admin_create_identity.go b/cmd/zrok/adminCreateIdentity.go similarity index 100% rename from cmd/zrok/admin_create_identity.go rename to cmd/zrok/adminCreateIdentity.go diff --git a/cmd/zrok/admin_delete_frontend.go b/cmd/zrok/adminDeleteFrontend.go similarity index 100% rename from cmd/zrok/admin_delete_frontend.go rename to cmd/zrok/adminDeleteFrontend.go diff --git a/cmd/zrok/admin_gc.go b/cmd/zrok/adminGc.go similarity index 100% rename from cmd/zrok/admin_gc.go rename to cmd/zrok/adminGc.go diff --git a/cmd/zrok/admin_list_frontends.go b/cmd/zrok/adminListFrontends.go similarity index 100% rename from cmd/zrok/admin_list_frontends.go rename to cmd/zrok/adminListFrontends.go diff --git a/cmd/zrok/admin_update_frontend.go b/cmd/zrok/adminUpdateFrontend.go similarity index 100% rename from cmd/zrok/admin_update_frontend.go rename to cmd/zrok/adminUpdateFrontend.go diff --git a/cmd/zrok/endpoint_ui/embed.go b/cmd/zrok/endpointUi/embed.go similarity index 74% rename from cmd/zrok/endpoint_ui/embed.go rename to cmd/zrok/endpointUi/embed.go index c6c4c76f..f366d028 100644 --- a/cmd/zrok/endpoint_ui/embed.go +++ b/cmd/zrok/endpointUi/embed.go @@ -1,4 +1,4 @@ -package endpoint_ui +package endpointUi import "embed" diff --git a/cmd/zrok/endpoint_ui/index.gohtml b/cmd/zrok/endpointUi/index.gohtml similarity index 100% rename from cmd/zrok/endpoint_ui/index.gohtml rename to cmd/zrok/endpointUi/index.gohtml diff --git a/cmd/zrok/share_private.go b/cmd/zrok/sharePrivate.go similarity index 91% rename from cmd/zrok/share_private.go rename to cmd/zrok/sharePrivate.go index 1e2bb83c..545b637c 100644 --- a/cmd/zrok/share_private.go +++ b/cmd/zrok/sharePrivate.go @@ -5,8 +5,8 @@ import ( ui "github.com/gizak/termui/v3" "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" - "github.com/openziti-test-kitchen/zrok/endpoints/proxy_backend" - "github.com/openziti-test-kitchen/zrok/endpoints/web_backend" + "github.com/openziti-test-kitchen/zrok/endpoints/proxyBackend" + "github.com/openziti-test-kitchen/zrok/endpoints/webBackend" "github.com/openziti-test-kitchen/zrok/model" "github.com/openziti-test-kitchen/zrok/rest_client_zrok" "github.com/openziti-test-kitchen/zrok/rest_client_zrok/service" @@ -133,7 +133,7 @@ func (cmd *sharePrivateCommand) run(_ *cobra.Command, args []string) { switch cmd.backendMode { case "proxy": - cfg := &proxy_backend.Config{ + cfg := &proxyBackend.Config{ IdentityPath: zif, EndpointAddress: target, Service: resp.Payload.SvcToken, @@ -148,7 +148,7 @@ func (cmd *sharePrivateCommand) run(_ *cobra.Command, args []string) { } case "web": - cfg := &web_backend.Config{ + cfg := &webBackend.Config{ IdentityPath: zif, WebRoot: target, Service: resp.Payload.SvcToken, @@ -174,8 +174,8 @@ func (cmd *sharePrivateCommand) run(_ *cobra.Command, args []string) { } } -func (cmd *sharePrivateCommand) proxyBackendMode(cfg *proxy_backend.Config) (backendHandler, error) { - be, err := proxy_backend.NewBackend(cfg) +func (cmd *sharePrivateCommand) proxyBackendMode(cfg *proxyBackend.Config) (backendHandler, error) { + be, err := proxyBackend.NewBackend(cfg) if err != nil { return nil, errors.Wrap(err, "error creating http proxy backend") } @@ -189,8 +189,8 @@ func (cmd *sharePrivateCommand) proxyBackendMode(cfg *proxy_backend.Config) (bac return be, nil } -func (cmd *sharePrivateCommand) webBackendMode(cfg *web_backend.Config) (backendHandler, error) { - be, err := web_backend.NewBackend(cfg) +func (cmd *sharePrivateCommand) webBackendMode(cfg *webBackend.Config) (backendHandler, error) { + be, err := webBackend.NewBackend(cfg) if err != nil { return nil, errors.Wrap(err, "error creating http web backend") } diff --git a/cmd/zrok/share_public.go b/cmd/zrok/sharePublic.go similarity index 94% rename from cmd/zrok/share_public.go rename to cmd/zrok/sharePublic.go index d2f61d64..15bccddc 100644 --- a/cmd/zrok/share_public.go +++ b/cmd/zrok/sharePublic.go @@ -7,8 +7,8 @@ import ( "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" tb "github.com/nsf/termbox-go" - "github.com/openziti-test-kitchen/zrok/endpoints/proxy_backend" - "github.com/openziti-test-kitchen/zrok/endpoints/web_backend" + "github.com/openziti-test-kitchen/zrok/endpoints/proxyBackend" + "github.com/openziti-test-kitchen/zrok/endpoints/webBackend" "github.com/openziti-test-kitchen/zrok/model" "github.com/openziti-test-kitchen/zrok/rest_client_zrok" "github.com/openziti-test-kitchen/zrok/rest_client_zrok/service" @@ -154,7 +154,7 @@ func (cmd *sharePublicCommand) run(_ *cobra.Command, args []string) { var bh backendHandler switch cmd.backendMode { case "proxy": - cfg := &proxy_backend.Config{ + cfg := &proxyBackend.Config{ IdentityPath: zif, EndpointAddress: target, Service: resp.Payload.SvcToken, @@ -169,7 +169,7 @@ func (cmd *sharePublicCommand) run(_ *cobra.Command, args []string) { } case "web": - cfg := &web_backend.Config{ + cfg := &webBackend.Config{ IdentityPath: zif, WebRoot: target, Service: resp.Payload.SvcToken, @@ -256,8 +256,8 @@ func (cmd *sharePublicCommand) run(_ *cobra.Command, args []string) { } } -func (cmd *sharePublicCommand) proxyBackendMode(cfg *proxy_backend.Config) (backendHandler, error) { - be, err := proxy_backend.NewBackend(cfg) +func (cmd *sharePublicCommand) proxyBackendMode(cfg *proxyBackend.Config) (backendHandler, error) { + be, err := proxyBackend.NewBackend(cfg) if err != nil { return nil, errors.Wrap(err, "error creating http proxy backend") } @@ -271,8 +271,8 @@ func (cmd *sharePublicCommand) proxyBackendMode(cfg *proxy_backend.Config) (back return be, nil } -func (cmd *sharePublicCommand) webBackendMode(cfg *web_backend.Config) (backendHandler, error) { - be, err := web_backend.NewBackend(cfg) +func (cmd *sharePublicCommand) webBackendMode(cfg *webBackend.Config) (backendHandler, error) { + be, err := webBackend.NewBackend(cfg) if err != nil { return nil, errors.Wrap(err, "error creating http web backend") } diff --git a/cmd/zrok/share_reserved.go b/cmd/zrok/shareReserved.go similarity index 96% rename from cmd/zrok/share_reserved.go rename to cmd/zrok/shareReserved.go index bd39b19d..12a428cb 100644 --- a/cmd/zrok/share_reserved.go +++ b/cmd/zrok/shareReserved.go @@ -3,7 +3,7 @@ package main import ( ui "github.com/gizak/termui/v3" httptransport "github.com/go-openapi/runtime/client" - "github.com/openziti-test-kitchen/zrok/endpoints/proxy_backend" + "github.com/openziti-test-kitchen/zrok/endpoints/proxyBackend" "github.com/openziti-test-kitchen/zrok/rest_client_zrok/service" "github.com/openziti-test-kitchen/zrok/rest_model_zrok" "github.com/openziti-test-kitchen/zrok/zrokdir" @@ -91,7 +91,7 @@ func (cmd *shareReservedCommand) run(_ *cobra.Command, args []string) { } panic(err) } - cfg := &proxy_backend.Config{ + cfg := &proxyBackend.Config{ IdentityPath: zif, EndpointAddress: targetEndpoint, Service: svcToken, @@ -115,7 +115,7 @@ func (cmd *shareReservedCommand) run(_ *cobra.Command, args []string) { logrus.Infof("using existing backend proxy endpoint: %v", targetEndpoint) } - httpProxy, err := proxy_backend.NewBackend(cfg) + httpProxy, err := proxyBackend.NewBackend(cfg) if err != nil { ui.Close() if !panicInstead { diff --git a/cmd/zrok/test_endpoint.go b/cmd/zrok/testEndpoint.go similarity index 94% rename from cmd/zrok/test_endpoint.go rename to cmd/zrok/testEndpoint.go index 5c066317..57cf7867 100644 --- a/cmd/zrok/test_endpoint.go +++ b/cmd/zrok/testEndpoint.go @@ -3,7 +3,7 @@ package main import ( "fmt" "github.com/opentracing/opentracing-go/log" - "github.com/openziti-test-kitchen/zrok/cmd/zrok/endpoint_ui" + "github.com/openziti-test-kitchen/zrok/cmd/zrok/endpointUi" "github.com/sirupsen/logrus" "github.com/spf13/cobra" "html/template" @@ -31,7 +31,7 @@ func newTestEndpointCommand() *testEndpointCommand { } command := &testEndpointCommand{cmd: cmd} var err error - if command.t, err = template.ParseFS(endpoint_ui.FS, "index.gohtml"); err != nil { + if command.t, err = template.ParseFS(endpointUi.FS, "index.gohtml"); err != nil { if !panicInstead { showError("unable to parse index template", err) } diff --git a/controller/access.go b/controller/access.go index 6a51cbb0..eb4e72eb 100644 --- a/controller/access.go +++ b/controller/access.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/go-openapi/runtime/middleware" "github.com/openziti-test-kitchen/zrok/controller/store" - "github.com/openziti-test-kitchen/zrok/controller/zrok_edge_sdk" + "github.com/openziti-test-kitchen/zrok/controller/zrokEdgeSdk" "github.com/openziti-test-kitchen/zrok/rest_model_zrok" "github.com/openziti-test-kitchen/zrok/rest_server_zrok/operations/service" "github.com/openziti/edge/rest_management_api_client" @@ -96,7 +96,7 @@ func (h *accessHandler) Handle(params service.AccessParams, principal *rest_mode } func createServicePolicyDialForEnvironment(envZId, svcToken, svcZId string, edge *rest_management_api_client.ZitiEdgeManagement, tags ...*rest_model.Tags) error { - allTags := zrok_edge_sdk.ZrokServiceTags(svcToken) + allTags := zrokEdgeSdk.ZrokServiceTags(svcToken) for _, t := range tags { for k, v := range t.SubTags { allTags.SubTags[k] = v diff --git a/controller/bootstrap.go b/controller/bootstrap.go index d9060f1e..1607d21b 100644 --- a/controller/bootstrap.go +++ b/controller/bootstrap.go @@ -6,7 +6,7 @@ import ( "encoding/json" "fmt" "github.com/openziti-test-kitchen/zrok/controller/store" - "github.com/openziti-test-kitchen/zrok/controller/zrok_edge_sdk" + "github.com/openziti-test-kitchen/zrok/controller/zrokEdgeSdk" "github.com/openziti-test-kitchen/zrok/model" "github.com/openziti-test-kitchen/zrok/zrokdir" "github.com/openziti/edge/rest_management_api_client" @@ -196,13 +196,13 @@ func assertIdentity(zId string, edge *rest_management_api_client.ZitiEdgeManagem } func bootstrapIdentity(name string, edge *rest_management_api_client.ZitiEdgeManagement) (string, error) { - idc, err := zrok_edge_sdk.CreateIdentity(name, rest_model_edge.IdentityTypeDevice, nil, edge) + idc, err := zrokEdgeSdk.CreateIdentity(name, rest_model_edge.IdentityTypeDevice, nil, edge) if err != nil { return "", errors.Wrapf(err, "error creating '%v' identity", name) } zId := idc.Payload.Data.ID - cfg, err := zrok_edge_sdk.EnrollIdentity(zId, edge) + cfg, err := zrokEdgeSdk.EnrollIdentity(zId, edge) if err != nil { return "", errors.Wrapf(err, "error enrolling '%v' identity", name) } @@ -236,7 +236,7 @@ func assertErpForIdentity(name, zId string, edge *rest_management_api_client.Zit } if len(listResp.Payload.Data) != 1 { logrus.Infof("creating erp for '%v' (%v)", name, zId) - if err := zrok_edge_sdk.CreateEdgeRouterPolicy(name, zId, edge); err != nil { + if err := zrokEdgeSdk.CreateEdgeRouterPolicy(name, zId, edge); err != nil { return errors.Wrapf(err, "error creating erp for '%v' (%v)", name, zId) } } @@ -261,7 +261,7 @@ func assertMetricsService(cfg *Config, edge *rest_management_api_client.ZitiEdge var svcZId string if len(listResp.Payload.Data) != 1 { logrus.Infof("creating '%v' service", cfg.Metrics.ServiceName) - svcZId, err = zrok_edge_sdk.CreateService("metrics", nil, nil, edge) + svcZId, err = zrokEdgeSdk.CreateService("metrics", nil, nil, edge) if err != nil { return "", errors.Wrapf(err, "error creating '%v' service", cfg.Metrics.ServiceName) } @@ -289,7 +289,7 @@ func assertMetricsSerp(metricsSvcZId string, cfg *Config, edge *rest_management_ } if len(listResp.Payload.Data) != 1 { logrus.Infof("creating '%v' serp", cfg.Metrics.ServiceName) - _, err := zrok_edge_sdk.CreateServiceEdgeRouterPolicy(cfg.Metrics.ServiceName, metricsSvcZId, nil, edge) + _, err := zrokEdgeSdk.CreateServiceEdgeRouterPolicy(cfg.Metrics.ServiceName, metricsSvcZId, nil, edge) if err != nil { return errors.Wrapf(err, "error creating '%v' serp", cfg.Metrics.ServiceName) } @@ -314,7 +314,7 @@ func assertCtrlMetricsBind(ctrlZId, metricsSvcZId string, edge *rest_management_ } if len(listResp.Payload.Data) != 1 { logrus.Info("creating 'ctrl-metrics-bind' service policy") - if err := zrok_edge_sdk.CreateNamedBindServicePolicy("ctrl-metrics-bind", metricsSvcZId, ctrlZId, edge, zrok_edge_sdk.ZrokTags()); err != nil { + if err := zrokEdgeSdk.CreateNamedBindServicePolicy("ctrl-metrics-bind", metricsSvcZId, ctrlZId, edge, zrokEdgeSdk.ZrokTags()); err != nil { return errors.Wrap(err, "error creating 'ctrl-metrics-bind' service policy") } } @@ -338,7 +338,7 @@ func assertFrontendMetricsDial(frontendZId, metricsSvcZId string, edge *rest_man } if len(listResp.Payload.Data) != 1 { logrus.Info("creating 'frontend-metrics-dial' service policy") - if err := zrok_edge_sdk.CreateNamedDialServicePolicy("frontend-metrics-dial", metricsSvcZId, frontendZId, edge, zrok_edge_sdk.ZrokTags()); err != nil { + if err := zrokEdgeSdk.CreateNamedDialServicePolicy("frontend-metrics-dial", metricsSvcZId, frontendZId, edge, zrokEdgeSdk.ZrokTags()); err != nil { return errors.Wrap(err, "error creating 'frontend-metrics-dial' service policy") } } diff --git a/controller/create_frontend.go b/controller/createFrontend.go similarity index 95% rename from controller/create_frontend.go rename to controller/createFrontend.go index b60c7c80..9a7d22c0 100644 --- a/controller/create_frontend.go +++ b/controller/createFrontend.go @@ -3,7 +3,7 @@ package controller import ( "github.com/go-openapi/runtime/middleware" "github.com/openziti-test-kitchen/zrok/controller/store" - "github.com/openziti-test-kitchen/zrok/controller/zrok_edge_sdk" + "github.com/openziti-test-kitchen/zrok/controller/zrokEdgeSdk" "github.com/openziti-test-kitchen/zrok/rest_model_zrok" "github.com/openziti-test-kitchen/zrok/rest_server_zrok/operations/admin" "github.com/sirupsen/logrus" @@ -28,7 +28,7 @@ func (h *createFrontendHandler) Handle(params admin.CreateFrontendParams, princi } zId := params.Body.ZID - detail, err := zrok_edge_sdk.GetIdentity(zId, client) + detail, err := zrokEdgeSdk.GetIdentity(zId, client) if err != nil { logrus.Errorf("error getting identity details for '%v': %v", zId, err) return admin.NewCreateFrontendInternalServerError() diff --git a/controller/create_identity.go b/controller/createIdentity.go similarity index 86% rename from controller/create_identity.go rename to controller/createIdentity.go index 42d41242..31c65392 100644 --- a/controller/create_identity.go +++ b/controller/createIdentity.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" "github.com/go-openapi/runtime/middleware" - "github.com/openziti-test-kitchen/zrok/controller/zrok_edge_sdk" + "github.com/openziti-test-kitchen/zrok/controller/zrokEdgeSdk" "github.com/openziti-test-kitchen/zrok/rest_model_zrok" "github.com/openziti-test-kitchen/zrok/rest_server_zrok/operations/admin" "github.com/openziti/edge/rest_management_api_client/service" @@ -34,20 +34,20 @@ func (h *createIdentityHandler) Handle(params admin.CreateIdentityParams, princi return admin.NewCreateIdentityInternalServerError() } - idc, err := zrok_edge_sdk.CreateIdentity(name, rest_model_edge.IdentityTypeService, nil, edge) + idc, err := zrokEdgeSdk.CreateIdentity(name, rest_model_edge.IdentityTypeService, nil, edge) if err != nil { logrus.Errorf("error creating identity: %v", err) return admin.NewCreateIdentityInternalServerError() } zId := idc.Payload.Data.ID - idCfg, err := zrok_edge_sdk.EnrollIdentity(zId, edge) + idCfg, err := zrokEdgeSdk.EnrollIdentity(zId, edge) if err != nil { logrus.Errorf("error enrolling identity: %v", err) return admin.NewCreateIdentityInternalServerError() } - if err := zrok_edge_sdk.CreateEdgeRouterPolicy(name, zId, edge); err != nil { + if err := zrokEdgeSdk.CreateEdgeRouterPolicy(name, zId, edge); err != nil { logrus.Errorf("error creating edge router policy for identity: %v", err) return admin.NewCreateIdentityInternalServerError() } @@ -73,7 +73,7 @@ func (h *createIdentityHandler) Handle(params admin.CreateIdentityParams, princi svcZId := *listSvcResp.Payload.Data[0].ID spName := fmt.Sprintf("%v-%v-dial", name, cfg.Metrics.ServiceName) - if err := zrok_edge_sdk.CreateNamedDialServicePolicy(spName, svcZId, zId, edge); err != nil { + if err := zrokEdgeSdk.CreateNamedDialServicePolicy(spName, svcZId, zId, edge); err != nil { logrus.Errorf("error creating named dial service policy '%v': %v", spName, err) return admin.NewCreateIdentityInternalServerError() } diff --git a/controller/delete_frontend.go b/controller/deleteFrontend.go similarity index 100% rename from controller/delete_frontend.go rename to controller/deleteFrontend.go diff --git a/controller/disable.go b/controller/disable.go index 7b0a779a..e8cabe1c 100644 --- a/controller/disable.go +++ b/controller/disable.go @@ -3,7 +3,7 @@ package controller import ( "github.com/go-openapi/runtime/middleware" "github.com/jmoiron/sqlx" - "github.com/openziti-test-kitchen/zrok/controller/zrok_edge_sdk" + "github.com/openziti-test-kitchen/zrok/controller/zrokEdgeSdk" "github.com/openziti-test-kitchen/zrok/rest_model_zrok" "github.com/openziti-test-kitchen/zrok/rest_server_zrok/operations/environment" "github.com/openziti/edge/rest_management_api_client" @@ -48,11 +48,11 @@ func (h *disableHandler) Handle(params environment.DisableParams, principal *res logrus.Errorf("error removing environment: %v", err) return environment.NewDisableInternalServerError() } - if err := zrok_edge_sdk.DeleteEdgeRouterPolicy(env.ZId, edge); err != nil { + if err := zrokEdgeSdk.DeleteEdgeRouterPolicy(env.ZId, edge); err != nil { logrus.Errorf("error deleting edge router policy: %v", err) return environment.NewDisableInternalServerError() } - if err := zrok_edge_sdk.DeleteIdentity(params.Body.Identity, edge); err != nil { + if err := zrokEdgeSdk.DeleteIdentity(params.Body.Identity, edge); err != nil { logrus.Errorf("error deleting identity: %v", err) return environment.NewDisableInternalServerError() } @@ -87,19 +87,19 @@ func (h *disableHandler) removeServicesForEnvironment(envId int, tx *sqlx.Tx, ed for _, svc := range svcs { svcToken := svc.Token logrus.Infof("garbage collecting service '%v' for environment '%v'", svcToken, env.ZId) - if err := zrok_edge_sdk.DeleteServiceEdgeRouterPolicy(env.ZId, svcToken, edge); err != nil { + if err := zrokEdgeSdk.DeleteServiceEdgeRouterPolicy(env.ZId, svcToken, edge); err != nil { logrus.Error(err) } - if err := zrok_edge_sdk.DeleteServicePolicyDial(env.ZId, svcToken, edge); err != nil { + if err := zrokEdgeSdk.DeleteServicePolicyDial(env.ZId, svcToken, edge); err != nil { logrus.Error(err) } - if err := zrok_edge_sdk.DeleteServicePolicyBind(env.ZId, svcToken, edge); err != nil { + if err := zrokEdgeSdk.DeleteServicePolicyBind(env.ZId, svcToken, edge); err != nil { logrus.Error(err) } - if err := zrok_edge_sdk.DeleteConfig(env.ZId, svcToken, edge); err != nil { + if err := zrokEdgeSdk.DeleteConfig(env.ZId, svcToken, edge); err != nil { logrus.Error(err) } - if err := zrok_edge_sdk.DeleteService(env.ZId, svc.ZId, edge); err != nil { + if err := zrokEdgeSdk.DeleteService(env.ZId, svc.ZId, edge); err != nil { logrus.Error(err) } logrus.Infof("removed service '%v' for environment '%v'", svc.Token, env.ZId) diff --git a/controller/email_ui/embed.go b/controller/emailUi/embed.go similarity index 80% rename from controller/email_ui/embed.go rename to controller/emailUi/embed.go index b07b8b58..657e12de 100644 --- a/controller/email_ui/embed.go +++ b/controller/emailUi/embed.go @@ -1,4 +1,4 @@ -package email_ui +package emailUi import "embed" diff --git a/controller/email_ui/verify.gohtml b/controller/emailUi/verify.gohtml similarity index 100% rename from controller/email_ui/verify.gohtml rename to controller/emailUi/verify.gohtml diff --git a/controller/email_ui/verify.gotext b/controller/emailUi/verify.gotext similarity index 100% rename from controller/email_ui/verify.gotext rename to controller/emailUi/verify.gotext diff --git a/controller/enable.go b/controller/enable.go index 7266aad2..2ea63dc5 100644 --- a/controller/enable.go +++ b/controller/enable.go @@ -5,7 +5,7 @@ import ( "encoding/json" "github.com/go-openapi/runtime/middleware" "github.com/openziti-test-kitchen/zrok/controller/store" - "github.com/openziti-test-kitchen/zrok/controller/zrok_edge_sdk" + "github.com/openziti-test-kitchen/zrok/controller/zrokEdgeSdk" "github.com/openziti-test-kitchen/zrok/rest_model_zrok" "github.com/openziti-test-kitchen/zrok/rest_server_zrok/operations/environment" "github.com/sirupsen/logrus" @@ -36,18 +36,18 @@ func (h *enableHandler) Handle(params environment.EnableParams, principal *rest_ logrus.Errorf("error creating account token: %v", err) return environment.NewEnableInternalServerError() } - ident, err := zrok_edge_sdk.CreateEnvironmentIdentity(principal.Email, accountToken, client) + ident, err := zrokEdgeSdk.CreateEnvironmentIdentity(principal.Email, accountToken, client) if err != nil { logrus.Error(err) return environment.NewEnableInternalServerError() } envZId := ident.Payload.Data.ID - cfg, err := zrok_edge_sdk.EnrollIdentity(envZId, client) + cfg, err := zrokEdgeSdk.EnrollIdentity(envZId, client) if err != nil { logrus.Error(err) return environment.NewEnableInternalServerError() } - if err := zrok_edge_sdk.CreateEdgeRouterPolicy(envZId, envZId, client); err != nil { + if err := zrokEdgeSdk.CreateEdgeRouterPolicy(envZId, envZId, client); err != nil { logrus.Error(err) return environment.NewEnableInternalServerError() } diff --git a/controller/gc.go b/controller/gc.go index e244b543..387118dc 100644 --- a/controller/gc.go +++ b/controller/gc.go @@ -4,7 +4,7 @@ import ( "context" "fmt" "github.com/openziti-test-kitchen/zrok/controller/store" - "github.com/openziti-test-kitchen/zrok/controller/zrok_edge_sdk" + "github.com/openziti-test-kitchen/zrok/controller/zrokEdgeSdk" "github.com/openziti/edge/rest_management_api_client" "github.com/openziti/edge/rest_management_api_client/config" "github.com/openziti/edge/rest_management_api_client/service" @@ -72,19 +72,19 @@ func gcServices(edge *rest_management_api_client.ZitiEdgeManagement, liveMap map for _, svc := range listResp.Payload.Data { if _, found := liveMap[*svc.Name]; !found { logrus.Infof("garbage collecting, zitiSvcId='%v', zrokSvcId='%v'", *svc.ID, *svc.Name) - if err := zrok_edge_sdk.DeleteServiceEdgeRouterPolicy("gc", *svc.Name, edge); err != nil { + if err := zrokEdgeSdk.DeleteServiceEdgeRouterPolicy("gc", *svc.Name, edge); err != nil { logrus.Errorf("error garbage collecting service edge router policy: %v", err) } - if err := zrok_edge_sdk.DeleteServicePolicyDial("gc", *svc.Name, edge); err != nil { + if err := zrokEdgeSdk.DeleteServicePolicyDial("gc", *svc.Name, edge); err != nil { logrus.Errorf("error garbage collecting service dial policy: %v", err) } - if err := zrok_edge_sdk.DeleteServicePolicyBind("gc", *svc.Name, edge); err != nil { + if err := zrokEdgeSdk.DeleteServicePolicyBind("gc", *svc.Name, edge); err != nil { logrus.Errorf("error garbage collecting service bind policy: %v", err) } - if err := zrok_edge_sdk.DeleteConfig("gc", *svc.Name, edge); err != nil { + if err := zrokEdgeSdk.DeleteConfig("gc", *svc.Name, edge); err != nil { logrus.Errorf("error garbage collecting config: %v", err) } - if err := zrok_edge_sdk.DeleteService("gc", *svc.ID, edge); err != nil { + if err := zrokEdgeSdk.DeleteService("gc", *svc.ID, edge); err != nil { logrus.Errorf("error garbage collecting service: %v", err) } } else { @@ -109,7 +109,7 @@ func gcServiceEdgeRouterPolicies(edge *rest_management_api_client.ZitiEdgeManage for _, serp := range listResp.Payload.Data { if _, found := liveMap[*serp.Name]; !found { logrus.Infof("garbage collecting, svcId='%v'", *serp.Name) - if err := zrok_edge_sdk.DeleteServiceEdgeRouterPolicy("gc", *serp.Name, edge); err != nil { + if err := zrokEdgeSdk.DeleteServiceEdgeRouterPolicy("gc", *serp.Name, edge); err != nil { logrus.Errorf("error garbage collecting service edge router policy: %v", err) } } else { @@ -136,7 +136,7 @@ func gcServicePolicies(edge *rest_management_api_client.ZitiEdgeManagement, live if _, found := liveMap[spName]; !found { logrus.Infof("garbage collecting, svcId='%v'", spName) deleteFilter := fmt.Sprintf("id=\"%v\"", *sp.ID) - if err := zrok_edge_sdk.DeleteServicePolicy("gc", deleteFilter, edge); err != nil { + if err := zrokEdgeSdk.DeleteServicePolicy("gc", deleteFilter, edge); err != nil { logrus.Errorf("error garbage collecting service policy: %v", err) } } else { @@ -160,7 +160,7 @@ func gcConfigs(edge *rest_management_api_client.ZitiEdgeManagement, liveMap map[ if listResp, err := edge.Config.ListConfigs(listReq, nil); err == nil { for _, c := range listResp.Payload.Data { if _, found := liveMap[*c.Name]; !found { - if err := zrok_edge_sdk.DeleteConfig("gc", *c.Name, edge); err != nil { + if err := zrokEdgeSdk.DeleteConfig("gc", *c.Name, edge); err != nil { logrus.Errorf("error garbage collecting config: %v", err) } } else { diff --git a/controller/get_service.go b/controller/getService.go similarity index 100% rename from controller/get_service.go rename to controller/getService.go diff --git a/controller/list_frontends.go b/controller/listFrontends.go similarity index 100% rename from controller/list_frontends.go rename to controller/listFrontends.go diff --git a/controller/share_private.go b/controller/sharePrivate.go similarity index 65% rename from controller/share_private.go rename to controller/sharePrivate.go index 40826d30..c015ab5e 100644 --- a/controller/share_private.go +++ b/controller/sharePrivate.go @@ -1,7 +1,7 @@ package controller import ( - "github.com/openziti-test-kitchen/zrok/controller/zrok_edge_sdk" + "github.com/openziti-test-kitchen/zrok/controller/zrokEdgeSdk" "github.com/openziti-test-kitchen/zrok/model" "github.com/openziti-test-kitchen/zrok/rest_server_zrok/operations/service" "github.com/openziti/edge/rest_management_api_client" @@ -18,21 +18,21 @@ func (a *privateResourceAllocator) allocate(envZId, svcToken string, params serv for _, authUser := range params.Body.AuthUsers { authUsers = append(authUsers, &model.AuthUser{authUser.Username, authUser.Password}) } - cfgId, err := zrok_edge_sdk.CreateConfig(zrokProxyConfigId, envZId, svcToken, params.Body.AuthScheme, authUsers, edge) + cfgId, err := zrokEdgeSdk.CreateConfig(zrokProxyConfigId, envZId, svcToken, params.Body.AuthScheme, authUsers, edge) if err != nil { return "", nil, err } - svcZId, err = zrok_edge_sdk.CreateShareService(envZId, svcToken, cfgId, edge) + svcZId, err = zrokEdgeSdk.CreateShareService(envZId, svcToken, cfgId, edge) if err != nil { return "", nil, err } - if err := zrok_edge_sdk.CreateServicePolicyBind(envZId, svcToken, svcZId, edge); err != nil { + if err := zrokEdgeSdk.CreateServicePolicyBind(envZId, svcToken, svcZId, edge); err != nil { return "", nil, err } - if err := zrok_edge_sdk.CreateShareServiceEdgeRouterPolicy(envZId, svcToken, svcZId, edge); err != nil { + if err := zrokEdgeSdk.CreateShareServiceEdgeRouterPolicy(envZId, svcToken, svcZId, edge); err != nil { return "", nil, err } diff --git a/controller/share_public.go b/controller/sharePublic.go similarity index 66% rename from controller/share_public.go rename to controller/sharePublic.go index aed58add..d399a484 100644 --- a/controller/share_public.go +++ b/controller/sharePublic.go @@ -1,7 +1,7 @@ package controller import ( - "github.com/openziti-test-kitchen/zrok/controller/zrok_edge_sdk" + "github.com/openziti-test-kitchen/zrok/controller/zrokEdgeSdk" "github.com/openziti-test-kitchen/zrok/model" "github.com/openziti-test-kitchen/zrok/rest_server_zrok/operations/service" "github.com/openziti/edge/rest_management_api_client" @@ -18,25 +18,25 @@ func (a *publicResourceAllocator) allocate(envZId, svcToken string, frontendZIds for _, authUser := range params.Body.AuthUsers { authUsers = append(authUsers, &model.AuthUser{authUser.Username, authUser.Password}) } - cfgId, err := zrok_edge_sdk.CreateConfig(zrokProxyConfigId, envZId, svcToken, params.Body.AuthScheme, authUsers, edge) + cfgId, err := zrokEdgeSdk.CreateConfig(zrokProxyConfigId, envZId, svcToken, params.Body.AuthScheme, authUsers, edge) if err != nil { return "", nil, err } - svcZId, err = zrok_edge_sdk.CreateShareService(envZId, svcToken, cfgId, edge) + svcZId, err = zrokEdgeSdk.CreateShareService(envZId, svcToken, cfgId, edge) if err != nil { return "", nil, err } - if err := zrok_edge_sdk.CreateServicePolicyBind(envZId, svcToken, svcZId, edge); err != nil { + if err := zrokEdgeSdk.CreateServicePolicyBind(envZId, svcToken, svcZId, edge); err != nil { return "", nil, err } - if err := zrok_edge_sdk.CreateServicePolicyDial(envZId, svcToken, svcZId, frontendZIds, edge); err != nil { + if err := zrokEdgeSdk.CreateServicePolicyDial(envZId, svcToken, svcZId, frontendZIds, edge); err != nil { return "", nil, err } - if err := zrok_edge_sdk.CreateShareServiceEdgeRouterPolicy(envZId, svcToken, svcZId, edge); err != nil { + if err := zrokEdgeSdk.CreateShareServiceEdgeRouterPolicy(envZId, svcToken, svcZId, edge); err != nil { return "", nil, err } diff --git a/controller/unaccess.go b/controller/unaccess.go index c7059358..3011ba2d 100644 --- a/controller/unaccess.go +++ b/controller/unaccess.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/go-openapi/runtime/middleware" "github.com/openziti-test-kitchen/zrok/controller/store" - "github.com/openziti-test-kitchen/zrok/controller/zrok_edge_sdk" + "github.com/openziti-test-kitchen/zrok/controller/zrokEdgeSdk" "github.com/openziti-test-kitchen/zrok/rest_model_zrok" "github.com/openziti-test-kitchen/zrok/rest_server_zrok/operations/service" "github.com/pkg/errors" @@ -70,7 +70,7 @@ func (h *unaccessHandler) Handle(params service.UnaccessParams, principal *rest_ return service.NewUnaccessNotFound() } - if err := zrok_edge_sdk.DeleteServicePolicy(envZId, fmt.Sprintf("tags.zrokServiceToken=\"%v\" and tags.zrokFrontendToken=\"%v\" and type=1", svcToken, feToken), edge); err != nil { + if err := zrokEdgeSdk.DeleteServicePolicy(envZId, fmt.Sprintf("tags.zrokServiceToken=\"%v\" and tags.zrokFrontendToken=\"%v\" and type=1", svcToken, feToken), edge); err != nil { logrus.Errorf("error removing access to '%v' for '%v': %v", svcToken, envZId, err) return service.NewUnaccessInternalServerError() } diff --git a/controller/unshare.go b/controller/unshare.go index efb3942f..b7f51ee4 100644 --- a/controller/unshare.go +++ b/controller/unshare.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/go-openapi/runtime/middleware" "github.com/openziti-test-kitchen/zrok/controller/store" - "github.com/openziti-test-kitchen/zrok/controller/zrok_edge_sdk" + "github.com/openziti-test-kitchen/zrok/controller/zrokEdgeSdk" "github.com/openziti-test-kitchen/zrok/rest_model_zrok" "github.com/openziti-test-kitchen/zrok/rest_server_zrok/operations/service" "github.com/openziti/edge/rest_management_api_client" @@ -123,19 +123,19 @@ func (h *unshareHandler) findServiceZId(svcToken string, edge *rest_management_a } func (h *unshareHandler) deallocateResources(senv *store.Environment, svcToken, svcZId string, edge *rest_management_api_client.ZitiEdgeManagement) error { - if err := zrok_edge_sdk.DeleteServiceEdgeRouterPolicy(senv.ZId, svcToken, edge); err != nil { + if err := zrokEdgeSdk.DeleteServiceEdgeRouterPolicy(senv.ZId, svcToken, edge); err != nil { return err } - if err := zrok_edge_sdk.DeleteServicePolicyDial(senv.ZId, svcToken, edge); err != nil { + if err := zrokEdgeSdk.DeleteServicePolicyDial(senv.ZId, svcToken, edge); err != nil { return err } - if err := zrok_edge_sdk.DeleteServicePolicyBind(senv.ZId, svcToken, edge); err != nil { + if err := zrokEdgeSdk.DeleteServicePolicyBind(senv.ZId, svcToken, edge); err != nil { return err } - if err := zrok_edge_sdk.DeleteConfig(senv.ZId, svcToken, edge); err != nil { + if err := zrokEdgeSdk.DeleteConfig(senv.ZId, svcToken, edge); err != nil { return err } - if err := zrok_edge_sdk.DeleteService(senv.ZId, svcZId, edge); err != nil { + if err := zrokEdgeSdk.DeleteService(senv.ZId, svcZId, edge); err != nil { return err } return nil diff --git a/controller/update_frontend.go b/controller/updateFrontend.go similarity index 100% rename from controller/update_frontend.go rename to controller/updateFrontend.go diff --git a/controller/update_share.go b/controller/updateShare.go similarity index 100% rename from controller/update_share.go rename to controller/updateShare.go diff --git a/controller/verify_email.go b/controller/verifyEmail.go similarity index 94% rename from controller/verify_email.go rename to controller/verifyEmail.go index 0e0d2fa2..995f5d35 100644 --- a/controller/verify_email.go +++ b/controller/verifyEmail.go @@ -2,7 +2,7 @@ package controller import ( "bytes" - "github.com/openziti-test-kitchen/zrok/controller/email_ui" + "github.com/openziti-test-kitchen/zrok/controller/emailUi" "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/wneessen/go-mail" @@ -63,7 +63,7 @@ func sendVerificationEmail(emailAddress, token string) error { } func mergeTemplate(emailData *verificationEmail, filename string) (string, error) { - t, err := template.ParseFS(email_ui.FS, filename) + t, err := template.ParseFS(emailUi.FS, filename) if err != nil { return "", errors.Wrapf(err, "error parsing verification email template '%v'", filename) } diff --git a/controller/zrok_edge_sdk/config.go b/controller/zrokEdgeSdk/config.go similarity index 99% rename from controller/zrok_edge_sdk/config.go rename to controller/zrokEdgeSdk/config.go index c3c96367..d2f52be8 100644 --- a/controller/zrok_edge_sdk/config.go +++ b/controller/zrokEdgeSdk/config.go @@ -1,4 +1,4 @@ -package zrok_edge_sdk +package zrokEdgeSdk import ( "context" diff --git a/controller/zrok_edge_sdk/erp.go b/controller/zrokEdgeSdk/erp.go similarity index 98% rename from controller/zrok_edge_sdk/erp.go rename to controller/zrokEdgeSdk/erp.go index f635600e..52744146 100644 --- a/controller/zrok_edge_sdk/erp.go +++ b/controller/zrokEdgeSdk/erp.go @@ -1,4 +1,4 @@ -package zrok_edge_sdk +package zrokEdgeSdk import ( "context" diff --git a/controller/zrok_edge_sdk/identity.go b/controller/zrokEdgeSdk/identity.go similarity index 99% rename from controller/zrok_edge_sdk/identity.go rename to controller/zrokEdgeSdk/identity.go index 6b0b2255..33bcaee0 100644 --- a/controller/zrok_edge_sdk/identity.go +++ b/controller/zrokEdgeSdk/identity.go @@ -1,4 +1,4 @@ -package zrok_edge_sdk +package zrokEdgeSdk import ( "context" diff --git a/controller/zrok_edge_sdk/serp.go b/controller/zrokEdgeSdk/serp.go similarity index 99% rename from controller/zrok_edge_sdk/serp.go rename to controller/zrokEdgeSdk/serp.go index bfc86e62..bf3e6966 100644 --- a/controller/zrok_edge_sdk/serp.go +++ b/controller/zrokEdgeSdk/serp.go @@ -1,4 +1,4 @@ -package zrok_edge_sdk +package zrokEdgeSdk import ( "context" diff --git a/controller/zrok_edge_sdk/service.go b/controller/zrokEdgeSdk/service.go similarity index 98% rename from controller/zrok_edge_sdk/service.go rename to controller/zrokEdgeSdk/service.go index 20f70abc..2614336e 100644 --- a/controller/zrok_edge_sdk/service.go +++ b/controller/zrokEdgeSdk/service.go @@ -1,4 +1,4 @@ -package zrok_edge_sdk +package zrokEdgeSdk import ( "context" diff --git a/controller/zrok_edge_sdk/sp.go b/controller/zrokEdgeSdk/sp.go similarity index 99% rename from controller/zrok_edge_sdk/sp.go rename to controller/zrokEdgeSdk/sp.go index b76d8cbe..88c060fd 100644 --- a/controller/zrok_edge_sdk/sp.go +++ b/controller/zrokEdgeSdk/sp.go @@ -1,4 +1,4 @@ -package zrok_edge_sdk +package zrokEdgeSdk import ( "context" diff --git a/controller/zrok_edge_sdk/tags.go b/controller/zrokEdgeSdk/tags.go similarity index 94% rename from controller/zrok_edge_sdk/tags.go rename to controller/zrokEdgeSdk/tags.go index e4d78fb3..54b49f3a 100644 --- a/controller/zrok_edge_sdk/tags.go +++ b/controller/zrokEdgeSdk/tags.go @@ -1,4 +1,4 @@ -package zrok_edge_sdk +package zrokEdgeSdk import ( "github.com/openziti-test-kitchen/zrok/build" diff --git a/endpoints/private_frontend/config.go b/endpoints/privateFrontend/config.go similarity index 89% rename from endpoints/private_frontend/config.go rename to endpoints/privateFrontend/config.go index 7d7aea3d..39d697eb 100644 --- a/endpoints/private_frontend/config.go +++ b/endpoints/privateFrontend/config.go @@ -1,4 +1,4 @@ -package private_frontend +package privateFrontend type Config struct { IdentityName string diff --git a/endpoints/private_frontend/http.go b/endpoints/privateFrontend/http.go similarity index 98% rename from endpoints/private_frontend/http.go rename to endpoints/privateFrontend/http.go index 317f0ef4..72d16ad7 100644 --- a/endpoints/private_frontend/http.go +++ b/endpoints/privateFrontend/http.go @@ -1,10 +1,10 @@ -package private_frontend +package privateFrontend import ( "context" "fmt" "github.com/openziti-test-kitchen/zrok/endpoints" - "github.com/openziti-test-kitchen/zrok/endpoints/public_frontend/notfound_ui" + "github.com/openziti-test-kitchen/zrok/endpoints/publicFrontend/notfound_ui" "github.com/openziti-test-kitchen/zrok/model" "github.com/openziti-test-kitchen/zrok/util" "github.com/openziti-test-kitchen/zrok/zrokdir" diff --git a/endpoints/proxy_backend/http.go b/endpoints/proxyBackend/http.go similarity index 99% rename from endpoints/proxy_backend/http.go rename to endpoints/proxyBackend/http.go index 46b44959..1e35b9c6 100644 --- a/endpoints/proxy_backend/http.go +++ b/endpoints/proxyBackend/http.go @@ -1,4 +1,4 @@ -package proxy_backend +package proxyBackend import ( "context" diff --git a/endpoints/proxy_backend/metricsconn.go b/endpoints/proxyBackend/metricsconn.go similarity index 97% rename from endpoints/proxy_backend/metricsconn.go rename to endpoints/proxyBackend/metricsconn.go index d1768da0..ba63b2d1 100644 --- a/endpoints/proxy_backend/metricsconn.go +++ b/endpoints/proxyBackend/metricsconn.go @@ -1,4 +1,4 @@ -package proxy_backend +package proxyBackend import ( "net" diff --git a/endpoints/public_frontend/config.go b/endpoints/publicFrontend/config.go similarity index 96% rename from endpoints/public_frontend/config.go rename to endpoints/publicFrontend/config.go index b2953cda..674a2674 100644 --- a/endpoints/public_frontend/config.go +++ b/endpoints/publicFrontend/config.go @@ -1,4 +1,4 @@ -package public_frontend +package publicFrontend import ( "github.com/michaelquigley/cf" diff --git a/endpoints/public_frontend/health_ui/embed.go b/endpoints/publicFrontend/health_ui/embed.go similarity index 100% rename from endpoints/public_frontend/health_ui/embed.go rename to endpoints/publicFrontend/health_ui/embed.go diff --git a/endpoints/public_frontend/health_ui/handler.go b/endpoints/publicFrontend/health_ui/handler.go similarity index 100% rename from endpoints/public_frontend/health_ui/handler.go rename to endpoints/publicFrontend/health_ui/handler.go diff --git a/endpoints/public_frontend/health_ui/index.html b/endpoints/publicFrontend/health_ui/index.html similarity index 100% rename from endpoints/public_frontend/health_ui/index.html rename to endpoints/publicFrontend/health_ui/index.html diff --git a/endpoints/public_frontend/http.go b/endpoints/publicFrontend/http.go similarity index 97% rename from endpoints/public_frontend/http.go rename to endpoints/publicFrontend/http.go index 4e05b1d6..578bf54c 100644 --- a/endpoints/public_frontend/http.go +++ b/endpoints/publicFrontend/http.go @@ -1,11 +1,11 @@ -package public_frontend +package publicFrontend import ( "context" "fmt" "github.com/openziti-test-kitchen/zrok/endpoints" - "github.com/openziti-test-kitchen/zrok/endpoints/public_frontend/health_ui" - "github.com/openziti-test-kitchen/zrok/endpoints/public_frontend/notfound_ui" + "github.com/openziti-test-kitchen/zrok/endpoints/publicFrontend/health_ui" + "github.com/openziti-test-kitchen/zrok/endpoints/publicFrontend/notfound_ui" "github.com/openziti-test-kitchen/zrok/model" "github.com/openziti-test-kitchen/zrok/util" "github.com/openziti-test-kitchen/zrok/zrokdir" diff --git a/endpoints/public_frontend/metrics.go b/endpoints/publicFrontend/metrics.go similarity index 99% rename from endpoints/public_frontend/metrics.go rename to endpoints/publicFrontend/metrics.go index 166ca825..53d0809c 100644 --- a/endpoints/public_frontend/metrics.go +++ b/endpoints/publicFrontend/metrics.go @@ -1,4 +1,4 @@ -package public_frontend +package publicFrontend import ( "github.com/openziti-test-kitchen/zrok/model" diff --git a/endpoints/public_frontend/metricsconn.go b/endpoints/publicFrontend/metricsconn.go similarity index 97% rename from endpoints/public_frontend/metricsconn.go rename to endpoints/publicFrontend/metricsconn.go index 49200f41..92fe5114 100644 --- a/endpoints/public_frontend/metricsconn.go +++ b/endpoints/publicFrontend/metricsconn.go @@ -1,4 +1,4 @@ -package public_frontend +package publicFrontend import ( "net" diff --git a/endpoints/public_frontend/notfound_ui/embed.go b/endpoints/publicFrontend/notfound_ui/embed.go similarity index 100% rename from endpoints/public_frontend/notfound_ui/embed.go rename to endpoints/publicFrontend/notfound_ui/embed.go diff --git a/endpoints/public_frontend/notfound_ui/handler.go b/endpoints/publicFrontend/notfound_ui/handler.go similarity index 100% rename from endpoints/public_frontend/notfound_ui/handler.go rename to endpoints/publicFrontend/notfound_ui/handler.go diff --git a/endpoints/public_frontend/notfound_ui/index.html b/endpoints/publicFrontend/notfound_ui/index.html similarity index 100% rename from endpoints/public_frontend/notfound_ui/index.html rename to endpoints/publicFrontend/notfound_ui/index.html diff --git a/endpoints/web_backend/web.go b/endpoints/webBackend/web.go similarity index 98% rename from endpoints/web_backend/web.go rename to endpoints/webBackend/web.go index 43edb4ba..151c158d 100644 --- a/endpoints/web_backend/web.go +++ b/endpoints/webBackend/web.go @@ -1,4 +1,4 @@ -package web_backend +package webBackend import ( "github.com/openziti/sdk-golang/ziti"