Skip to content

Commit 3d1a10b

Browse files
committed
chore: refactor packages to make the project more structured
1 parent 1644a34 commit 3d1a10b

File tree

135 files changed

+239
-248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+239
-248
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ bash-test-14:
366366
integration-test:
367367
services:
368368
- name: docker:dind
369-
command: ["--tls=false"]
369+
command: [ "--tls=false" ]
370370
<<: *only_feature
371371
stage: integration-test
372372
variables:

cmd/cli/commands/clone/actions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ import (
1919
"github.com/urfave/cli/v2"
2020

2121
"gitlab.com/postgres-ai/database-lab/v2/cmd/cli/commands"
22+
"gitlab.com/postgres-ai/database-lab/v2/internal/observer"
2223
"gitlab.com/postgres-ai/database-lab/v2/pkg/client/dblabapi/types"
2324
"gitlab.com/postgres-ai/database-lab/v2/pkg/log"
2425
"gitlab.com/postgres-ai/database-lab/v2/pkg/models"
25-
"gitlab.com/postgres-ai/database-lab/v2/pkg/observer"
2626
)
2727

2828
// list runs a request to list clones of an instance.

cmd/cli/commands/config/command_list.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ func CommandList() []*cli.Command {
2929
Required: true,
3030
},
3131
&cli.StringFlag{
32-
Name: "token",
33-
Usage: "verification token of Database Lab instance",
32+
Name: "token",
33+
Usage: "verification token of Database Lab instance",
3434
},
3535
&cli.BoolFlag{
3636
Name: "insecure",

cmd/cli/commands/global/command_list.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ func List() []*cli.Command {
3030
Required: true,
3131
},
3232
&cli.StringFlag{
33-
Name: "token",
34-
Usage: "verification token of Database Lab instance",
33+
Name: "token",
34+
Usage: "verification token of Database Lab instance",
3535
},
3636
&cli.BoolFlag{
3737
Name: "insecure",

cmd/cli/commands/port_forwarding.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"github.com/urfave/cli/v2"
1515
"golang.org/x/crypto/ssh"
1616

17-
"gitlab.com/postgres-ai/database-lab/v2/pkg/portfwd"
17+
"gitlab.com/postgres-ai/database-lab/v2/internal/portfwd"
1818
)
1919

2020
// BuildTunnel creates a new instance of SSH tunnel.

cmd/database-lab/main.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,22 @@ import (
2020
"github.com/docker/docker/client"
2121
"github.com/pkg/errors"
2222

23+
"gitlab.com/postgres-ai/database-lab/v2/internal/cloning"
24+
"gitlab.com/postgres-ai/database-lab/v2/internal/estimator"
25+
"gitlab.com/postgres-ai/database-lab/v2/internal/localui"
26+
"gitlab.com/postgres-ai/database-lab/v2/internal/observer"
27+
"gitlab.com/postgres-ai/database-lab/v2/internal/platform"
28+
"gitlab.com/postgres-ai/database-lab/v2/internal/provision"
29+
"gitlab.com/postgres-ai/database-lab/v2/internal/provision/pool"
30+
"gitlab.com/postgres-ai/database-lab/v2/internal/provision/resources"
31+
"gitlab.com/postgres-ai/database-lab/v2/internal/provision/runners"
32+
"gitlab.com/postgres-ai/database-lab/v2/internal/retrieval"
33+
"gitlab.com/postgres-ai/database-lab/v2/internal/retrieval/engine/postgres/tools/cont"
34+
"gitlab.com/postgres-ai/database-lab/v2/internal/srv"
35+
"gitlab.com/postgres-ai/database-lab/v2/internal/telemetry"
2336
"gitlab.com/postgres-ai/database-lab/v2/pkg/config"
2437
"gitlab.com/postgres-ai/database-lab/v2/pkg/config/global"
25-
"gitlab.com/postgres-ai/database-lab/v2/pkg/estimator"
26-
"gitlab.com/postgres-ai/database-lab/v2/pkg/localui"
2738
"gitlab.com/postgres-ai/database-lab/v2/pkg/log"
28-
"gitlab.com/postgres-ai/database-lab/v2/pkg/observer"
29-
"gitlab.com/postgres-ai/database-lab/v2/pkg/retrieval"
30-
"gitlab.com/postgres-ai/database-lab/v2/pkg/retrieval/engine/postgres/tools/cont"
31-
"gitlab.com/postgres-ai/database-lab/v2/pkg/services/cloning"
32-
"gitlab.com/postgres-ai/database-lab/v2/pkg/services/platform"
33-
"gitlab.com/postgres-ai/database-lab/v2/pkg/services/provision"
34-
"gitlab.com/postgres-ai/database-lab/v2/pkg/services/provision/pool"
35-
"gitlab.com/postgres-ai/database-lab/v2/pkg/services/provision/resources"
36-
"gitlab.com/postgres-ai/database-lab/v2/pkg/services/provision/runners"
37-
"gitlab.com/postgres-ai/database-lab/v2/pkg/srv"
38-
"gitlab.com/postgres-ai/database-lab/v2/pkg/telemetry"
3939
"gitlab.com/postgres-ai/database-lab/v2/pkg/util/networks"
4040
"gitlab.com/postgres-ai/database-lab/v2/version"
4141
)

cmd/runci/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ import (
1111
"github.com/docker/docker/client"
1212
"github.com/pkg/errors"
1313

14+
"gitlab.com/postgres-ai/database-lab/v2/internal/platform"
15+
"gitlab.com/postgres-ai/database-lab/v2/internal/retrieval/engine/postgres/tools"
16+
"gitlab.com/postgres-ai/database-lab/v2/internal/runci"
17+
"gitlab.com/postgres-ai/database-lab/v2/internal/runci/source"
1418
"gitlab.com/postgres-ai/database-lab/v2/pkg/client/dblabapi"
1519
"gitlab.com/postgres-ai/database-lab/v2/pkg/log"
16-
"gitlab.com/postgres-ai/database-lab/v2/pkg/retrieval/engine/postgres/tools"
17-
"gitlab.com/postgres-ai/database-lab/v2/pkg/runci"
18-
"gitlab.com/postgres-ai/database-lab/v2/pkg/runci/source"
19-
"gitlab.com/postgres-ai/database-lab/v2/pkg/services/platform"
2020
"gitlab.com/postgres-ai/database-lab/v2/pkg/util/networks"
2121
)
2222

configs/config.example.physical_generic.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,8 @@ retrieval:
265265

266266
# Add PostgreSQL recovery configuration parameters to the promotion container.
267267
recovery:
268-
# Uncomment this only if you are on Postgres version 11 or older.
269-
# standby_mode: on
268+
# Uncomment this only if you are on Postgres version 11 or older.
269+
# standby_mode: on
270270

271271
# It is possible to define a pre-precessing script. For example, "/tmp/scripts/custom.sh".
272272
# Default: empty string (no pre-processing defined).

configs/config.example.physical_walg.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ retrieval:
206206

207207
# Add PostgreSQL recovery configuration parameters to the sync container.
208208
recovery:
209-
# Uncomment this only if you are on Postgres version 11 or older.
210-
# standby_mode: on
209+
# Uncomment this only if you are on Postgres version 11 or older.
210+
# standby_mode: on
211211

212212
# Passes custom environment variables to the Docker container with the restoring tool.
213213
envs:
@@ -255,8 +255,8 @@ retrieval:
255255

256256
# Add PostgreSQL recovery configuration parameters to the promotion container.
257257
recovery:
258-
# Uncomment this only if you are on Postgres version 11 or older.
259-
# standby_mode: on
258+
# Uncomment this only if you are on Postgres version 11 or older.
259+
# standby_mode: on
260260

261261
# It is possible to define a pre-precessing script. For example, "/tmp/scripts/custom.sh".
262262
# Default: empty string (no pre-processing defined).

pkg/services/cloning/base.go renamed to internal/cloning/base.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ import (
2121
"github.com/pkg/errors"
2222
"github.com/rs/xid"
2323

24+
"gitlab.com/postgres-ai/database-lab/v2/internal/provision"
25+
"gitlab.com/postgres-ai/database-lab/v2/internal/provision/resources"
26+
"gitlab.com/postgres-ai/database-lab/v2/internal/telemetry"
2427
"gitlab.com/postgres-ai/database-lab/v2/pkg/client/dblabapi/types"
2528
"gitlab.com/postgres-ai/database-lab/v2/pkg/log"
2629
"gitlab.com/postgres-ai/database-lab/v2/pkg/models"
27-
"gitlab.com/postgres-ai/database-lab/v2/pkg/services/provision"
28-
"gitlab.com/postgres-ai/database-lab/v2/pkg/services/provision/resources"
29-
"gitlab.com/postgres-ai/database-lab/v2/pkg/telemetry"
3030
"gitlab.com/postgres-ai/database-lab/v2/pkg/util"
3131
"gitlab.com/postgres-ai/database-lab/v2/pkg/util/pglog"
3232
"gitlab.com/postgres-ai/database-lab/v2/version"

0 commit comments

Comments
 (0)