Skip to content

Commit 59d4127

Browse files
committed
refactor: Restructure codebase
1 parent dab8b9d commit 59d4127

File tree

127 files changed

+89
-80
lines changed

Some content is hidden

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

127 files changed

+89
-80
lines changed

main.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ package main
22

33
import (
44
"fmt"
5-
"github.com/fatih/color"
6-
"github.com/moby/sys/user"
7-
"github.com/swiftwave-org/swiftwave/swiftwave_service/cmd"
85
"os"
96
"os/exec"
107
"strings"
8+
9+
"github.com/fatih/color"
10+
"github.com/moby/sys/user"
11+
"github.com/swiftwave-org/swiftwave/swiftwave_service/cmd"
1112
)
1213

1314
func main() {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

container_manager/volume.go renamed to pkg/container_manager/volume.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/docker/docker/api/types/image"
99
"github.com/docker/docker/api/types/network"
1010
"github.com/docker/docker/api/types/volume"
11-
"github.com/swiftwave-org/swiftwave/ssh_toolkit"
11+
"github.com/swiftwave-org/swiftwave/pkg/ssh_toolkit"
1212
"io"
1313
"log"
1414
"os"

docker_config_generator/utils.go renamed to pkg/docker_config_generator/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"sort"
99
"strings"
1010

11-
GIT "github.com/swiftwave-org/swiftwave/git_manager"
11+
GIT "github.com/swiftwave-org/swiftwave/pkg/git_manager"
1212

1313
"github.com/google/uuid"
1414
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

swiftwave_service/cmd/localregistry.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"errors"
66
"fmt"
77
"github.com/spf13/cobra"
8-
containermanger "github.com/swiftwave-org/swiftwave/container_manager"
8+
containermanger "github.com/swiftwave-org/swiftwave/pkg/container_manager"
99
"os"
1010
"os/exec"
1111
)

swiftwave_service/cmd/tls.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,20 @@ import (
88
"encoding/pem"
99
"errors"
1010
"fmt"
11-
"github.com/labstack/echo/v4"
12-
"github.com/labstack/echo/v4/middleware"
13-
"github.com/spf13/cobra"
14-
SSL "github.com/swiftwave-org/swiftwave/ssl_manager"
15-
"github.com/swiftwave-org/swiftwave/swiftwave_service/config/local_config"
16-
"github.com/swiftwave-org/swiftwave/swiftwave_service/db"
1711
"net/http"
1812
"os"
1913
"os/exec"
2014
"path/filepath"
2115
"strconv"
2216
"strings"
2317
"time"
18+
19+
"github.com/labstack/echo/v4"
20+
"github.com/labstack/echo/v4/middleware"
21+
"github.com/spf13/cobra"
22+
SSL "github.com/swiftwave-org/swiftwave/pkg/ssl_manager"
23+
"github.com/swiftwave-org/swiftwave/swiftwave_service/config/local_config"
24+
"github.com/swiftwave-org/swiftwave/swiftwave_service/db"
2425
)
2526

2627
func init() {

swiftwave_service/config/local_config/utils.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ package local_config
33
import (
44
"errors"
55
"fmt"
6-
"github.com/swiftwave-org/swiftwave/ssh_toolkit"
7-
"golang.org/x/crypto/bcrypt"
8-
"gopkg.in/yaml.v3"
96
"io"
107
"os"
118
"strings"
9+
10+
"github.com/swiftwave-org/swiftwave/pkg/ssh_toolkit"
11+
"golang.org/x/crypto/bcrypt"
12+
"gopkg.in/yaml.v3"
1213
)
1314

1415
var config *Config

swiftwave_service/console/server.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ import (
55
_ "embed"
66
"encoding/json"
77
"fmt"
8+
"net/http"
9+
"strconv"
10+
811
"github.com/labstack/echo/v4"
9-
"github.com/swiftwave-org/swiftwave/ssh_toolkit"
12+
"github.com/swiftwave-org/swiftwave/pkg/ssh_toolkit"
1013
"github.com/swiftwave-org/swiftwave/swiftwave_service/core"
1114
"github.com/swiftwave-org/swiftwave/swiftwave_service/manager"
1215
"golang.org/x/net/websocket"
13-
"net/http"
14-
"strconv"
1516
)
1617

1718
// Initialize : Initialize the server and its routes

swiftwave_service/core/application.operations.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
"github.com/google/uuid"
1212
"github.com/hashicorp/go-set"
13-
containermanger "github.com/swiftwave-org/swiftwave/container_manager"
13+
containermanger "github.com/swiftwave-org/swiftwave/pkg/container_manager"
1414
"gorm.io/gorm"
1515
)
1616

