diff --git a/Taskfile.yml b/Taskfile.yml index bc6a361..abe0e2c 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -34,11 +34,11 @@ tasks: docker:build: cmds: - - docker build --tag darkwind8/darkbot:v0.3.10 . + - docker build --tag darkwind8/darkbot:v0.3.11 . docker:push: cmds: - - docker push darkwind8/darkbot:v0.3.10 + - docker push darkwind8/darkbot:v0.3.11 docker:buildpush: cmds: diff --git a/api/api.go b/app/api/api.go similarity index 82% rename from api/api.go rename to app/api/api.go index 42af903..b7ff3f6 100644 --- a/api/api.go +++ b/app/api/api.go @@ -1,7 +1,7 @@ package api import ( - "darkbot/api/routes" + "darkbot/app/api/routes" _ "embed" "net/http" ) diff --git a/api/api_test.go b/app/api/api_test.go similarity index 97% rename from api/api_test.go rename to app/api/api_test.go index c3b6641..c83b455 100644 --- a/api/api_test.go +++ b/app/api/api_test.go @@ -1,7 +1,7 @@ package api import ( - "darkbot/settings/logus" + "darkbot/app/settings/logus" "fmt" "io" "net/http" diff --git a/api/management/devrun.go b/app/api/management/devrun.go similarity index 86% rename from api/management/devrun.go rename to app/api/management/devrun.go index a895cee..293e684 100644 --- a/api/management/devrun.go +++ b/app/api/management/devrun.go @@ -1,7 +1,7 @@ package main import ( - "darkbot/api/routes" + "darkbot/app/api/routes" _ "embed" "net/http" ) diff --git a/api/routes/home.go b/app/api/routes/home.go similarity index 91% rename from api/routes/home.go rename to app/api/routes/home.go index 2c41a41..3be5575 100644 --- a/api/routes/home.go +++ b/app/api/routes/home.go @@ -1,7 +1,7 @@ package routes import ( - "darkbot/api/web" + "darkbot/app/api/web" _ "embed" "net/http" ) diff --git a/api/routes/home.md b/app/api/routes/home.md similarity index 100% rename from api/routes/home.md rename to app/api/routes/home.md diff --git a/api/routes/main.go b/app/api/routes/main.go similarity index 91% rename from api/routes/main.go rename to app/api/routes/main.go index 1406c18..7fb29dc 100644 --- a/api/routes/main.go +++ b/app/api/routes/main.go @@ -1,7 +1,7 @@ package routes import ( - "darkbot/api/web" + "darkbot/app/api/web" "net/http" ) diff --git a/api/routes/players.go b/app/api/routes/players.go similarity index 100% rename from api/routes/players.go rename to app/api/routes/players.go diff --git a/api/web/404.md b/app/api/web/404.md similarity index 100% rename from api/web/404.md rename to app/api/web/404.md diff --git a/api/web/not_found.go b/app/api/web/not_found.go similarity index 96% rename from api/web/not_found.go rename to app/api/web/not_found.go index 36f005b..3c728e3 100644 --- a/api/web/not_found.go +++ b/app/api/web/not_found.go @@ -1,7 +1,7 @@ package web import ( - "darkbot/settings/utils" + "darkbot/app/settings/utils" _ "embed" "net/http" "text/template" diff --git a/api/web/server.go b/app/api/web/server.go similarity index 100% rename from api/web/server.go rename to app/api/web/server.go diff --git a/api/web/web.go b/app/api/web/web.go similarity index 100% rename from api/web/web.go rename to app/api/web/web.go diff --git a/configurator/alerts.go b/app/configurator/alerts.go similarity index 98% rename from configurator/alerts.go rename to app/configurator/alerts.go index c9a2df7..1c2cca3 100644 --- a/configurator/alerts.go +++ b/app/configurator/alerts.go @@ -1,8 +1,8 @@ package configurator import ( - "darkbot/configurator/models" - "darkbot/settings/types" + "darkbot/app/configurator/models" + "darkbot/app/settings/types" ) type iConfiguratorBoolAlert interface { diff --git a/configurator/alerts_test.go b/app/configurator/alerts_test.go similarity index 95% rename from configurator/alerts_test.go rename to app/configurator/alerts_test.go index 8e0f5f1..6d280f1 100644 --- a/configurator/alerts_test.go +++ b/app/configurator/alerts_test.go @@ -1,8 +1,8 @@ package configurator import ( - "darkbot/settings/types" - "darkbot/settings/utils" + "darkbot/app/settings/types" + "darkbot/app/settings/utils" "fmt" "testing" diff --git a/configurator/channel.go b/app/configurator/channel.go similarity index 91% rename from configurator/channel.go rename to app/configurator/channel.go index 663ec39..1a84c79 100644 --- a/configurator/channel.go +++ b/app/configurator/channel.go @@ -1,10 +1,10 @@ package configurator import ( - "darkbot/configurator/models" - "darkbot/settings/logus" - "darkbot/settings/types" - "darkbot/settings/utils" + "darkbot/app/configurator/models" + "darkbot/app/settings/logus" + "darkbot/app/settings/types" + "darkbot/app/settings/utils" ) func NewConfiguratorChannel(con Configurator) ConfiguratorChannel { diff --git a/configurator/channel_test.go b/app/configurator/channel_test.go similarity index 94% rename from configurator/channel_test.go rename to app/configurator/channel_test.go index e041d91..ff2afc2 100644 --- a/configurator/channel_test.go +++ b/app/configurator/channel_test.go @@ -1,7 +1,7 @@ package configurator import ( - "darkbot/settings/types" + "darkbot/app/settings/types" "fmt" "testing" diff --git a/configurator/connection.go b/app/configurator/connection.go similarity index 90% rename from configurator/connection.go rename to app/configurator/connection.go index 6831c9f..fd83057 100644 --- a/configurator/connection.go +++ b/app/configurator/connection.go @@ -5,10 +5,10 @@ User settings. Probably in Sqlite3? :thinking: package configurator import ( - "darkbot/configurator/models" - "darkbot/settings" - "darkbot/settings/logus" - "darkbot/settings/types" + "darkbot/app/configurator/models" + "darkbot/app/settings" + "darkbot/app/settings/logus" + "darkbot/app/settings/types" "gorm.io/driver/sqlite" "gorm.io/gorm" diff --git a/configurator/errors.go b/app/configurator/errors.go similarity index 100% rename from configurator/errors.go rename to app/configurator/errors.go diff --git a/configurator/fixtures.go b/app/configurator/fixtures.go similarity index 91% rename from configurator/fixtures.go rename to app/configurator/fixtures.go index 8805c6f..2e81a65 100644 --- a/configurator/fixtures.go +++ b/app/configurator/fixtures.go @@ -1,9 +1,9 @@ package configurator import ( - "darkbot/settings" - "darkbot/settings/types" - "darkbot/settings/utils" + "darkbot/app/settings" + "darkbot/app/settings/types" + "darkbot/app/settings/utils" "fmt" "os" ) diff --git a/configurator/models/model_templates.go b/app/configurator/models/model_templates.go similarity index 93% rename from configurator/models/model_templates.go rename to app/configurator/models/model_templates.go index 04ba10f..25850eb 100644 --- a/configurator/models/model_templates.go +++ b/app/configurator/models/model_templates.go @@ -1,7 +1,7 @@ package models import ( - "darkbot/settings/types" + "darkbot/app/settings/types" "gorm.io/gorm" ) diff --git a/configurator/models/models.go b/app/configurator/models/models.go similarity index 97% rename from configurator/models/models.go rename to app/configurator/models/models.go index 18ec3ce..c321fed 100644 --- a/configurator/models/models.go +++ b/app/configurator/models/models.go @@ -1,7 +1,7 @@ package models import ( - "darkbot/settings/types" + "darkbot/app/settings/types" "gorm.io/gorm" ) diff --git a/configurator/tags.go b/app/configurator/tags.go similarity index 96% rename from configurator/tags.go rename to app/configurator/tags.go index 10e7380..9f02aff 100644 --- a/configurator/tags.go +++ b/app/configurator/tags.go @@ -1,10 +1,10 @@ package configurator import ( - "darkbot/configurator/models" - "darkbot/settings/logus" - "darkbot/settings/types" - "darkbot/settings/utils" + "darkbot/app/configurator/models" + "darkbot/app/settings/logus" + "darkbot/app/settings/types" + "darkbot/app/settings/utils" "fmt" ) diff --git a/configurator/tags_test.go b/app/configurator/tags_test.go similarity index 98% rename from configurator/tags_test.go rename to app/configurator/tags_test.go index 58338c3..b5b897c 100644 --- a/configurator/tags_test.go +++ b/app/configurator/tags_test.go @@ -1,7 +1,7 @@ package configurator import ( - "darkbot/settings/types" + "darkbot/app/settings/types" "fmt" "testing" diff --git a/consoler/commands/alerts.go b/app/consoler/commands/alerts.go similarity index 98% rename from consoler/commands/alerts.go rename to app/consoler/commands/alerts.go index 3816ad1..3a38ffe 100644 --- a/consoler/commands/alerts.go +++ b/app/consoler/commands/alerts.go @@ -1,9 +1,9 @@ package commands import ( - "darkbot/configurator" - "darkbot/consoler/commands/cmdgroup" - "darkbot/consoler/printer" + "darkbot/app/configurator" + "darkbot/app/consoler/commands/cmdgroup" + "darkbot/app/consoler/printer" "fmt" "strconv" "strings" diff --git a/consoler/commands/cmdgroup/main.go b/app/consoler/commands/cmdgroup/main.go similarity index 93% rename from consoler/commands/cmdgroup/main.go rename to app/consoler/commands/cmdgroup/main.go index af79aa4..212bd71 100644 --- a/consoler/commands/cmdgroup/main.go +++ b/app/consoler/commands/cmdgroup/main.go @@ -1,8 +1,8 @@ package cmdgroup import ( - "darkbot/configurator" - "darkbot/consoler/consoler_types" + "darkbot/app/configurator" + "darkbot/app/consoler/consoler_types" "github.com/spf13/cobra" ) diff --git a/consoler/commands/root.go b/app/consoler/commands/root.go similarity index 97% rename from consoler/commands/root.go rename to app/consoler/commands/root.go index 09ab4c4..49e409d 100644 --- a/consoler/commands/root.go +++ b/app/consoler/commands/root.go @@ -1,12 +1,12 @@ package commands import ( - "darkbot/configurator" - "darkbot/configurator/models" - "darkbot/consoler/commands/cmdgroup" - "darkbot/consoler/consoler_types" - "darkbot/settings" - "darkbot/settings/types" + "darkbot/app/configurator" + "darkbot/app/configurator/models" + "darkbot/app/consoler/commands/cmdgroup" + "darkbot/app/consoler/consoler_types" + "darkbot/app/settings" + "darkbot/app/settings/types" "fmt" "github.com/spf13/cobra" diff --git a/consoler/commands/tags.go b/app/consoler/commands/tags.go similarity index 96% rename from consoler/commands/tags.go rename to app/consoler/commands/tags.go index 17420b8..d683c6d 100644 --- a/consoler/commands/tags.go +++ b/app/consoler/commands/tags.go @@ -1,9 +1,9 @@ package commands import ( - "darkbot/configurator" - "darkbot/consoler/commands/cmdgroup" - "darkbot/consoler/printer" + "darkbot/app/configurator" + "darkbot/app/consoler/commands/cmdgroup" + "darkbot/app/consoler/printer" "fmt" "strings" diff --git a/consoler/consoler.go b/app/consoler/consoler.go similarity index 91% rename from consoler/consoler.go rename to app/consoler/consoler.go index fc7229e..763354a 100644 --- a/consoler/consoler.go +++ b/app/consoler/consoler.go @@ -4,9 +4,9 @@ Copyright © 2022 NAME HERE package consoler import ( - "darkbot/consoler/commands" - "darkbot/settings" - "darkbot/settings/types" + "darkbot/app/consoler/commands" + "darkbot/app/settings" + "darkbot/app/settings/types" "strings" ) diff --git a/consoler/consoler_test.go b/app/consoler/consoler_test.go similarity index 94% rename from consoler/consoler_test.go rename to app/consoler/consoler_test.go index 87a2de7..ecf2b9c 100644 --- a/consoler/consoler_test.go +++ b/app/consoler/consoler_test.go @@ -1,9 +1,9 @@ package consoler import ( - "darkbot/configurator" - "darkbot/settings" - "darkbot/settings/types" + "darkbot/app/configurator" + "darkbot/app/settings" + "darkbot/app/settings/types" "testing" "github.com/stretchr/testify/assert" diff --git a/consoler/consoler_types/types.go b/app/consoler/consoler_types/types.go similarity index 92% rename from consoler/consoler_types/types.go rename to app/consoler/consoler_types/types.go index 1a6b480..dab084e 100644 --- a/consoler/consoler_types/types.go +++ b/app/consoler/consoler_types/types.go @@ -1,6 +1,6 @@ package consoler_types -import "darkbot/settings/types" +import "darkbot/app/settings/types" type ChannelParams struct { channelID types.DiscordChannelID diff --git a/consoler/printer/printer.go b/app/consoler/printer/printer.go similarity index 100% rename from consoler/printer/printer.go rename to app/consoler/printer/printer.go diff --git a/consoler/writer.go b/app/consoler/writer.go similarity index 100% rename from consoler/writer.go rename to app/consoler/writer.go diff --git a/discorder/main.go b/app/discorder/main.go similarity index 97% rename from discorder/main.go rename to app/discorder/main.go index 4e675e0..c6973d9 100644 --- a/discorder/main.go +++ b/app/discorder/main.go @@ -8,9 +8,9 @@ interface package discorder import ( - "darkbot/settings" - "darkbot/settings/logus" - "darkbot/settings/types" + "darkbot/app/settings" + "darkbot/app/settings/logus" + "darkbot/app/settings/types" "time" "github.com/bwmarrin/discordgo" diff --git a/listener/main.go b/app/listener/main.go similarity index 94% rename from listener/main.go rename to app/listener/main.go index 08ea364..a453fe1 100644 --- a/listener/main.go +++ b/app/listener/main.go @@ -5,11 +5,11 @@ Interacting with Discord API package listener import ( - "darkbot/consoler" - "darkbot/settings" - "darkbot/settings/logus" - "darkbot/settings/types" - "darkbot/settings/utils" + "darkbot/app/consoler" + "darkbot/app/settings" + "darkbot/app/settings/logus" + "darkbot/app/settings/types" + "darkbot/app/settings/utils" "fmt" "strings" diff --git a/management/anounce.go b/app/management/anounce.go similarity index 91% rename from management/anounce.go rename to app/management/anounce.go index 9620ab8..50d0586 100644 --- a/management/anounce.go +++ b/app/management/anounce.go @@ -4,10 +4,10 @@ Copyright © 2023 NAME HERE package management import ( - "darkbot/configurator" - "darkbot/discorder" - "darkbot/settings" - "darkbot/viewer/templ" + "darkbot/app/configurator" + "darkbot/app/discorder" + "darkbot/app/settings" + "darkbot/app/viewer/templ" "fmt" "strings" diff --git a/management/check.go b/app/management/check.go similarity index 97% rename from management/check.go rename to app/management/check.go index 009d532..2168eb7 100644 --- a/management/check.go +++ b/app/management/check.go @@ -4,7 +4,7 @@ Copyright © 2023 NAME HERE package management import ( - "darkbot/discorder" + "darkbot/app/discorder" "fmt" "github.com/spf13/cobra" diff --git a/management/migrate.go b/app/management/migrate.go similarity index 94% rename from management/migrate.go rename to app/management/migrate.go index c2d64bf..e7838c5 100644 --- a/management/migrate.go +++ b/app/management/migrate.go @@ -4,8 +4,8 @@ Copyright © 2023 NAME HERE package management import ( - "darkbot/configurator" - "darkbot/settings" + "darkbot/app/configurator" + "darkbot/app/settings" "fmt" "github.com/spf13/cobra" diff --git a/management/root.go b/app/management/root.go similarity index 100% rename from management/root.go rename to app/management/root.go diff --git a/management/run.go b/app/management/run.go similarity index 85% rename from management/run.go rename to app/management/run.go index ae5534a..7f84d3b 100644 --- a/management/run.go +++ b/app/management/run.go @@ -4,13 +4,13 @@ Copyright © 2023 NAME HERE package management import ( - "darkbot/configurator" - "darkbot/listener" - "darkbot/scrappy" - "darkbot/settings" - "darkbot/settings/logus" - "darkbot/settings/utils" - "darkbot/viewer" + "darkbot/app/configurator" + "darkbot/app/listener" + "darkbot/app/scrappy" + "darkbot/app/settings" + "darkbot/app/settings/logus" + "darkbot/app/settings/utils" + "darkbot/app/viewer" "runtime" "time" diff --git a/scrappy/base/api.go b/app/scrappy/base/api.go similarity index 79% rename from scrappy/base/api.go rename to app/scrappy/base/api.go index c5f60f1..d40da33 100644 --- a/scrappy/base/api.go +++ b/app/scrappy/base/api.go @@ -1,9 +1,9 @@ package base import ( - "darkbot/scrappy/shared/api" - "darkbot/settings" - "darkbot/settings/types" + "darkbot/app/scrappy/shared/api" + "darkbot/app/settings" + "darkbot/app/settings/types" ) type basesAPI struct { diff --git a/scrappy/base/fixtures.go b/app/scrappy/base/fixtures.go similarity index 100% rename from scrappy/base/fixtures.go rename to app/scrappy/base/fixtures.go diff --git a/scrappy/base/mock.go b/app/scrappy/base/mock.go similarity index 90% rename from scrappy/base/mock.go rename to app/scrappy/base/mock.go index cc87e36..41644ff 100644 --- a/scrappy/base/mock.go +++ b/app/scrappy/base/mock.go @@ -1,8 +1,8 @@ package base import ( - "darkbot/scrappy/tests" - "darkbot/settings/logus" + "darkbot/app/scrappy/tests" + "darkbot/app/settings/logus" "os" "path" ) diff --git a/scrappy/base/mock_test.go b/app/scrappy/base/mock_test.go similarity index 82% rename from scrappy/base/mock_test.go rename to app/scrappy/base/mock_test.go index 6440402..f6cfbf3 100644 --- a/scrappy/base/mock_test.go +++ b/app/scrappy/base/mock_test.go @@ -1,9 +1,9 @@ package base import ( - "darkbot/scrappy/tests" - "darkbot/settings/logus" - "darkbot/settings/utils" + "darkbot/app/scrappy/tests" + "darkbot/app/settings/logus" + "darkbot/app/settings/utils" "os" "path" "testing" diff --git a/scrappy/base/parser.go b/app/scrappy/base/parser.go similarity index 92% rename from scrappy/base/parser.go rename to app/scrappy/base/parser.go index e2e85c0..9abf86f 100644 --- a/scrappy/base/parser.go +++ b/app/scrappy/base/parser.go @@ -1,8 +1,8 @@ package base import ( - "darkbot/scrappy/shared/records" - "darkbot/settings/logus" + "darkbot/app/scrappy/shared/records" + "darkbot/app/settings/logus" "encoding/json" ) diff --git a/scrappy/base/storage.go b/app/scrappy/base/storage.go similarity index 87% rename from scrappy/base/storage.go rename to app/scrappy/base/storage.go index a25375a..3ab9f71 100644 --- a/scrappy/base/storage.go +++ b/app/scrappy/base/storage.go @@ -1,10 +1,10 @@ package base import ( - "darkbot/scrappy/shared/parser" - "darkbot/scrappy/shared/records" + "darkbot/app/scrappy/shared/parser" + "darkbot/app/scrappy/shared/records" - "darkbot/settings/logus" + "darkbot/app/settings/logus" ) type Base struct { diff --git a/scrappy/base/storage_test.go b/app/scrappy/base/storage_test.go similarity index 95% rename from scrappy/base/storage_test.go rename to app/scrappy/base/storage_test.go index 2a29d46..8272e8e 100644 --- a/scrappy/base/storage_test.go +++ b/app/scrappy/base/storage_test.go @@ -1,7 +1,7 @@ package base import ( - "darkbot/settings/logus" + "darkbot/app/settings/logus" "fmt" "testing" diff --git a/scrappy/base/testdata/.gitignore b/app/scrappy/base/testdata/.gitignore similarity index 100% rename from scrappy/base/testdata/.gitignore rename to app/scrappy/base/testdata/.gitignore diff --git a/scrappy/base/testdata/basedata.json b/app/scrappy/base/testdata/basedata.json similarity index 100% rename from scrappy/base/testdata/basedata.json rename to app/scrappy/base/testdata/basedata.json diff --git a/scrappy/base/testdata/basedata2.json b/app/scrappy/base/testdata/basedata2.json similarity index 100% rename from scrappy/base/testdata/basedata2.json rename to app/scrappy/base/testdata/basedata2.json diff --git a/scrappy/baseattack/api.go b/app/scrappy/baseattack/api.go similarity index 88% rename from scrappy/baseattack/api.go rename to app/scrappy/baseattack/api.go index 4c4230e..4159a86 100644 --- a/scrappy/baseattack/api.go +++ b/app/scrappy/baseattack/api.go @@ -1,10 +1,10 @@ package baseattack import ( - "darkbot/scrappy/shared/api" - "darkbot/settings" - "darkbot/settings/logus" - "darkbot/settings/types" + "darkbot/app/scrappy/shared/api" + "darkbot/app/settings" + "darkbot/app/settings/logus" + "darkbot/app/settings/types" ) type basesattackAPI struct { diff --git a/scrappy/baseattack/api_test.go b/app/scrappy/baseattack/api_test.go similarity index 100% rename from scrappy/baseattack/api_test.go rename to app/scrappy/baseattack/api_test.go diff --git a/scrappy/baseattack/mock.go b/app/scrappy/baseattack/mock.go similarity index 91% rename from scrappy/baseattack/mock.go rename to app/scrappy/baseattack/mock.go index 7d6c2ec..3583df5 100644 --- a/scrappy/baseattack/mock.go +++ b/app/scrappy/baseattack/mock.go @@ -1,8 +1,8 @@ package baseattack import ( - "darkbot/scrappy/tests" - "darkbot/settings/logus" + "darkbot/app/scrappy/tests" + "darkbot/app/settings/logus" "os" "path" ) diff --git a/scrappy/baseattack/mock_test.go b/app/scrappy/baseattack/mock_test.go similarity index 83% rename from scrappy/baseattack/mock_test.go rename to app/scrappy/baseattack/mock_test.go index a784a27..8190f97 100644 --- a/scrappy/baseattack/mock_test.go +++ b/app/scrappy/baseattack/mock_test.go @@ -1,9 +1,9 @@ package baseattack import ( - "darkbot/scrappy/tests" - "darkbot/settings/logus" - "darkbot/settings/utils" + "darkbot/app/scrappy/tests" + "darkbot/app/settings/logus" + "darkbot/app/settings/utils" "os" "path" "testing" diff --git a/scrappy/baseattack/testdata/data.json b/app/scrappy/baseattack/testdata/data.json similarity index 100% rename from scrappy/baseattack/testdata/data.json rename to app/scrappy/baseattack/testdata/data.json diff --git a/scrappy/baseattack/testdata/data_lp.json b/app/scrappy/baseattack/testdata/data_lp.json similarity index 100% rename from scrappy/baseattack/testdata/data_lp.json rename to app/scrappy/baseattack/testdata/data_lp.json diff --git a/scrappy/fixtures.go b/app/scrappy/fixtures.go similarity index 82% rename from scrappy/fixtures.go rename to app/scrappy/fixtures.go index 5836b8f..e8ca46e 100644 --- a/scrappy/fixtures.go +++ b/app/scrappy/fixtures.go @@ -1,9 +1,9 @@ package scrappy import ( - "darkbot/scrappy/base" - "darkbot/scrappy/baseattack" - "darkbot/scrappy/player" + "darkbot/app/scrappy/base" + "darkbot/app/scrappy/baseattack" + "darkbot/app/scrappy/player" ) func FixtureNewStorageWithPlayers(players *player.PlayerStorage) *ScrappyStorage { diff --git a/scrappy/main.go b/app/scrappy/main.go similarity index 90% rename from scrappy/main.go rename to app/scrappy/main.go index fddf6c3..39703f0 100644 --- a/scrappy/main.go +++ b/app/scrappy/main.go @@ -1,11 +1,11 @@ package scrappy import ( - "darkbot/scrappy/base" - "darkbot/scrappy/baseattack" - "darkbot/scrappy/player" - "darkbot/settings" - "darkbot/settings/logus" + "darkbot/app/scrappy/base" + "darkbot/app/scrappy/baseattack" + "darkbot/app/scrappy/player" + "darkbot/app/settings" + "darkbot/app/settings/logus" "time" ) diff --git a/scrappy/player/api.go b/app/scrappy/player/api.go similarity index 80% rename from scrappy/player/api.go rename to app/scrappy/player/api.go index 55ee3e6..1b86962 100644 --- a/scrappy/player/api.go +++ b/app/scrappy/player/api.go @@ -1,9 +1,9 @@ package player import ( - "darkbot/scrappy/shared/api" - "darkbot/settings" - "darkbot/settings/types" + "darkbot/app/scrappy/shared/api" + "darkbot/app/settings" + "darkbot/app/settings/types" ) type PlayerAPI struct { diff --git a/scrappy/player/mock.go b/app/scrappy/player/mock.go similarity index 90% rename from scrappy/player/mock.go rename to app/scrappy/player/mock.go index e8e178c..fc3441e 100644 --- a/scrappy/player/mock.go +++ b/app/scrappy/player/mock.go @@ -1,9 +1,9 @@ package player import ( - "darkbot/scrappy/tests" - "darkbot/settings/logus" - "darkbot/settings/utils" + "darkbot/app/scrappy/tests" + "darkbot/app/settings/logus" + "darkbot/app/settings/utils" "os" "path" "testing" diff --git a/scrappy/player/parser.go b/app/scrappy/player/parser.go similarity index 93% rename from scrappy/player/parser.go rename to app/scrappy/player/parser.go index 2631423..de9b8ae 100644 --- a/scrappy/player/parser.go +++ b/app/scrappy/player/parser.go @@ -1,8 +1,8 @@ package player import ( - "darkbot/scrappy/shared/records" - "darkbot/settings/logus" + "darkbot/app/scrappy/shared/records" + "darkbot/app/settings/logus" "encoding/json" ) diff --git a/scrappy/player/storage.go b/app/scrappy/player/storage.go similarity index 88% rename from scrappy/player/storage.go rename to app/scrappy/player/storage.go index 737a99b..a7e8ad8 100644 --- a/scrappy/player/storage.go +++ b/app/scrappy/player/storage.go @@ -1,9 +1,9 @@ package player import ( - "darkbot/scrappy/shared/parser" - "darkbot/scrappy/shared/records" - "darkbot/settings/logus" + "darkbot/app/scrappy/shared/parser" + "darkbot/app/scrappy/shared/records" + "darkbot/app/settings/logus" ) type Player struct { diff --git a/scrappy/player/storage_test.go b/app/scrappy/player/storage_test.go similarity index 93% rename from scrappy/player/storage_test.go rename to app/scrappy/player/storage_test.go index ad92690..bc97bea 100644 --- a/scrappy/player/storage_test.go +++ b/app/scrappy/player/storage_test.go @@ -1,7 +1,7 @@ package player import ( - "darkbot/settings/logus" + "darkbot/app/settings/logus" "fmt" "testing" diff --git a/scrappy/player/testdata/playerdata.json b/app/scrappy/player/testdata/playerdata.json similarity index 100% rename from scrappy/player/testdata/playerdata.json rename to app/scrappy/player/testdata/playerdata.json diff --git a/scrappy/shared/api/interface.go b/app/scrappy/shared/api/interface.go similarity index 100% rename from scrappy/shared/api/interface.go rename to app/scrappy/shared/api/interface.go diff --git a/scrappy/shared/api/request.go b/app/scrappy/shared/api/request.go similarity index 86% rename from scrappy/shared/api/request.go rename to app/scrappy/shared/api/request.go index 988bc43..d58d440 100644 --- a/scrappy/shared/api/request.go +++ b/app/scrappy/shared/api/request.go @@ -1,8 +1,8 @@ package api import ( - "darkbot/settings/logus" - "darkbot/settings/types" + "darkbot/app/settings/logus" + "darkbot/app/settings/types" "io" "net/http" ) diff --git a/scrappy/shared/parser/generic.go b/app/scrappy/shared/parser/generic.go similarity index 100% rename from scrappy/shared/parser/generic.go rename to app/scrappy/shared/parser/generic.go diff --git a/scrappy/shared/records/generic_records.go b/app/scrappy/shared/records/generic_records.go similarity index 93% rename from scrappy/shared/records/generic_records.go rename to app/scrappy/shared/records/generic_records.go index c9e310d..885c988 100644 --- a/scrappy/shared/records/generic_records.go +++ b/app/scrappy/shared/records/generic_records.go @@ -1,8 +1,8 @@ package records import ( - "darkbot/settings/logus" - "darkbot/settings/utils" + "darkbot/app/settings/logus" + "darkbot/app/settings/utils" "sync" ) diff --git a/scrappy/shared/records/generic_records_test.go b/app/scrappy/shared/records/generic_records_test.go similarity index 100% rename from scrappy/shared/records/generic_records_test.go rename to app/scrappy/shared/records/generic_records_test.go diff --git a/scrappy/shared/records/generic_stamped_objects.go b/app/scrappy/shared/records/generic_stamped_objects.go similarity index 100% rename from scrappy/shared/records/generic_stamped_objects.go rename to app/scrappy/shared/records/generic_stamped_objects.go diff --git a/scrappy/shared/records/generic_stamped_test.go b/app/scrappy/shared/records/generic_stamped_test.go similarity index 100% rename from scrappy/shared/records/generic_stamped_test.go rename to app/scrappy/shared/records/generic_stamped_test.go diff --git a/scrappy/tests/fixtures.go b/app/scrappy/tests/fixtures.go similarity index 100% rename from scrappy/tests/fixtures.go rename to app/scrappy/tests/fixtures.go diff --git a/settings/envs/envs.go b/app/settings/envs/envs.go similarity index 94% rename from settings/envs/envs.go rename to app/settings/envs/envs.go index ae7aa06..03c127f 100644 --- a/settings/envs/envs.go +++ b/app/settings/envs/envs.go @@ -1,7 +1,7 @@ package envs import ( - "darkbot/settings/types" + "darkbot/app/settings/types" "os" "strings" ) diff --git a/settings/logus/logger.go b/app/settings/logus/logger.go similarity index 98% rename from settings/logus/logger.go rename to app/settings/logus/logger.go index 6dc69d6..7123f7f 100644 --- a/settings/logus/logger.go +++ b/app/settings/logus/logger.go @@ -1,8 +1,8 @@ package logus import ( - "darkbot/settings/envs" - "darkbot/settings/types" + "darkbot/app/settings/envs" + "darkbot/app/settings/types" "fmt" "log/slog" "os" diff --git a/settings/logus/params.go b/app/settings/logus/params.go similarity index 98% rename from settings/logus/params.go rename to app/settings/logus/params.go index 6d7e46a..eddefbb 100644 --- a/settings/logus/params.go +++ b/app/settings/logus/params.go @@ -1,7 +1,7 @@ package logus import ( - "darkbot/settings/types" + "darkbot/app/settings/types" "fmt" "log/slog" ) diff --git a/settings/logus/params_test.go b/app/settings/logus/params_test.go similarity index 100% rename from settings/logus/params_test.go rename to app/settings/logus/params_test.go diff --git a/settings/main.go b/app/settings/main.go similarity index 92% rename from settings/main.go rename to app/settings/main.go index 881e6e6..976d632 100644 --- a/settings/main.go +++ b/app/settings/main.go @@ -1,9 +1,9 @@ package settings import ( - "darkbot/settings/logus" - "darkbot/settings/types" - "darkbot/settings/utils" + "darkbot/app/settings/logus" + "darkbot/app/settings/types" + "darkbot/app/settings/utils" "path/filepath" "strconv" @@ -35,8 +35,6 @@ type ConfigScheme struct { var LoopDelay types.ScrappyLoopDelay var Config ConfigScheme -type dbpath types.Dbpath - var Dbpath types.Dbpath var Workdir string @@ -46,7 +44,7 @@ func NewDBPath(dbname string) types.Dbpath { func load() { logus.Info("identifying folder of settings") - Workdir = filepath.Dir(utils.GetCurrrentFolder()) + Workdir = filepath.Dir(filepath.Dir(utils.GetCurrrentFolder())) err := godotenv.Load(filepath.Join(Workdir, ".env")) if err == nil { diff --git a/settings/main_test.go b/app/settings/main_test.go similarity index 100% rename from settings/main_test.go rename to app/settings/main_test.go diff --git a/settings/types/types.go b/app/settings/types/types.go similarity index 100% rename from settings/types/types.go rename to app/settings/types/types.go diff --git a/settings/utils/comprehension.go b/app/settings/utils/comprehension.go similarity index 100% rename from settings/utils/comprehension.go rename to app/settings/utils/comprehension.go diff --git a/settings/utils/exceptions.go b/app/settings/utils/exceptions.go similarity index 100% rename from settings/utils/exceptions.go rename to app/settings/utils/exceptions.go diff --git a/settings/utils/file.go b/app/settings/utils/file.go similarity index 96% rename from settings/utils/file.go rename to app/settings/utils/file.go index dcf82ed..59be330 100644 --- a/settings/utils/file.go +++ b/app/settings/utils/file.go @@ -2,7 +2,7 @@ package utils import ( "bufio" - "darkbot/settings/logus" + "darkbot/app/settings/logus" "fmt" "os" ) diff --git a/settings/utils/os.go b/app/settings/utils/os.go similarity index 100% rename from settings/utils/os.go rename to app/settings/utils/os.go diff --git a/settings/utils/ptr.go b/app/settings/utils/ptr.go similarity index 100% rename from settings/utils/ptr.go rename to app/settings/utils/ptr.go diff --git a/settings/utils/regex.go b/app/settings/utils/regex.go similarity index 82% rename from settings/utils/regex.go rename to app/settings/utils/regex.go index 51950e0..a399d37 100644 --- a/settings/utils/regex.go +++ b/app/settings/utils/regex.go @@ -1,8 +1,8 @@ package utils import ( - "darkbot/settings/logus" - "darkbot/settings/types" + "darkbot/app/settings/logus" + "darkbot/app/settings/types" "regexp" ) diff --git a/settings/utils/secrets.go b/app/settings/utils/secrets.go similarity index 100% rename from settings/utils/secrets.go rename to app/settings/utils/secrets.go diff --git a/settings/utils/shell.go b/app/settings/utils/shell.go similarity index 93% rename from settings/utils/shell.go rename to app/settings/utils/shell.go index 9cc1e18..27afa10 100644 --- a/settings/utils/shell.go +++ b/app/settings/utils/shell.go @@ -1,7 +1,7 @@ package utils import ( - "darkbot/settings/logus" + "darkbot/app/settings/logus" "fmt" "os" "os/exec" diff --git a/settings/utils/sleep.go b/app/settings/utils/sleep.go similarity index 100% rename from settings/utils/sleep.go rename to app/settings/utils/sleep.go diff --git a/settings/utils/template.go b/app/settings/utils/template.go similarity index 95% rename from settings/utils/template.go rename to app/settings/utils/template.go index 724a887..bd8db3b 100644 --- a/settings/utils/template.go +++ b/app/settings/utils/template.go @@ -2,7 +2,7 @@ package utils import ( "bytes" - "darkbot/settings/logus" + "darkbot/app/settings/logus" "strings" "text/template" ) diff --git a/settings/utils/tests.go b/app/settings/utils/tests.go similarity index 100% rename from settings/utils/tests.go rename to app/settings/utils/tests.go diff --git a/settings/version.txt b/app/settings/version.txt similarity index 100% rename from settings/version.txt rename to app/settings/version.txt diff --git a/viewer/apis/apis.go b/app/viewer/apis/apis.go similarity index 95% rename from viewer/apis/apis.go rename to app/viewer/apis/apis.go index 68abf0c..b0c9ec2 100644 --- a/viewer/apis/apis.go +++ b/app/viewer/apis/apis.go @@ -1,10 +1,10 @@ package apis import ( - "darkbot/configurator" - "darkbot/discorder" - "darkbot/scrappy" - "darkbot/settings/types" + "darkbot/app/configurator" + "darkbot/app/discorder" + "darkbot/app/scrappy" + "darkbot/app/settings/types" ) type Players struct { diff --git a/viewer/channel.go b/app/viewer/channel.go similarity index 94% rename from viewer/channel.go rename to app/viewer/channel.go index 3a7bab8..420f5ed 100644 --- a/viewer/channel.go +++ b/app/viewer/channel.go @@ -1,11 +1,11 @@ package viewer import ( - "darkbot/discorder" - "darkbot/settings/logus" - "darkbot/settings/types" - "darkbot/viewer/apis" - "darkbot/viewer/templ" + "darkbot/app/discorder" + "darkbot/app/settings/logus" + "darkbot/app/settings/types" + "darkbot/app/viewer/apis" + "darkbot/app/viewer/templ" "strings" "time" ) diff --git a/viewer/run.go b/app/viewer/run.go similarity index 80% rename from viewer/run.go rename to app/viewer/run.go index 25611b7..7b62245 100644 --- a/viewer/run.go +++ b/app/viewer/run.go @@ -5,8 +5,8 @@ Loop configurator settings, and send view to coresponding channels package viewer import ( - "darkbot/settings" - "darkbot/settings/logus" + "darkbot/app/settings" + "darkbot/app/settings/logus" ) func Run() { diff --git a/viewer/templ/alert.go b/app/viewer/templ/alert.go similarity index 90% rename from viewer/templ/alert.go rename to app/viewer/templ/alert.go index 7c8ea97..54d26c9 100644 --- a/viewer/templ/alert.go +++ b/app/viewer/templ/alert.go @@ -1,10 +1,10 @@ package templ import ( - "darkbot/settings/logus" - "darkbot/settings/types" - "darkbot/settings/utils" - "darkbot/viewer/apis" + "darkbot/app/settings/logus" + "darkbot/app/settings/types" + "darkbot/app/settings/utils" + "darkbot/app/viewer/apis" _ "embed" "fmt" "text/template" diff --git a/viewer/templ/alert_template.md b/app/viewer/templ/alert_template.md similarity index 100% rename from viewer/templ/alert_template.md rename to app/viewer/templ/alert_template.md diff --git a/viewer/templ/anouncement.go b/app/viewer/templ/anouncement.go similarity index 100% rename from viewer/templ/anouncement.go rename to app/viewer/templ/anouncement.go diff --git a/viewer/templ/base.go b/app/viewer/templ/base.go similarity index 97% rename from viewer/templ/base.go rename to app/viewer/templ/base.go index 390979a..c59a367 100644 --- a/viewer/templ/base.go +++ b/app/viewer/templ/base.go @@ -1,11 +1,11 @@ package templ import ( - "darkbot/scrappy/base" - "darkbot/settings/logus" - "darkbot/settings/types" - "darkbot/settings/utils" - "darkbot/viewer/apis" + "darkbot/app/scrappy/base" + "darkbot/app/settings/logus" + "darkbot/app/settings/types" + "darkbot/app/settings/utils" + "darkbot/app/viewer/apis" _ "embed" "fmt" "sort" diff --git a/viewer/templ/base_template.md b/app/viewer/templ/base_template.md similarity index 100% rename from viewer/templ/base_template.md rename to app/viewer/templ/base_template.md diff --git a/viewer/templ/base_test.go b/app/viewer/templ/base_test.go similarity index 96% rename from viewer/templ/base_test.go rename to app/viewer/templ/base_test.go index 070611a..5309393 100644 --- a/viewer/templ/base_test.go +++ b/app/viewer/templ/base_test.go @@ -1,15 +1,15 @@ package templ import ( - "darkbot/configurator" - "darkbot/scrappy" - "darkbot/scrappy/base" - "darkbot/scrappy/baseattack" - "darkbot/scrappy/player" - "darkbot/scrappy/shared/records" - "darkbot/settings/logus" - "darkbot/settings/types" - "darkbot/viewer/apis" + "darkbot/app/configurator" + "darkbot/app/scrappy" + "darkbot/app/scrappy/base" + "darkbot/app/scrappy/baseattack" + "darkbot/app/scrappy/player" + "darkbot/app/scrappy/shared/records" + "darkbot/app/settings/logus" + "darkbot/app/settings/types" + "darkbot/app/viewer/apis" "fmt" "strings" "testing" diff --git a/viewer/templ/derivatives.go b/app/viewer/templ/derivatives.go similarity index 94% rename from viewer/templ/derivatives.go rename to app/viewer/templ/derivatives.go index 1e2f8b6..ac50cc5 100644 --- a/viewer/templ/derivatives.go +++ b/app/viewer/templ/derivatives.go @@ -1,10 +1,10 @@ package templ import ( - "darkbot/scrappy/base" - "darkbot/scrappy/shared/records" - "darkbot/settings/logus" - "darkbot/viewer/apis" + "darkbot/app/scrappy/base" + "darkbot/app/scrappy/shared/records" + "darkbot/app/settings/logus" + "darkbot/app/viewer/apis" "math" ) diff --git a/viewer/templ/player.go b/app/viewer/templ/player.go similarity index 98% rename from viewer/templ/player.go rename to app/viewer/templ/player.go index daee071..de2c11c 100644 --- a/viewer/templ/player.go +++ b/app/viewer/templ/player.go @@ -1,11 +1,11 @@ package templ import ( - "darkbot/scrappy/player" - "darkbot/settings/logus" - "darkbot/settings/types" - "darkbot/settings/utils" - "darkbot/viewer/apis" + "darkbot/app/scrappy/player" + "darkbot/app/settings/logus" + "darkbot/app/settings/types" + "darkbot/app/settings/utils" + "darkbot/app/viewer/apis" _ "embed" "fmt" "strings" diff --git a/viewer/templ/player_template.md b/app/viewer/templ/player_template.md similarity index 100% rename from viewer/templ/player_template.md rename to app/viewer/templ/player_template.md diff --git a/viewer/templ/player_test.go b/app/viewer/templ/player_test.go similarity index 95% rename from viewer/templ/player_test.go rename to app/viewer/templ/player_test.go index 67edb04..ff61bda 100644 --- a/viewer/templ/player_test.go +++ b/app/viewer/templ/player_test.go @@ -1,11 +1,11 @@ package templ import ( - "darkbot/configurator" - "darkbot/scrappy" - "darkbot/scrappy/player" - "darkbot/scrappy/shared/records" - "darkbot/settings/types" + "darkbot/app/configurator" + "darkbot/app/scrappy" + "darkbot/app/scrappy/player" + "darkbot/app/scrappy/shared/records" + "darkbot/app/settings/types" "fmt" "testing" diff --git a/viewer/templ/shared.go b/app/viewer/templ/shared.go similarity index 94% rename from viewer/templ/shared.go rename to app/viewer/templ/shared.go index 7b140db..48d4715 100644 --- a/viewer/templ/shared.go +++ b/app/viewer/templ/shared.go @@ -1,9 +1,9 @@ package templ import ( - "darkbot/settings/logus" - "darkbot/settings/types" - "darkbot/viewer/apis" + "darkbot/app/settings/logus" + "darkbot/app/settings/types" + "darkbot/app/viewer/apis" "fmt" "strings" "time" diff --git a/viewer/viewer.go b/app/viewer/viewer.go similarity index 91% rename from viewer/viewer.go rename to app/viewer/viewer.go index f4c08e1..6580184 100644 --- a/viewer/viewer.go +++ b/app/viewer/viewer.go @@ -1,10 +1,10 @@ package viewer import ( - "darkbot/configurator" - "darkbot/settings" - "darkbot/settings/logus" - "darkbot/settings/types" + "darkbot/app/configurator" + "darkbot/app/settings" + "darkbot/app/settings/logus" + "darkbot/app/settings/types" "time" ) diff --git a/main.go b/main.go index d607c7e..cfbf215 100644 --- a/main.go +++ b/main.go @@ -3,7 +3,7 @@ Copyright © 2022 NAME HERE */ package main -import "darkbot/management" +import "darkbot/app/management" func main() { management.Execute()