diff --git a/cmd/agent/main.go b/cmd/agent/main.go index 68e2837..4d541a8 100644 --- a/cmd/agent/main.go +++ b/cmd/agent/main.go @@ -5,7 +5,7 @@ import ( "forge.cadoles.com/Cadoles/emissary/internal/command" "forge.cadoles.com/Cadoles/emissary/internal/command/agent" - "forge.cadoles.com/Cadoles/emissary/internal/command/client" + "forge.cadoles.com/Cadoles/emissary/internal/command/api" ) // nolint: gochecknoglobals @@ -17,5 +17,5 @@ var ( ) func main() { - command.Main(BuildDate, ProjectVersion, GitRef, DefaultConfigPath, agent.Root(), client.Root()) + command.Main(BuildDate, ProjectVersion, GitRef, DefaultConfigPath, agent.Root(), api.Root()) } diff --git a/cmd/server/main.go b/cmd/server/main.go index 47b033b..553fc87 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -4,7 +4,7 @@ import ( "time" "forge.cadoles.com/Cadoles/emissary/internal/command" - "forge.cadoles.com/Cadoles/emissary/internal/command/client" + "forge.cadoles.com/Cadoles/emissary/internal/command/api" "forge.cadoles.com/Cadoles/emissary/internal/command/server" _ "github.com/jackc/pgx/v5/stdlib" @@ -20,5 +20,5 @@ var ( ) func main() { - command.Main(BuildDate, ProjectVersion, GitRef, DefaultConfigPath, server.Root(), client.Root()) + command.Main(BuildDate, ProjectVersion, GitRef, DefaultConfigPath, server.Root(), api.Root()) } diff --git a/internal/command/client/agent/count.go b/internal/command/api/agent/count.go similarity index 93% rename from internal/command/client/agent/count.go rename to internal/command/api/agent/count.go index b093866..12bc439 100644 --- a/internal/command/client/agent/count.go +++ b/internal/command/api/agent/count.go @@ -4,8 +4,8 @@ import ( "os" "forge.cadoles.com/Cadoles/emissary/internal/client" - "forge.cadoles.com/Cadoles/emissary/internal/command/client/apierr" - clientFlag "forge.cadoles.com/Cadoles/emissary/internal/command/client/flag" + "forge.cadoles.com/Cadoles/emissary/internal/command/api/apierr" + clientFlag "forge.cadoles.com/Cadoles/emissary/internal/command/api/flag" "forge.cadoles.com/Cadoles/emissary/internal/format" "github.com/pkg/errors" "github.com/urfave/cli/v2" diff --git a/internal/command/client/agent/flag/flag.go b/internal/command/api/agent/flag/flag.go similarity index 98% rename from internal/command/client/agent/flag/flag.go rename to internal/command/api/agent/flag/flag.go index ad48034..6ac3b9c 100644 --- a/internal/command/client/agent/flag/flag.go +++ b/internal/command/api/agent/flag/flag.go @@ -3,7 +3,7 @@ package flag import ( "errors" - clientFlag "forge.cadoles.com/Cadoles/emissary/internal/command/client/flag" + clientFlag "forge.cadoles.com/Cadoles/emissary/internal/command/api/flag" "forge.cadoles.com/Cadoles/emissary/internal/datastore" "github.com/urfave/cli/v2" ) diff --git a/internal/command/client/agent/get.go b/internal/command/api/agent/get.go similarity index 91% rename from internal/command/client/agent/get.go rename to internal/command/api/agent/get.go index 5c02934..5493200 100644 --- a/internal/command/client/agent/get.go +++ b/internal/command/api/agent/get.go @@ -4,9 +4,9 @@ import ( "os" "forge.cadoles.com/Cadoles/emissary/internal/client" - agentFlag "forge.cadoles.com/Cadoles/emissary/internal/command/client/agent/flag" - "forge.cadoles.com/Cadoles/emissary/internal/command/client/apierr" - clientFlag "forge.cadoles.com/Cadoles/emissary/internal/command/client/flag" + agentFlag "forge.cadoles.com/Cadoles/emissary/internal/command/api/agent/flag" + "forge.cadoles.com/Cadoles/emissary/internal/command/api/apierr" + clientFlag "forge.cadoles.com/Cadoles/emissary/internal/command/api/flag" "forge.cadoles.com/Cadoles/emissary/internal/format" "github.com/pkg/errors" "github.com/urfave/cli/v2" diff --git a/internal/command/client/agent/query.go b/internal/command/api/agent/query.go similarity index 92% rename from internal/command/client/agent/query.go rename to internal/command/api/agent/query.go index da02625..6f01ec5 100644 --- a/internal/command/client/agent/query.go +++ b/internal/command/api/agent/query.go @@ -4,8 +4,8 @@ import ( "os" "forge.cadoles.com/Cadoles/emissary/internal/client" - "forge.cadoles.com/Cadoles/emissary/internal/command/client/apierr" - clientFlag "forge.cadoles.com/Cadoles/emissary/internal/command/client/flag" + "forge.cadoles.com/Cadoles/emissary/internal/command/api/apierr" + clientFlag "forge.cadoles.com/Cadoles/emissary/internal/command/api/flag" "forge.cadoles.com/Cadoles/emissary/internal/format" "github.com/pkg/errors" "github.com/urfave/cli/v2" diff --git a/internal/command/client/agent/root.go b/internal/command/api/agent/root.go similarity index 79% rename from internal/command/client/agent/root.go rename to internal/command/api/agent/root.go index 9151c98..8b4b5df 100644 --- a/internal/command/client/agent/root.go +++ b/internal/command/api/agent/root.go @@ -1,7 +1,7 @@ package agent import ( - "forge.cadoles.com/Cadoles/emissary/internal/command/client/agent/spec" + "forge.cadoles.com/Cadoles/emissary/internal/command/api/agent/spec" "github.com/urfave/cli/v2" ) diff --git a/internal/command/client/agent/spec/get.go b/internal/command/api/agent/spec/get.go similarity index 92% rename from internal/command/client/agent/spec/get.go rename to internal/command/api/agent/spec/get.go index 8275e02..0d03693 100644 --- a/internal/command/client/agent/spec/get.go +++ b/internal/command/api/agent/spec/get.go @@ -4,9 +4,9 @@ import ( "os" "forge.cadoles.com/Cadoles/emissary/internal/client" - agentFlag "forge.cadoles.com/Cadoles/emissary/internal/command/client/agent/flag" - "forge.cadoles.com/Cadoles/emissary/internal/command/client/apierr" - clientFlag "forge.cadoles.com/Cadoles/emissary/internal/command/client/flag" + agentFlag "forge.cadoles.com/Cadoles/emissary/internal/command/api/agent/flag" + "forge.cadoles.com/Cadoles/emissary/internal/command/api/apierr" + clientFlag "forge.cadoles.com/Cadoles/emissary/internal/command/api/flag" "forge.cadoles.com/Cadoles/emissary/internal/format" "github.com/pkg/errors" "github.com/urfave/cli/v2" diff --git a/internal/command/client/agent/spec/root.go b/internal/command/api/agent/spec/root.go similarity index 100% rename from internal/command/client/agent/spec/root.go rename to internal/command/api/agent/spec/root.go diff --git a/internal/command/client/agent/spec/update.go b/internal/command/api/agent/spec/update.go similarity index 97% rename from internal/command/client/agent/spec/update.go rename to internal/command/api/agent/spec/update.go index 6b31b3f..b26e467 100644 --- a/internal/command/client/agent/spec/update.go +++ b/internal/command/api/agent/spec/update.go @@ -5,9 +5,9 @@ import ( "os" "forge.cadoles.com/Cadoles/emissary/internal/client" - agentFlag "forge.cadoles.com/Cadoles/emissary/internal/command/client/agent/flag" - "forge.cadoles.com/Cadoles/emissary/internal/command/client/apierr" - clientFlag "forge.cadoles.com/Cadoles/emissary/internal/command/client/flag" + agentFlag "forge.cadoles.com/Cadoles/emissary/internal/command/api/agent/flag" + "forge.cadoles.com/Cadoles/emissary/internal/command/api/apierr" + clientFlag "forge.cadoles.com/Cadoles/emissary/internal/command/api/flag" "forge.cadoles.com/Cadoles/emissary/internal/format" "forge.cadoles.com/Cadoles/emissary/internal/spec" jsonpatch "github.com/evanphx/json-patch/v5" diff --git a/internal/command/client/agent/update.go b/internal/command/api/agent/update.go similarity index 93% rename from internal/command/client/agent/update.go rename to internal/command/api/agent/update.go index 0083d92..9b87db4 100644 --- a/internal/command/client/agent/update.go +++ b/internal/command/api/agent/update.go @@ -4,9 +4,9 @@ import ( "os" "forge.cadoles.com/Cadoles/emissary/internal/client" - agentFlag "forge.cadoles.com/Cadoles/emissary/internal/command/client/agent/flag" - "forge.cadoles.com/Cadoles/emissary/internal/command/client/apierr" - clientFlag "forge.cadoles.com/Cadoles/emissary/internal/command/client/flag" + agentFlag "forge.cadoles.com/Cadoles/emissary/internal/command/api/agent/flag" + "forge.cadoles.com/Cadoles/emissary/internal/command/api/apierr" + clientFlag "forge.cadoles.com/Cadoles/emissary/internal/command/api/flag" "forge.cadoles.com/Cadoles/emissary/internal/format" "github.com/pkg/errors" "github.com/urfave/cli/v2" diff --git a/internal/command/client/agent/util.go b/internal/command/api/agent/util.go similarity index 100% rename from internal/command/client/agent/util.go rename to internal/command/api/agent/util.go diff --git a/internal/command/client/apierr/wrap.go b/internal/command/api/apierr/wrap.go similarity index 100% rename from internal/command/client/apierr/wrap.go rename to internal/command/api/apierr/wrap.go diff --git a/internal/command/client/flag/flag.go b/internal/command/api/flag/flag.go similarity index 100% rename from internal/command/client/flag/flag.go rename to internal/command/api/flag/flag.go diff --git a/internal/command/client/flag/util.go b/internal/command/api/flag/util.go similarity index 100% rename from internal/command/client/flag/util.go rename to internal/command/api/flag/util.go diff --git a/internal/command/client/root.go b/internal/command/api/root.go similarity index 67% rename from internal/command/client/root.go rename to internal/command/api/root.go index 148ae2d..ebcdb32 100644 --- a/internal/command/client/root.go +++ b/internal/command/api/root.go @@ -1,7 +1,7 @@ -package client +package api import ( - "forge.cadoles.com/Cadoles/emissary/internal/command/client/agent" + "forge.cadoles.com/Cadoles/emissary/internal/command/api/agent" "github.com/urfave/cli/v2" // Output format @@ -11,8 +11,8 @@ import ( func Root() *cli.Command { return &cli.Command{ - Name: "client", - Usage: "Client related commands", + Name: "api", + Usage: "API related commands", Subcommands: []*cli.Command{ agent.Root(), },