swiftwave_service/core/pv.operations.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ import (
44
"context"
55
"errors"
66
"fmt"
7-
containermanger "github.com/swiftwave-org/swiftwave/container_manager"
7+
"regexp"
8+
9+
containermanger "github.com/swiftwave-org/swiftwave/pkg/container_manager"
810
"github.com/swiftwave-org/swiftwave/swiftwave_service/logger"
911
"gorm.io/gorm"
10-
"regexp"
1112
)
1213

1314
// This file contains the operations for the PersistentVolume model.

swiftwave_service/cronjob/server_status_monitor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"sync"
77
"time"
88

9-
"github.com/swiftwave-org/swiftwave/ssh_toolkit"
9+
"github.com/swiftwave-org/swiftwave/pkg/ssh_toolkit"
1010
"github.com/swiftwave-org/swiftwave/swiftwave_service/core"
1111
"github.com/swiftwave-org/swiftwave/swiftwave_service/logger"
1212
)

swiftwave_service/cronjob/sync_backup_proxy_server.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ package cronjob
22

33
import (
44
"context"
5-
containermanger "github.com/swiftwave-org/swiftwave/container_manager"
6-
"github.com/swiftwave-org/swiftwave/ssh_toolkit"
5+
"time"
6+
7+
containermanger "github.com/swiftwave-org/swiftwave/pkg/container_manager"
8+
"github.com/swiftwave-org/swiftwave/pkg/ssh_toolkit"
79
"github.com/swiftwave-org/swiftwave/swiftwave_service/core"
810
"github.com/swiftwave-org/swiftwave/swiftwave_service/logger"
9-
"time"
1011
)
1112

1213
func (m Manager) SyncBackupProxyServer() {

swiftwave_service/cronjob/sync_proxy_state.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"time"
88

99
"github.com/docker/docker/api/types/swarm"
10-
containermanger "github.com/swiftwave-org/swiftwave/container_manager"
11-
"github.com/swiftwave-org/swiftwave/ssh_toolkit"
10+
containermanger "github.com/swiftwave-org/swiftwave/pkg/container_manager"
11+
"github.com/swiftwave-org/swiftwave/pkg/ssh_toolkit"
1212
"github.com/swiftwave-org/swiftwave/swiftwave_service/core"
1313
"github.com/swiftwave-org/swiftwave/swiftwave_service/logger"
1414
)

swiftwave_service/db_models_loader/main.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
package main
22

33
import (
4-
"ariga.io/atlas-provider-gorm/gormschema"
54
"fmt"
6-
SSL "github.com/swiftwave-org/swiftwave/ssl_manager"
7-
"github.com/swiftwave-org/swiftwave/swiftwave_service/config/system_config"
8-
"github.com/swiftwave-org/swiftwave/swiftwave_service/core"
9-
"github.com/swiftwave-org/swiftwave/task_queue"
105
"io"
116
"os"
7+
8+
"ariga.io/atlas-provider-gorm/gormschema"
9+
SSL "github.com/swiftwave-org/swiftwave/pkg/ssl_manager"
10+
"github.com/swiftwave-org/swiftwave/pkg/task_queue"
11+
"github.com/swiftwave-org/swiftwave/swiftwave_service/config/system_config"
12+
"github.com/swiftwave-org/swiftwave/swiftwave_service/core"
1213
)
1314

