Skip to content

Commit 8fc5345

Browse files
Feature/248 refactor project structure (#262)
1 parent b23ca2b commit 8fc5345

File tree

193 files changed

+327
-373
lines changed

Some content is hidden

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

193 files changed

+327
-373
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
run: go install github.com/swaggo/swag/cmd/swag@latest
6161
timeout-minutes: 12
6262
- name: Start docker containers for test
63-
run: docker compose -f "docker/testing/httpbin-test/docker-compose.yml" up -d --build
63+
run: docker compose -f "deployments/docker/testing/httpbin-test/docker-compose.yml" up -d --build
6464
- name: Run tests
6565
run: |
6666
sudo apt update

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ jobs:
109109
run: |
110110
go install github.com/swaggo/swag/cmd/swag@latest
111111
go install github.com/CycloneDX/cyclonedx-gomod/cmd/cyclonedx-gomod@latest
112-
swag init -o swaggerdocs
113112
make sbom
114113
zip -r bin/sbom.zip bin
115114

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ plugins/*
99
build/*
1010
!build/build.md
1111
bin/*
12-
swaggerdocs/*
12+
api/*
1313
**.env
1414
test/cacao/flatfile-db-example.json
1515

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div align="center">
2-
<a href="https://cossas-project.org/cossas-software/soarca"><img src="img/soarca-logo.svg"/>
2+
<a href="https://cossas-project.org/cossas-software/soarca"><img src="assets/soarca-logo.svg"/>
33

44

55
[![https://cossas-project.org/portfolio/SOARCA/](https://img.shields.io/badge/website-cossas--project.org-orange)](https://cossas-project.org/portfolio/SOARCA/)
File renamed without changes.

main.go renamed to cmd/soarca/main.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ package main
33
import (
44
"fmt"
55

6+
api "soarca/api"
67
"soarca/internal/controller"
7-
"soarca/logger"
8-
"soarca/routes/status"
9-
"soarca/swaggerdocs"
10-
"soarca/utils"
8+
"soarca/internal/logger"
9+
"soarca/pkg/api/status"
10+
"soarca/pkg/utils"
1111

1212
"github.com/joho/godotenv"
1313
)
@@ -36,25 +36,25 @@ const banner = `
3636
3737
`
3838

39-
// @title SOARCA API
40-
// @version 1.0.0
39+
// @title SOARCA API
40+
// @version 1.0.0
4141
func main() {
4242
fmt.Print(banner)
4343
log.Info("Version: ", Version)
4444
log.Info("Buildtime: ", Buildtime)
4545

46-
errenv := godotenv.Load(".env")
47-
if errenv != nil {
46+
err := godotenv.Load(".env")
47+
if err != nil {
4848
log.Warning("Failed to read env variable, but will continue")
4949
}
5050
Host = "localhost:" + utils.GetEnv("PORT", "8080")
51-
swaggerdocs.SwaggerInfo.Host = Host
51+
api.SwaggerInfo.Host = Host
5252

5353
// Version is only available here
5454
status.SetVersion(Version)
55-
errinit := controller.Initialize()
56-
if errinit != nil {
57-
log.Fatal("Something Went wrong with setting-up the app, msg: ", errinit)
58-
panic(errinit)
55+
err = controller.Initialize()
56+
if err != nil {
57+
log.Fatal("Something Went wrong with setting-up the app, msg: ", err)
58+
panic(err)
5959
}
6060
}

0 commit comments

Comments
 (0)