diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2bd1b6c6c..4e8054699 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,7 +79,7 @@ jobs: org.opencontainers.image.vendor=ConduitIO - name: Build and push Docker image - uses: docker/build-push-action@v6.11.0 + uses: docker/build-push-action@v6.12.0 with: context: . push: true diff --git a/cmd/conduit/api/client.go b/cmd/conduit/api/client.go new file mode 100644 index 000000000..8bc1f058e --- /dev/null +++ b/cmd/conduit/api/client.go @@ -0,0 +1,68 @@ +// Copyright © 2025 Meroxa, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package api + +import ( + "context" + "fmt" + + apiv1 "github.com/conduitio/conduit/proto/api/v1" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + healthgrpc "google.golang.org/grpc/health/grpc_health_v1" +) + +type Client struct { + conn *grpc.ClientConn + apiv1.PipelineServiceClient + healthgrpc.HealthClient +} + +func NewClient(ctx context.Context, address string) (*Client, error) { + conn, err := grpc.NewClient( + address, + grpc.WithTransportCredentials(insecure.NewCredentials()), + ) + if err != nil { + return nil, fmt.Errorf("failed to create gRPC client: %w", err) + } + + client := &Client{ + conn: conn, + PipelineServiceClient: apiv1.NewPipelineServiceClient(conn), + HealthClient: healthgrpc.NewHealthClient(conn), + } + + if err := client.CheckHealth(ctx, address); err != nil { + client.Close() + return nil, err + } + + return client, nil +} + +func (c *Client) CheckHealth(ctx context.Context, address string) error { + healthResp, err := c.HealthClient.Check(ctx, &healthgrpc.HealthCheckRequest{}) + if err != nil || healthResp.Status != healthgrpc.HealthCheckResponse_SERVING { + return fmt.Errorf("we couldn't connect to Conduit at the configured address %q\n"+ + "Please execute `conduit run` to start it.\nTo check the current configured `api.grpc.address`, run `conduit config`\n\n"+ + "Error details: %v", address, err) + } + return nil +} + +func (c *Client) Close() error { + return c.conn.Close() +} diff --git a/cmd/conduit/cecdysis/decorators.go b/cmd/conduit/cecdysis/decorators.go new file mode 100644 index 000000000..fc090a097 --- /dev/null +++ b/cmd/conduit/cecdysis/decorators.go @@ -0,0 +1,106 @@ +// Copyright © 2025 Meroxa, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package cecdysis + +import ( + "context" + "fmt" + "os" + "path/filepath" + + "github.com/conduitio/conduit/cmd/conduit/api" + "github.com/conduitio/conduit/pkg/conduit" + "github.com/conduitio/ecdysis" + "github.com/spf13/cobra" +) + +// ------------------- CommandWithClient + +// CommandWithExecuteWithClient can be implemented by a command that requires a client to interact +// with the Conduit API during the execution. +type CommandWithExecuteWithClient interface { + ecdysis.Command + + // ExecuteWithClient is the actual work function. Most commands will implement this. + ExecuteWithClient(context.Context, *api.Client) error +} + +// CommandWithExecuteWithClientDecorator is a decorator that adds a Conduit API client to the command execution. +type CommandWithExecuteWithClientDecorator struct{} + +func (CommandWithExecuteWithClientDecorator) Decorate(_ *ecdysis.Ecdysis, cmd *cobra.Command, c ecdysis.Command) error { + v, ok := c.(CommandWithExecuteWithClient) + if !ok { + return nil + } + + old := cmd.RunE + cmd.RunE = func(cmd *cobra.Command, args []string) error { + if old != nil { + err := old(cmd, args) + if err != nil { + return err + } + } + + grpcAddress, err := getGRPCAddress(cmd) + if err != nil { + return fmt.Errorf("error reading gRPC address: %w", err) + } + + client, err := api.NewClient(cmd.Context(), grpcAddress) + if err != nil { + // Not an error we need to escalate to the main CLI execution. We'll print it out and not execute further. + _, _ = fmt.Fprintf(os.Stderr, "%v\n", err) + return nil + } + defer client.Close() + + ctx := ecdysis.ContextWithCobraCommand(cmd.Context(), cmd) + return v.ExecuteWithClient(ctx, client) + } + + return nil +} + +func getGRPCAddress(cmd *cobra.Command) (string, error) { + var ( + path string + err error + ) + + path, err = cmd.Flags().GetString("config.path") + if err != nil || path == "" { + path = conduit.DefaultConfig().ConduitCfg.Path + } + + var usrCfg conduit.Config + defaultConfigValues := conduit.DefaultConfigWithBasePath(filepath.Dir(path)) + + cfg := ecdysis.Config{ + EnvPrefix: "CONDUIT", + Parsed: &usrCfg, + Path: path, + DefaultValues: defaultConfigValues, + } + + // If it can't be parsed, we return the default value + err = ecdysis.ParseConfig(cfg, cmd) + if err != nil || usrCfg.API.GRPC.Address == "" { + return defaultConfigValues.API.GRPC.Address, nil + } + + return usrCfg.API.GRPC.Address, nil +} diff --git a/cmd/conduit/main.go b/cmd/conduit/main.go index 0a28295a6..55ccc53f0 100644 --- a/cmd/conduit/main.go +++ b/cmd/conduit/main.go @@ -18,12 +18,13 @@ import ( "fmt" "os" + "github.com/conduitio/conduit/cmd/conduit/cecdysis" "github.com/conduitio/conduit/cmd/conduit/root" "github.com/conduitio/ecdysis" ) func main() { - e := ecdysis.New() + e := ecdysis.New(ecdysis.WithDecorators(cecdysis.CommandWithExecuteWithClientDecorator{})) cmd := e.MustBuildCobraCommand(&root.RootCommand{}) cmd.CompletionOptions.DisableDefaultCmd = true diff --git a/cmd/conduit/root/pipelines/list.go b/cmd/conduit/root/pipelines/list.go new file mode 100644 index 000000000..4e794b019 --- /dev/null +++ b/cmd/conduit/root/pipelines/list.go @@ -0,0 +1,89 @@ +// Copyright © 2025 Meroxa, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pipelines + +import ( + "context" + "fmt" + + "github.com/alexeyco/simpletable" + "github.com/conduitio/conduit/cmd/conduit/api" + "github.com/conduitio/conduit/cmd/conduit/cecdysis" + apiv1 "github.com/conduitio/conduit/proto/api/v1" + "github.com/conduitio/ecdysis" +) + +var ( + _ cecdysis.CommandWithExecuteWithClient = (*ListCommand)(nil) + _ ecdysis.CommandWithAliases = (*ListCommand)(nil) + _ ecdysis.CommandWithDocs = (*ListCommand)(nil) +) + +type ListCommand struct{} + +func (c *ListCommand) Docs() ecdysis.Docs { + return ecdysis.Docs{ + Short: "List existing Conduit pipelines", + Long: `This command requires Conduit to be already running since it will list all pipelines registered +by Conduit. This will depend on the configured pipelines directory, which by default is /pipelines; however, it could +be configured via --pipelines.path at the time of running Conduit.`, + Example: "conduit pipelines ls", + } +} + +func (c *ListCommand) Aliases() []string { return []string{"ls"} } + +func (c *ListCommand) Usage() string { return "list" } + +func (c *ListCommand) ExecuteWithClient(ctx context.Context, client *api.Client) error { + resp, err := client.PipelineServiceClient.ListPipelines(ctx, &apiv1.ListPipelinesRequest{}) + if err != nil { + return fmt.Errorf("failed to list pipelines: %w", err) + } + + displayPipelines(resp.Pipelines) + + return nil +} + +func displayPipelines(pipelines []*apiv1.Pipeline) { + if len(pipelines) == 0 { + return + } + + table := simpletable.New() + + table.Header = &simpletable.Header{ + Cells: []*simpletable.Cell{ + {Align: simpletable.AlignCenter, Text: "ID"}, + {Align: simpletable.AlignCenter, Text: "STATE"}, + {Align: simpletable.AlignCenter, Text: "CREATED"}, + {Align: simpletable.AlignCenter, Text: "LAST_UPDATED"}, + }, + } + + for _, p := range pipelines { + r := []*simpletable.Cell{ + {Align: simpletable.AlignRight, Text: p.Id}, + {Align: simpletable.AlignLeft, Text: p.State.Status.String()}, + {Align: simpletable.AlignLeft, Text: p.CreatedAt.AsTime().String()}, + {Align: simpletable.AlignLeft, Text: p.UpdatedAt.AsTime().String()}, + } + + table.Body.Cells = append(table.Body.Cells, r) + } + table.SetStyle(simpletable.StyleCompact) + fmt.Println(table.String()) +} diff --git a/cmd/conduit/root/pipelines/pipelines.go b/cmd/conduit/root/pipelines/pipelines.go index 62dbcc91d..0ae75ea5f 100644 --- a/cmd/conduit/root/pipelines/pipelines.go +++ b/cmd/conduit/root/pipelines/pipelines.go @@ -21,13 +21,17 @@ import ( var ( _ ecdysis.CommandWithDocs = (*PipelinesCommand)(nil) _ ecdysis.CommandWithSubCommands = (*PipelinesCommand)(nil) + _ ecdysis.CommandWithAliases = (*PipelinesCommand)(nil) ) type PipelinesCommand struct{} +func (c *PipelinesCommand) Aliases() []string { return []string{"pipeline"} } + func (c *PipelinesCommand) SubCommands() []ecdysis.Command { return []ecdysis.Command{ &InitCommand{}, + &ListCommand{}, } } diff --git a/cmd/conduit/root/root.go b/cmd/conduit/root/root.go index d3cd49a06..ecfa2dd0f 100644 --- a/cmd/conduit/root/root.go +++ b/cmd/conduit/root/root.go @@ -37,6 +37,10 @@ var ( type RootFlags struct { Version bool `long:"version" short:"v" usage:"show the current Conduit version"` + + // Global Flags + GRPCAddress string `long:"api.grpc.address" usage:"address where Conduit is running" persistent:"true"` + ConfigPath string `long:"config.path" usage:"path to the configuration file" persistent:"true"` } type RootCommand struct { @@ -77,6 +81,6 @@ func (c *RootCommand) SubCommands() []ecdysis.Command { &initialize.InitCommand{Cfg: &runCmd.Cfg}, &version.VersionCommand{}, &pipelines.PipelinesCommand{}, - &run.RunCommand{}, + runCmd, } } diff --git a/cmd/conduit/root/root_test.go b/cmd/conduit/root/root_test.go index 7188667ea..e522b1919 100644 --- a/cmd/conduit/root/root_test.go +++ b/cmd/conduit/root/root_test.go @@ -32,6 +32,8 @@ func TestRootCommandFlags(t *testing.T) { persistent bool }{ {longName: "version", shortName: "v", usage: "show the current Conduit version"}, + {longName: "api.grpc.address", usage: "address where Conduit is running", persistent: true}, + {longName: "config.path", usage: "path to the configuration file", persistent: true}, } e := ecdysis.New() diff --git a/cmd/conduit/root/run/run.go b/cmd/conduit/root/run/run.go index d3836d509..732c465de 100644 --- a/cmd/conduit/root/run/run.go +++ b/cmd/conduit/root/run/run.go @@ -16,6 +16,7 @@ package run import ( "context" + "fmt" "os" "path/filepath" @@ -42,6 +43,12 @@ type RunCommand struct { func (c *RunCommand) Execute(_ context.Context) error { e := &conduit.Entrypoint{} + + if !c.Cfg.API.Enabled { + fmt.Print("Warning: API is currently disabled. Most Conduit CLI commands won't work without the API enabled." + + "To enable it, run conduit with `--api.enabled=true` or set `CONDUIT_API_ENABLED=true` in your environment.") + } + e.Serve(c.Cfg) return nil } diff --git a/go.mod b/go.mod index f4005e909..2085141c3 100644 --- a/go.mod +++ b/go.mod @@ -3,9 +3,10 @@ module github.com/conduitio/conduit go 1.23.2 require ( - buf.build/gen/go/grpc-ecosystem/grpc-gateway/protocolbuffers/go v1.36.2-20241220201140-4c5ba75caaf8.1 + buf.build/gen/go/grpc-ecosystem/grpc-gateway/protocolbuffers/go v1.36.3-20241220201140-4c5ba75caaf8.1 github.com/Masterminds/semver/v3 v3.3.1 github.com/Masterminds/sprig/v3 v3.3.0 + github.com/alexeyco/simpletable v1.0.0 github.com/bufbuild/buf v1.49.0 github.com/conduitio/conduit-commons v0.5.0 github.com/conduitio/conduit-connector-file v0.9.0 @@ -18,7 +19,7 @@ require ( github.com/conduitio/conduit-connector-sdk v0.12.0 github.com/conduitio/conduit-processor-sdk v0.4.0 github.com/conduitio/conduit-schema-registry v0.2.2 - github.com/conduitio/ecdysis v0.1.0 + github.com/conduitio/ecdysis v0.2.0 github.com/conduitio/yaml/v3 v3.3.0 github.com/dop251/goja v0.0.0-20240806095544-3491d4a58fbe github.com/dop251/goja_nodejs v0.0.0-20231122114759-e84d9a924c5c @@ -40,6 +41,7 @@ require ( github.com/prometheus/common v0.61.0 github.com/rs/zerolog v1.33.0 github.com/sourcegraph/conc v0.3.0 + github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 github.com/stealthrocket/wazergo v0.19.1 github.com/tetratelabs/wazero v1.8.2 @@ -51,7 +53,7 @@ require ( golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 google.golang.org/genproto/googleapis/api v0.0.0-20250102185135-69823020774d google.golang.org/grpc v1.69.4 - google.golang.org/protobuf v1.36.2 + google.golang.org/protobuf v1.36.3 gopkg.in/tomb.v2 v2.0.0-20161208151619-d5d1b5820637 mvdan.cc/gofumpt v0.7.0 ) @@ -322,7 +324,6 @@ require ( github.com/sourcegraph/go-diff v0.7.0 // indirect github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.7.0 // indirect - github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/viper v1.19.0 // indirect github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect github.com/stbenjam/no-sprintf-host-port v0.2.0 // indirect diff --git a/go.sum b/go.sum index 09643f959..639d90ff9 100644 --- a/go.sum +++ b/go.sum @@ -10,8 +10,8 @@ buf.build/gen/go/bufbuild/registry/connectrpc/go v1.17.0-20241227185654-946b6dd3 buf.build/gen/go/bufbuild/registry/connectrpc/go v1.17.0-20241227185654-946b6dd39b27.1/go.mod h1:i4UUrB1UIqScCCj4d+OFXpUREDDz+p1gCl9WfjpYweY= buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.36.1-20241227185654-946b6dd39b27.1 h1:5vU2X68XNaJtF/NGS9shI/0X0jze8/5XH4RmHbsZg5w= buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.36.1-20241227185654-946b6dd39b27.1/go.mod h1:DgqZjUk2avpwh8jiMHBOoVXUyceQ3HxNwcRLEWWwNtQ= -buf.build/gen/go/grpc-ecosystem/grpc-gateway/protocolbuffers/go v1.36.2-20241220201140-4c5ba75caaf8.1 h1:AjyYh6i8bsmef6OIvSK+7K5ZwkzBQxgVPb4F+zhRSOA= -buf.build/gen/go/grpc-ecosystem/grpc-gateway/protocolbuffers/go v1.36.2-20241220201140-4c5ba75caaf8.1/go.mod h1:hTOBKINwGHfMDBYzf2rUhU43p7h+ySnNrgEDmT+iOQY= +buf.build/gen/go/grpc-ecosystem/grpc-gateway/protocolbuffers/go v1.36.3-20241220201140-4c5ba75caaf8.1 h1:RU6Tdw90Mp9V22gZ9PhS8iVZhBpIwaf1TQymQHDOup8= +buf.build/gen/go/grpc-ecosystem/grpc-gateway/protocolbuffers/go v1.36.3-20241220201140-4c5ba75caaf8.1/go.mod h1:lj8jQgUNbzquh7gWCY4N1zGhM3zACtExgV2KDh/yxJE= buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.36.1-20241007202033-cf42259fcbfc.1 h1:0Pi0EQh6z2zJigi4UonoqczBQjvOzZ0CFYUfwPRM41M= buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.36.1-20241007202033-cf42259fcbfc.1/go.mod h1:Uy8SKofLXIAUjswDmz6AIN8W+bGVTF4kNczZikMPHLM= buf.build/go/bufplugin v0.6.0 h1:3lhoh+0z+IUPS3ZajTPn/27LaLIkero2BDVnV7yXD1s= @@ -102,6 +102,8 @@ github.com/alecthomas/go-check-sumtype v0.3.1 h1:u9aUvbGINJxLVXiFvHUlPEaD7VDULsr github.com/alecthomas/go-check-sumtype v0.3.1/go.mod h1:A8TSiN3UPRw3laIgWEUOHHLPa6/r9MtoigdlP5h3K/E= github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc= github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= +github.com/alexeyco/simpletable v1.0.0 h1:ZQ+LvJ4bmoeHb+dclF64d0LX+7QAi7awsfCrptZrpHk= +github.com/alexeyco/simpletable v1.0.0/go.mod h1:VJWVTtGUnW7EKbMRH8cE13SigKGx/1fO2SeeOiGeBkk= github.com/alexkohler/nakedret/v2 v2.0.5 h1:fP5qLgtwbx9EJE8dGEERT02YwS8En4r9nnZ71RK+EVU= github.com/alexkohler/nakedret/v2 v2.0.5/go.mod h1:bF5i0zF2Wo2o4X4USt9ntUWve6JbFv02Ff4vlkmS/VU= github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw= @@ -244,8 +246,8 @@ github.com/conduitio/conduit-processor-sdk v0.4.0 h1:wF1Fj31aneNixNbW5rJ0/5Q3vwW github.com/conduitio/conduit-processor-sdk v0.4.0/go.mod h1:Jj9ZBTee7nO0XeociDxe9gSvLFN1GbPWP1Aj04DPeZQ= github.com/conduitio/conduit-schema-registry v0.2.2 h1:Q0uL8egRAzJlRV7Ed5nEcqZ1yE/UQeZJad3VmhgTSFE= github.com/conduitio/conduit-schema-registry v0.2.2/go.mod h1:EmT4ylkz15LYddL6qU4wDX52n1Yp0aHvEDRIWOYYzFs= -github.com/conduitio/ecdysis v0.1.0 h1:BahTI+mqGPR3WyIBytYJjpz2naC8AOetaeUg4IARQfY= -github.com/conduitio/ecdysis v0.1.0/go.mod h1:CRQ3QxTsu/hhFepToP8InsBltZMfGIncbWvUNnNJSC4= +github.com/conduitio/ecdysis v0.2.0 h1:sH1rc5icJBzwUU51yYMMFfcOez0bSeEpmJ+NrmYpU/8= +github.com/conduitio/ecdysis v0.2.0/go.mod h1:CRQ3QxTsu/hhFepToP8InsBltZMfGIncbWvUNnNJSC4= github.com/conduitio/yaml/v3 v3.3.0 h1:kbbaOSHcuH39gP4+rgbJGl6DSbLZcJgEaBvkEXJlCsI= github.com/conduitio/yaml/v3 v3.3.0/go.mod h1:JNgFMOX1t8W4YJuRZOh6GggVtSMsgP9XgTw+7dIenpc= github.com/containerd/cgroups/v3 v3.0.5 h1:44na7Ud+VwyE7LIoJ8JTNQOa549a8543BmzaJHo6Bzo= @@ -645,6 +647,7 @@ github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mgechev/revive v1.5.1 h1:hE+QPeq0/wIzJwOphdVyUJ82njdd8Khp4fUIHGZHW3M= @@ -773,6 +776,7 @@ github.com/raeperd/recvcheck v0.2.0 h1:GnU+NsbiCqdC2XX5+vMZzP+jAJC5fht7rcVTAhX74 github.com/raeperd/recvcheck v0.2.0/go.mod h1:n04eYkwIR0JbgD73wT8wL4JjPC3wm0nFtzBnWNocnYU= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= @@ -1286,8 +1290,8 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.36.2 h1:R8FeyR1/eLmkutZOM5CWghmo5itiG9z0ktFlTVLuTmU= -google.golang.org/protobuf v1.36.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.3 h1:82DV7MYdb8anAVi3qge1wSnMDrnKK7ebr+I0hHRN1BU= +google.golang.org/protobuf v1.36.3/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/pkg/conduit/config.go b/pkg/conduit/config.go index fcdaabc55..6fa8fe92c 100644 --- a/pkg/conduit/config.go +++ b/pkg/conduit/config.go @@ -39,50 +39,48 @@ const ( SchemaRegistryTypeBuiltin = "builtin" ) -type ConfigDB struct { - // When Driver is specified it takes precedence over other DB related - // fields. - Driver database.DB - - Type string `long:"db.type" usage:"database type; accepts badger,postgres,inmemory,sqlite"` - Badger struct { - Path string `long:"db.badger.path" usage:"path to badger DB"` - } - Postgres struct { - ConnectionString string `long:"db.postgres.connection-string" usage:"postgres connection string, may be a database URL or in PostgreSQL keyword/value format"` - Table string `long:"db.postgres.table" usage:"postgres table in which to store data (will be created if it does not exist)"` - } - SQLite struct { - Path string `long:"db.sqlite.path" usage:"path to sqlite3 DB"` - Table string `long:"db.sqlite.table" usage:"sqlite3 table in which to store data (will be created if it does not exist)"` - } -} - -type ConfigAPI struct { - Enabled bool `long:"api.enabled" usage:"enable HTTP and gRPC API"` - HTTP struct { - Address string `long:"api.http.address" usage:"address for serving the HTTP API"` - } - GRPC struct { - Address string `long:"api.grpc.address" usage:"address for serving the gRPC API"` - } -} - -type ConfigLog struct { - NewLogger func(level, format string) log.CtxLogger - Level string `long:"log.level" usage:"sets logging level; accepts debug, info, warn, error, trace"` - Format string `long:"log.format" usage:"sets the format of the logging; accepts json, cli"` -} - // Config holds all configurable values for Conduit. type Config struct { ConduitCfg struct { Path string `long:"config.path" usage:"global conduit configuration file" default:"./conduit.yaml"` } `mapstructure:"config"` - DB ConfigDB - API ConfigAPI - Log ConfigLog + DB struct { + // When Driver is specified it takes precedence over other DB related + // fields. + Driver database.DB + + Type string `long:"db.type" usage:"database type; accepts badger,postgres,inmemory,sqlite"` + Badger struct { + Path string `long:"db.badger.path" usage:"path to badger DB"` + } + Postgres struct { + ConnectionString string `long:"db.postgres.connection-string" usage:"postgres connection string, may be a database URL or in PostgreSQL keyword/value format"` + Table string `long:"db.postgres.table" usage:"postgres table in which to store data (will be created if it does not exist)"` + } + SQLite struct { + Path string `long:"db.sqlite.path" usage:"path to sqlite3 DB"` + Table string `long:"db.sqlite.table" usage:"sqlite3 table in which to store data (will be created if it does not exist)"` + } + } + + API struct { + Enabled bool `long:"api.enabled" usage:"enable HTTP and gRPC API"` + HTTP struct { + Address string `long:"api.http.address" usage:"address for serving the HTTP API"` + } + GRPC struct { + // This is the address where the gRPC API will be served which is shared as a global flag + // for the Conduit CLI. + Address string `long:"api.grpc.address" usage:"address for serving the gRPC API"` + } + } + + Log struct { + NewLogger func(level, format string) log.CtxLogger + Level string `long:"log.level" usage:"sets logging level; accepts debug, info, warn, error, trace"` + Format string `long:"log.format" usage:"sets the format of the logging; accepts json, cli"` + } Connectors struct { Path string `long:"connectors.path" usage:"path to standalone connectors' directory"` diff --git a/pkg/conduit/runtime.go b/pkg/conduit/runtime.go index 2b19d5416..849e04508 100644 --- a/pkg/conduit/runtime.go +++ b/pkg/conduit/runtime.go @@ -45,6 +45,8 @@ import ( "github.com/conduitio/conduit/pkg/foundation/metrics" "github.com/conduitio/conduit/pkg/foundation/metrics/measure" "github.com/conduitio/conduit/pkg/foundation/metrics/prometheus" + "github.com/conduitio/conduit/pkg/http/api" + "github.com/conduitio/conduit/pkg/http/openapi" "github.com/conduitio/conduit/pkg/lifecycle" lifecycle_v2 "github.com/conduitio/conduit/pkg/lifecycle-poc" "github.com/conduitio/conduit/pkg/orchestrator" @@ -60,8 +62,6 @@ import ( "github.com/conduitio/conduit/pkg/processor" "github.com/conduitio/conduit/pkg/provisioning" "github.com/conduitio/conduit/pkg/schemaregistry" - "github.com/conduitio/conduit/pkg/web/api" - "github.com/conduitio/conduit/pkg/web/openapi" apiv1 "github.com/conduitio/conduit/proto/api/v1" grpcruntime "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/piotrkowalczuk/promgrpc/v4" diff --git a/pkg/web/api/connector_v1.go b/pkg/http/api/connector_v1.go similarity index 97% rename from pkg/web/api/connector_v1.go rename to pkg/http/api/connector_v1.go index 2a4dde881..50e2f6c45 100644 --- a/pkg/web/api/connector_v1.go +++ b/pkg/http/api/connector_v1.go @@ -26,10 +26,10 @@ import ( "github.com/conduitio/conduit-connector-protocol/pconnector" "github.com/conduitio/conduit/pkg/connector" "github.com/conduitio/conduit/pkg/foundation/cerrors" + "github.com/conduitio/conduit/pkg/http/api/fromproto" + "github.com/conduitio/conduit/pkg/http/api/status" + "github.com/conduitio/conduit/pkg/http/api/toproto" "github.com/conduitio/conduit/pkg/inspector" - "github.com/conduitio/conduit/pkg/web/api/fromproto" - "github.com/conduitio/conduit/pkg/web/api/status" - "github.com/conduitio/conduit/pkg/web/api/toproto" apiv1 "github.com/conduitio/conduit/proto/api/v1" "google.golang.org/grpc" ) diff --git a/pkg/web/api/connector_v1_test.go b/pkg/http/api/connector_v1_test.go similarity index 99% rename from pkg/web/api/connector_v1_test.go rename to pkg/http/api/connector_v1_test.go index 3a4a54db8..c74fe9312 100644 --- a/pkg/web/api/connector_v1_test.go +++ b/pkg/http/api/connector_v1_test.go @@ -28,9 +28,9 @@ import ( "github.com/conduitio/conduit/pkg/connector" "github.com/conduitio/conduit/pkg/foundation/cerrors" "github.com/conduitio/conduit/pkg/foundation/log" + apimock "github.com/conduitio/conduit/pkg/http/api/mock" + "github.com/conduitio/conduit/pkg/http/api/toproto" "github.com/conduitio/conduit/pkg/inspector" - apimock "github.com/conduitio/conduit/pkg/web/api/mock" - "github.com/conduitio/conduit/pkg/web/api/toproto" apiv1 "github.com/conduitio/conduit/proto/api/v1" "github.com/google/uuid" "github.com/matryer/is" diff --git a/pkg/web/api/fromproto/connector.go b/pkg/http/api/fromproto/connector.go similarity index 100% rename from pkg/web/api/fromproto/connector.go rename to pkg/http/api/fromproto/connector.go diff --git a/pkg/web/api/fromproto/connector_test.go b/pkg/http/api/fromproto/connector_test.go similarity index 100% rename from pkg/web/api/fromproto/connector_test.go rename to pkg/http/api/fromproto/connector_test.go diff --git a/pkg/web/api/fromproto/pipeline.go b/pkg/http/api/fromproto/pipeline.go similarity index 100% rename from pkg/web/api/fromproto/pipeline.go rename to pkg/http/api/fromproto/pipeline.go diff --git a/pkg/web/api/fromproto/processor.go b/pkg/http/api/fromproto/processor.go similarity index 100% rename from pkg/web/api/fromproto/processor.go rename to pkg/http/api/fromproto/processor.go diff --git a/pkg/web/api/health_server.go b/pkg/http/api/health_server.go similarity index 100% rename from pkg/web/api/health_server.go rename to pkg/http/api/health_server.go diff --git a/pkg/web/api/health_server_test.go b/pkg/http/api/health_server_test.go similarity index 100% rename from pkg/web/api/health_server_test.go rename to pkg/http/api/health_server_test.go diff --git a/pkg/web/api/info.go b/pkg/http/api/info.go similarity index 100% rename from pkg/web/api/info.go rename to pkg/http/api/info.go diff --git a/pkg/web/api/mock/connector.go b/pkg/http/api/mock/connector.go similarity index 99% rename from pkg/web/api/mock/connector.go rename to pkg/http/api/mock/connector.go index a8e18b688..b95cfe699 100644 --- a/pkg/web/api/mock/connector.go +++ b/pkg/http/api/mock/connector.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/conduitio/conduit/pkg/web/api (interfaces: ConnectorOrchestrator) +// Source: github.com/conduitio/conduit/pkg/http/api (interfaces: ConnectorOrchestrator) // // Generated by this command: // diff --git a/pkg/web/api/mock/connector_plugin.go b/pkg/http/api/mock/connector_plugin.go similarity index 96% rename from pkg/web/api/mock/connector_plugin.go rename to pkg/http/api/mock/connector_plugin.go index b378b8756..3fde300e4 100644 --- a/pkg/web/api/mock/connector_plugin.go +++ b/pkg/http/api/mock/connector_plugin.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/conduitio/conduit/pkg/web/api (interfaces: ConnectorPluginOrchestrator) +// Source: github.com/conduitio/conduit/pkg/http/api (interfaces: ConnectorPluginOrchestrator) // // Generated by this command: // diff --git a/pkg/web/api/mock/connector_service.go b/pkg/http/api/mock/connector_service.go similarity index 100% rename from pkg/web/api/mock/connector_service.go rename to pkg/http/api/mock/connector_service.go diff --git a/pkg/web/api/mock/pipeline.go b/pkg/http/api/mock/pipeline.go similarity index 99% rename from pkg/web/api/mock/pipeline.go rename to pkg/http/api/mock/pipeline.go index 12d8b78cf..67bc7282e 100644 --- a/pkg/web/api/mock/pipeline.go +++ b/pkg/http/api/mock/pipeline.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/conduitio/conduit/pkg/web/api (interfaces: PipelineOrchestrator) +// Source: github.com/conduitio/conduit/pkg/http/api (interfaces: PipelineOrchestrator) // // Generated by this command: // diff --git a/pkg/web/api/mock/processor.go b/pkg/http/api/mock/processor.go similarity index 99% rename from pkg/web/api/mock/processor.go rename to pkg/http/api/mock/processor.go index 7e1fa50c1..4bbb58e0e 100644 --- a/pkg/web/api/mock/processor.go +++ b/pkg/http/api/mock/processor.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/conduitio/conduit/pkg/web/api (interfaces: ProcessorOrchestrator) +// Source: github.com/conduitio/conduit/pkg/http/api (interfaces: ProcessorOrchestrator) // // Generated by this command: // diff --git a/pkg/web/api/mock/processor_plugin.go b/pkg/http/api/mock/processor_plugin.go similarity index 96% rename from pkg/web/api/mock/processor_plugin.go rename to pkg/http/api/mock/processor_plugin.go index 8f1d52de3..7b0e20066 100644 --- a/pkg/web/api/mock/processor_plugin.go +++ b/pkg/http/api/mock/processor_plugin.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/conduitio/conduit/pkg/web/api (interfaces: ProcessorPluginOrchestrator) +// Source: github.com/conduitio/conduit/pkg/http/api (interfaces: ProcessorPluginOrchestrator) // // Generated by this command: // diff --git a/pkg/web/api/mock/processor_service_in.go b/pkg/http/api/mock/processor_service_in.go similarity index 100% rename from pkg/web/api/mock/processor_service_in.go rename to pkg/http/api/mock/processor_service_in.go diff --git a/pkg/web/api/mock/processor_service_out.go b/pkg/http/api/mock/processor_service_out.go similarity index 100% rename from pkg/web/api/mock/processor_service_out.go rename to pkg/http/api/mock/processor_service_out.go diff --git a/pkg/web/api/pipeline_v1.go b/pkg/http/api/pipeline_v1.go similarity index 97% rename from pkg/web/api/pipeline_v1.go rename to pkg/http/api/pipeline_v1.go index e0719cced..9521f2155 100644 --- a/pkg/web/api/pipeline_v1.go +++ b/pkg/http/api/pipeline_v1.go @@ -21,10 +21,10 @@ import ( "regexp" "github.com/conduitio/conduit/pkg/foundation/cerrors" + "github.com/conduitio/conduit/pkg/http/api/fromproto" + "github.com/conduitio/conduit/pkg/http/api/status" + "github.com/conduitio/conduit/pkg/http/api/toproto" "github.com/conduitio/conduit/pkg/pipeline" - "github.com/conduitio/conduit/pkg/web/api/fromproto" - "github.com/conduitio/conduit/pkg/web/api/status" - "github.com/conduitio/conduit/pkg/web/api/toproto" apiv1 "github.com/conduitio/conduit/proto/api/v1" "google.golang.org/grpc" ) diff --git a/pkg/web/api/pipeline_v1_test.go b/pkg/http/api/pipeline_v1_test.go similarity index 98% rename from pkg/web/api/pipeline_v1_test.go rename to pkg/http/api/pipeline_v1_test.go index 64c3fd060..5924dc230 100644 --- a/pkg/web/api/pipeline_v1_test.go +++ b/pkg/http/api/pipeline_v1_test.go @@ -19,8 +19,8 @@ import ( "sort" "testing" + "github.com/conduitio/conduit/pkg/http/api/mock" "github.com/conduitio/conduit/pkg/pipeline" - "github.com/conduitio/conduit/pkg/web/api/mock" apiv1 "github.com/conduitio/conduit/proto/api/v1" "github.com/google/uuid" "github.com/matryer/is" diff --git a/pkg/web/api/plugin_v1.go b/pkg/http/api/plugin_v1.go similarity index 95% rename from pkg/web/api/plugin_v1.go rename to pkg/http/api/plugin_v1.go index cbbd4af7b..f1b99fcde 100644 --- a/pkg/web/api/plugin_v1.go +++ b/pkg/http/api/plugin_v1.go @@ -19,8 +19,8 @@ import ( "regexp" "github.com/conduitio/conduit/pkg/foundation/cerrors" - "github.com/conduitio/conduit/pkg/web/api/status" - "github.com/conduitio/conduit/pkg/web/api/toproto" + "github.com/conduitio/conduit/pkg/http/api/status" + "github.com/conduitio/conduit/pkg/http/api/toproto" apiv1 "github.com/conduitio/conduit/proto/api/v1" "google.golang.org/grpc" ) diff --git a/pkg/web/api/plugin_v1_test.go b/pkg/http/api/plugin_v1_test.go similarity index 96% rename from pkg/web/api/plugin_v1_test.go rename to pkg/http/api/plugin_v1_test.go index e2e5e2a7e..9d0784151 100644 --- a/pkg/web/api/plugin_v1_test.go +++ b/pkg/http/api/plugin_v1_test.go @@ -21,8 +21,8 @@ import ( "github.com/conduitio/conduit-commons/config" "github.com/conduitio/conduit-connector-protocol/pconnector" - "github.com/conduitio/conduit/pkg/web/api/mock" - "github.com/conduitio/conduit/pkg/web/api/toproto" + "github.com/conduitio/conduit/pkg/http/api/mock" + "github.com/conduitio/conduit/pkg/http/api/toproto" apiv1 "github.com/conduitio/conduit/proto/api/v1" "github.com/matryer/is" "go.uber.org/mock/gomock" diff --git a/pkg/web/api/processor_v1.go b/pkg/http/api/processor_v1.go similarity index 98% rename from pkg/web/api/processor_v1.go rename to pkg/http/api/processor_v1.go index 6a1985723..ff0d5af9e 100644 --- a/pkg/web/api/processor_v1.go +++ b/pkg/http/api/processor_v1.go @@ -27,11 +27,11 @@ import ( opencdcv1 "github.com/conduitio/conduit-commons/proto/opencdc/v1" processorSdk "github.com/conduitio/conduit-processor-sdk" "github.com/conduitio/conduit/pkg/foundation/cerrors" + "github.com/conduitio/conduit/pkg/http/api/fromproto" + "github.com/conduitio/conduit/pkg/http/api/status" + "github.com/conduitio/conduit/pkg/http/api/toproto" "github.com/conduitio/conduit/pkg/inspector" "github.com/conduitio/conduit/pkg/processor" - "github.com/conduitio/conduit/pkg/web/api/fromproto" - "github.com/conduitio/conduit/pkg/web/api/status" - "github.com/conduitio/conduit/pkg/web/api/toproto" apiv1 "github.com/conduitio/conduit/proto/api/v1" "google.golang.org/grpc" ) diff --git a/pkg/web/api/processor_v1_test.go b/pkg/http/api/processor_v1_test.go similarity index 99% rename from pkg/web/api/processor_v1_test.go rename to pkg/http/api/processor_v1_test.go index bddcfbc6d..36afe5a99 100644 --- a/pkg/web/api/processor_v1_test.go +++ b/pkg/http/api/processor_v1_test.go @@ -27,10 +27,10 @@ import ( processorSdk "github.com/conduitio/conduit-processor-sdk" "github.com/conduitio/conduit/pkg/foundation/cerrors" "github.com/conduitio/conduit/pkg/foundation/log" + apimock "github.com/conduitio/conduit/pkg/http/api/mock" + "github.com/conduitio/conduit/pkg/http/api/toproto" "github.com/conduitio/conduit/pkg/inspector" "github.com/conduitio/conduit/pkg/processor" - apimock "github.com/conduitio/conduit/pkg/web/api/mock" - "github.com/conduitio/conduit/pkg/web/api/toproto" apiv1 "github.com/conduitio/conduit/proto/api/v1" "github.com/google/uuid" "github.com/matryer/is" diff --git a/pkg/web/api/status/status.go b/pkg/http/api/status/status.go similarity index 100% rename from pkg/web/api/status/status.go rename to pkg/http/api/status/status.go diff --git a/pkg/web/api/status/status_test.go b/pkg/http/api/status/status_test.go similarity index 100% rename from pkg/web/api/status/status_test.go rename to pkg/http/api/status/status_test.go diff --git a/pkg/web/api/toproto/connector.go b/pkg/http/api/toproto/connector.go similarity index 100% rename from pkg/web/api/toproto/connector.go rename to pkg/http/api/toproto/connector.go diff --git a/pkg/web/api/toproto/pipeline.go b/pkg/http/api/toproto/pipeline.go similarity index 100% rename from pkg/web/api/toproto/pipeline.go rename to pkg/http/api/toproto/pipeline.go diff --git a/pkg/web/api/toproto/plugin.go b/pkg/http/api/toproto/plugin.go similarity index 100% rename from pkg/web/api/toproto/plugin.go rename to pkg/http/api/toproto/plugin.go diff --git a/pkg/web/api/toproto/processor.go b/pkg/http/api/toproto/processor.go similarity index 100% rename from pkg/web/api/toproto/processor.go rename to pkg/http/api/toproto/processor.go diff --git a/pkg/web/openapi/README.md b/pkg/http/openapi/README.md similarity index 100% rename from pkg/web/openapi/README.md rename to pkg/http/openapi/README.md diff --git a/pkg/web/openapi/copy-swagger-api.sh b/pkg/http/openapi/copy-swagger-api.sh similarity index 100% rename from pkg/web/openapi/copy-swagger-api.sh rename to pkg/http/openapi/copy-swagger-api.sh diff --git a/pkg/web/openapi/openapi.go b/pkg/http/openapi/openapi.go similarity index 100% rename from pkg/web/openapi/openapi.go rename to pkg/http/openapi/openapi.go diff --git a/pkg/web/openapi/swagger-ui/LICENSE b/pkg/http/openapi/swagger-ui/LICENSE similarity index 100% rename from pkg/web/openapi/swagger-ui/LICENSE rename to pkg/http/openapi/swagger-ui/LICENSE diff --git a/pkg/web/openapi/swagger-ui/api/v1/api.swagger.json b/pkg/http/openapi/swagger-ui/api/v1/api.swagger.json similarity index 100% rename from pkg/web/openapi/swagger-ui/api/v1/api.swagger.json rename to pkg/http/openapi/swagger-ui/api/v1/api.swagger.json diff --git a/pkg/web/openapi/swagger-ui/favicon-16x16.png b/pkg/http/openapi/swagger-ui/favicon-16x16.png similarity index 100% rename from pkg/web/openapi/swagger-ui/favicon-16x16.png rename to pkg/http/openapi/swagger-ui/favicon-16x16.png diff --git a/pkg/web/openapi/swagger-ui/favicon-32x32.png b/pkg/http/openapi/swagger-ui/favicon-32x32.png similarity index 100% rename from pkg/web/openapi/swagger-ui/favicon-32x32.png rename to pkg/http/openapi/swagger-ui/favicon-32x32.png diff --git a/pkg/web/openapi/swagger-ui/index.css b/pkg/http/openapi/swagger-ui/index.css similarity index 100% rename from pkg/web/openapi/swagger-ui/index.css rename to pkg/http/openapi/swagger-ui/index.css diff --git a/pkg/web/openapi/swagger-ui/index.html b/pkg/http/openapi/swagger-ui/index.html similarity index 100% rename from pkg/web/openapi/swagger-ui/index.html rename to pkg/http/openapi/swagger-ui/index.html diff --git a/pkg/web/openapi/swagger-ui/oauth2-redirect.html b/pkg/http/openapi/swagger-ui/oauth2-redirect.html similarity index 100% rename from pkg/web/openapi/swagger-ui/oauth2-redirect.html rename to pkg/http/openapi/swagger-ui/oauth2-redirect.html diff --git a/pkg/web/openapi/swagger-ui/swagger-initializer.js b/pkg/http/openapi/swagger-ui/swagger-initializer.js similarity index 100% rename from pkg/web/openapi/swagger-ui/swagger-initializer.js rename to pkg/http/openapi/swagger-ui/swagger-initializer.js diff --git a/pkg/web/openapi/swagger-ui/swagger-ui-bundle.js b/pkg/http/openapi/swagger-ui/swagger-ui-bundle.js similarity index 100% rename from pkg/web/openapi/swagger-ui/swagger-ui-bundle.js rename to pkg/http/openapi/swagger-ui/swagger-ui-bundle.js diff --git a/pkg/web/openapi/swagger-ui/swagger-ui-es-bundle-core.js b/pkg/http/openapi/swagger-ui/swagger-ui-es-bundle-core.js similarity index 100% rename from pkg/web/openapi/swagger-ui/swagger-ui-es-bundle-core.js rename to pkg/http/openapi/swagger-ui/swagger-ui-es-bundle-core.js diff --git a/pkg/web/openapi/swagger-ui/swagger-ui-es-bundle.js b/pkg/http/openapi/swagger-ui/swagger-ui-es-bundle.js similarity index 100% rename from pkg/web/openapi/swagger-ui/swagger-ui-es-bundle.js rename to pkg/http/openapi/swagger-ui/swagger-ui-es-bundle.js diff --git a/pkg/web/openapi/swagger-ui/swagger-ui-standalone-preset.js b/pkg/http/openapi/swagger-ui/swagger-ui-standalone-preset.js similarity index 100% rename from pkg/web/openapi/swagger-ui/swagger-ui-standalone-preset.js rename to pkg/http/openapi/swagger-ui/swagger-ui-standalone-preset.js diff --git a/pkg/web/openapi/swagger-ui/swagger-ui.css b/pkg/http/openapi/swagger-ui/swagger-ui.css similarity index 100% rename from pkg/web/openapi/swagger-ui/swagger-ui.css rename to pkg/http/openapi/swagger-ui/swagger-ui.css diff --git a/pkg/web/openapi/swagger-ui/swagger-ui.js b/pkg/http/openapi/swagger-ui/swagger-ui.js similarity index 100% rename from pkg/web/openapi/swagger-ui/swagger-ui.js rename to pkg/http/openapi/swagger-ui/swagger-ui.js