1415
func main() {

swiftwave_service/graphql/app_authentication.resolvers.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

swiftwave_service/graphql/application.resolvers.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

swiftwave_service/graphql/deployment_log.resolvers.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

swiftwave_service/graphql/docker_config_generator.resolvers.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

swiftwave_service/graphql/git.resolvers.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

swiftwave_service/graphql/git_credential.resolvers.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

swiftwave_service/graphql/graphql_object_mapper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"strings"
1111
"time"
1212

13-
gitmanager "github.com/swiftwave-org/swiftwave/git_manager"
13+
gitmanager "github.com/swiftwave-org/swiftwave/pkg/git_manager"
1414
"github.com/swiftwave-org/swiftwave/swiftwave_service/stack_parser"
1515
"golang.org/x/crypto/ed25519"
1616
"golang.org/x/crypto/ssh"

swiftwave_service/graphql/helpers.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010
"path/filepath"
1111
"strings"
1212

13-
containermanger "github.com/swiftwave-org/swiftwave/container_manager"
14-
dockerconfiggenerator "github.com/swiftwave-org/swiftwave/docker_config_generator"
15-
haproxymanager "github.com/swiftwave-org/swiftwave/haproxy_manager"
13+
containermanger "github.com/swiftwave-org/swiftwave/pkg/container_manager"
14+
dockerconfiggenerator "github.com/swiftwave-org/swiftwave/pkg/docker_config_generator"
15+
haproxymanager "github.com/swiftwave-org/swiftwave/pkg/haproxy_manager"
1616
"github.com/swiftwave-org/swiftwave/swiftwave_service/core"
1717
"github.com/swiftwave-org/swiftwave/swiftwave_service/graphql/model"
1818
"github.com/swiftwave-org/swiftwave/swiftwave_service/logger"

swiftwave_service/graphql/ingress_rule.resolvers.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

swiftwave_service/graphql/server.resolvers.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

swiftwave_service/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/fatih/color"
1111
"github.com/golang-jwt/jwt/v5"
1212
echojwt "github.com/labstack/echo-jwt/v4"
13-
"github.com/swiftwave-org/swiftwave/ssh_toolkit"
13+
"github.com/swiftwave-org/swiftwave/pkg/ssh_toolkit"
1414
"github.com/swiftwave-org/swiftwave/swiftwave_service/config"
1515
"github.com/swiftwave-org/swiftwave/swiftwave_service/console"
1616
"github.com/swiftwave-org/swiftwave/swiftwave_service/core"

swiftwave_service/manager/docker.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ package manager
22

33
import (
44
"context"
5-
containermanger "github.com/swiftwave-org/swiftwave/container_manager"
6-
"github.com/swiftwave-org/swiftwave/ssh_toolkit"
5+
6+
containermanger "github.com/swiftwave-org/swiftwave/pkg/container_manager"
7+
"github.com/swiftwave-org/swiftwave/pkg/ssh_toolkit"
78
"github.com/swiftwave-org/swiftwave/swiftwave_service/config"
89
"github.com/swiftwave-org/swiftwave/swiftwave_service/core"
910
)

swiftwave_service/manager/haproxy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ package manager
22

33
import (
44
"context"
5-
haproxymanager "github.com/swiftwave-org/swiftwave/haproxy_manager"
6-
"github.com/swiftwave-org/swiftwave/ssh_toolkit"
5+
haproxymanager "github.com/swiftwave-org/swiftwave/pkg/haproxy_manager"
6+
"github.com/swiftwave-org/swiftwave/pkg/ssh_toolkit"
77
"github.com/swiftwave-org/swiftwave/swiftwave_service/config"
88
"github.com/swiftwave-org/swiftwave/swiftwave_service/core"
99
"net"

swiftwave_service/manager/udpproxy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ package manager
22

33
import (
44
"context"
5-
"github.com/swiftwave-org/swiftwave/ssh_toolkit"
5+
"github.com/swiftwave-org/swiftwave/pkg/ssh_toolkit"
66
"github.com/swiftwave-org/swiftwave/swiftwave_service/config"
77
"github.com/swiftwave-org/swiftwave/swiftwave_service/core"
8-
"github.com/swiftwave-org/swiftwave/udp_proxy_manager"
8+
"github.com/swiftwave-org/swiftwave/pkg/udp_proxy_manager"
99
"net"
1010
)
1111

swiftwave_service/service_manager/load_service_manager.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@ import (
44
"context"
55
"errors"
66
"fmt"
7+
"os"
8+
79
"github.com/swiftwave-org/swiftwave/swiftwave_service/config/system_config"
810
"github.com/swiftwave-org/swiftwave/swiftwave_service/db"
911
"github.com/swiftwave-org/swiftwave/swiftwave_service/logger"
1012
"gorm.io/gorm"
11-
"os"
1213

1314
"github.com/go-redis/redis/v8"
14-
dockerConfigGenerator "github.com/swiftwave-org/swiftwave/docker_config_generator"
15-
"github.com/swiftwave-org/swiftwave/pubsub"
16-
ssl "github.com/swiftwave-org/swiftwave/ssl_manager"
15+
dockerConfigGenerator "github.com/swiftwave-org/swiftwave/pkg/docker_config_generator"
16+
"github.com/swiftwave-org/swiftwave/pkg/pubsub"
17+
ssl "github.com/swiftwave-org/swiftwave/pkg/ssl_manager"
18+
"github.com/swiftwave-org/swiftwave/pkg/task_queue"
1719
"github.com/swiftwave-org/swiftwave/swiftwave_service/config"
18-
"github.com/swiftwave-org/swiftwave/task_queue"
1920
)
2021

2122
func (manager *ServiceManager) Load(config config.Config) {

swiftwave_service/service_manager/types.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ package service_manager
22

33
import (
44
"github.com/go-redis/redis/v8"
5-
dockerConfigGenerator "github.com/swiftwave-org/swiftwave/docker_config_generator"
6-
"github.com/swiftwave-org/swiftwave/pubsub"
7-
SSL "github.com/swiftwave-org/swiftwave/ssl_manager"
8-
"github.com/swiftwave-org/swiftwave/task_queue"
5+
dockerConfigGenerator "github.com/swiftwave-org/swiftwave/pkg/docker_config_generator"
6+
"github.com/swiftwave-org/swiftwave/pkg/pubsub"
7+
SSL "github.com/swiftwave-org/swiftwave/pkg/ssl_manager"
8+
"github.com/swiftwave-org/swiftwave/pkg/task_queue"
99
"gorm.io/gorm"
1010
)
1111

swiftwave_service/worker/common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package worker
22

33
import (
44
"fmt"
5-
"github.com/swiftwave-org/swiftwave/pubsub"
5+
"github.com/swiftwave-org/swiftwave/pkg/pubsub"
66
"github.com/swiftwave-org/swiftwave/swiftwave_service/core"
77
"gorm.io/gorm"
88
"log"

swiftwave_service/worker/process_application_build_request.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import (
99
"path/filepath"
1010

1111
"github.com/google/uuid"
12-
containermanger "github.com/swiftwave-org/swiftwave/container_manager"
13-
dockerconfiggenerator "github.com/swiftwave-org/swiftwave/docker_config_generator"
14-
gitmanager "github.com/swiftwave-org/swiftwave/git_manager"
15-
"github.com/swiftwave-org/swiftwave/pubsub"
12+
containermanger "github.com/swiftwave-org/swiftwave/pkg/container_manager"
13+
dockerconfiggenerator "github.com/swiftwave-org/swiftwave/pkg/docker_config_generator"
14+
gitmanager "github.com/swiftwave-org/swiftwave/pkg/git_manager"
15+
"github.com/swiftwave-org/swiftwave/pkg/pubsub"
1616
"github.com/swiftwave-org/swiftwave/swiftwave_service/core"
1717
"gorm.io/gorm"
1818
)

0 commit comments

Comments
 (0)