Skip to content

Commit

Permalink
endpoint subpackage naming cleanup (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelquigley committed Apr 10, 2023
1 parent e1d26c1 commit ec6ffa7
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions cmd/zrok/accessPrivate.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/go-openapi/runtime"
httptransport "github.com/go-openapi/runtime/client"
"github.com/openziti/zrok/endpoints"
"github.com/openziti/zrok/endpoints/privateFrontend"
"github.com/openziti/zrok/endpoints/proxyFrontend"
"github.com/openziti/zrok/rest_client_zrok"
"github.com/openziti/zrok/rest_client_zrok/share"
"github.com/openziti/zrok/rest_model_zrok"
Expand Down Expand Up @@ -85,7 +85,7 @@ func (cmd *accessPrivateCommand) run(_ *cobra.Command, args []string) {
}
logrus.Infof("allocated frontend '%v'", accessResp.Payload.FrontendToken)

cfg := privateFrontend.DefaultConfig("backend")
cfg := proxyFrontend.DefaultConfig("backend")
cfg.ShrToken = shrToken
cfg.Address = cmd.bindAddress
cfg.RequestsChan = make(chan *endpoints.Request, 1024)
Expand All @@ -98,7 +98,7 @@ func (cmd *accessPrivateCommand) run(_ *cobra.Command, args []string) {
os.Exit(0)
}()

frontend, err := privateFrontend.NewHTTP(cfg)
frontend, err := proxyFrontend.NewHTTP(cfg)
if err != nil {
if !panicInstead {
tui.Error("unable to create private frontend", err)
Expand Down
6 changes: 3 additions & 3 deletions cmd/zrok/accessPublic.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"fmt"
"github.com/michaelquigley/cf"
"github.com/openziti/zrok/endpoints/publicFrontend"
"github.com/openziti/zrok/endpoints/publicProxyFrontend"
"github.com/openziti/zrok/tui"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -33,7 +33,7 @@ func newAccessPublicCommand() *accessPublicCommand {
}

func (cmd *accessPublicCommand) run(_ *cobra.Command, args []string) {
cfg := publicFrontend.DefaultConfig()
cfg := publicProxyFrontend.DefaultConfig()
if len(args) == 1 {
if err := cfg.Load(args[0]); err != nil {
if !panicInstead {
Expand All @@ -43,7 +43,7 @@ func (cmd *accessPublicCommand) run(_ *cobra.Command, args []string) {
}
}
logrus.Infof(cf.Dump(cfg, cf.DefaultOptions()))
frontend, err := publicFrontend.NewHTTP(cfg)
frontend, err := publicProxyFrontend.NewHTTP(cfg)
if err != nil {
if !panicInstead {
tui.Error("unable to create http frontend", err)
Expand Down
4 changes: 2 additions & 2 deletions cmd/zrok/accessPublicValidate.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"fmt"
"github.com/michaelquigley/cf"
"github.com/openziti/zrok/endpoints/publicFrontend"
"github.com/openziti/zrok/endpoints/publicProxyFrontend"
"github.com/openziti/zrok/tui"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
Expand All @@ -29,7 +29,7 @@ func newAccessPublicValidateCommand() *accessPublicValidateCommand {
}

func (cmd *accessPublicValidateCommand) run(_ *cobra.Command, args []string) {
cfg := publicFrontend.DefaultConfig()
cfg := publicProxyFrontend.DefaultConfig()
if err := cfg.Load(args[0]); err != nil {
tui.Error(fmt.Sprintf("unable to load configuration '%v'", args[0]), err)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package privateFrontend
package proxyFrontend

import "github.com/openziti/zrok/endpoints"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package privateFrontend
package proxyFrontend

import (
"context"
"fmt"
"github.com/openziti/sdk-golang/ziti"
"github.com/openziti/sdk-golang/ziti/config"
"github.com/openziti/zrok/endpoints"
"github.com/openziti/zrok/endpoints/publicFrontend/notFoundUi"
"github.com/openziti/zrok/endpoints/publicProxyFrontend/notFoundUi"
"github.com/openziti/zrok/model"
"github.com/openziti/zrok/util"
"github.com/openziti/zrok/zrokdir"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package publicFrontend
package publicProxyFrontend

import (
"github.com/michaelquigley/cf"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package publicFrontend
package publicProxyFrontend

import (
"context"
"fmt"
"github.com/openziti/sdk-golang/ziti"
"github.com/openziti/sdk-golang/ziti/config"
"github.com/openziti/zrok/endpoints"
"github.com/openziti/zrok/endpoints/publicFrontend/healthUi"
"github.com/openziti/zrok/endpoints/publicFrontend/notFoundUi"
"github.com/openziti/zrok/endpoints/publicProxyFrontend/healthUi"
"github.com/openziti/zrok/endpoints/publicProxyFrontend/notFoundUi"
"github.com/openziti/zrok/model"
"github.com/openziti/zrok/util"
"github.com/openziti/zrok/zrokdir"
Expand Down

0 comments on commit ec6ffa7

Please sign in to comment.