Skip to content

Commit

Permalink
refactor: move all app code to single subfolder
Browse files Browse the repository at this point in the history
  • Loading branch information
dd84ai committed Nov 1, 2023
1 parent 3b3ca96 commit b7d603c
Show file tree
Hide file tree
Showing 106 changed files with 185 additions and 187 deletions.
4 changes: 2 additions & 2 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion api/api.go → app/api/api.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package api

import (
"darkbot/api/routes"
"darkbot/app/api/routes"
_ "embed"
"net/http"
)
Expand Down
2 changes: 1 addition & 1 deletion api/api_test.go → app/api/api_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package api

import (
"darkbot/settings/logus"
"darkbot/app/settings/logus"
"fmt"
"io"
"net/http"
Expand Down
2 changes: 1 addition & 1 deletion api/management/devrun.go → app/api/management/devrun.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"darkbot/api/routes"
"darkbot/app/api/routes"
_ "embed"
"net/http"
)
Expand Down
2 changes: 1 addition & 1 deletion api/routes/home.go → app/api/routes/home.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package routes

import (
"darkbot/api/web"
"darkbot/app/api/web"
_ "embed"
"net/http"
)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion api/routes/main.go → app/api/routes/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package routes

import (
"darkbot/api/web"
"darkbot/app/api/web"
"net/http"
)

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion api/web/not_found.go → app/api/web/not_found.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package web

import (
"darkbot/settings/utils"
"darkbot/app/settings/utils"
_ "embed"
"net/http"
"text/template"
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions configurator/alerts.go → app/configurator/alerts.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package configurator

import (
"darkbot/configurator/models"
"darkbot/settings/types"
"darkbot/app/configurator/models"
"darkbot/app/settings/types"
)

type iConfiguratorBoolAlert interface {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package configurator

import (
"darkbot/settings/types"
"darkbot/settings/utils"
"darkbot/app/settings/types"
"darkbot/app/settings/utils"
"fmt"
"testing"

Expand Down
8 changes: 4 additions & 4 deletions configurator/channel.go → app/configurator/channel.go
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package configurator

import (
"darkbot/settings/types"
"darkbot/app/settings/types"
"fmt"
"testing"

Expand Down
8 changes: 4 additions & 4 deletions configurator/connection.go → app/configurator/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions configurator/fixtures.go → app/configurator/fixtures.go
Original file line number Diff line number Diff line change
@@ -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"
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package models

import (
"darkbot/settings/types"
"darkbot/app/settings/types"

"gorm.io/gorm"
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package models

import (
"darkbot/settings/types"
"darkbot/app/settings/types"

"gorm.io/gorm"
)
Expand Down
8 changes: 4 additions & 4 deletions configurator/tags.go → app/configurator/tags.go
Original file line number Diff line number Diff line change
@@ -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"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package configurator

import (
"darkbot/settings/types"
"darkbot/app/settings/types"
"fmt"
"testing"

Expand Down
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
)
Expand Down
12 changes: 6 additions & 6 deletions consoler/commands/root.go → app/consoler/commands/root.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
6 changes: 3 additions & 3 deletions consoler/commands/tags.go → app/consoler/commands/tags.go
Original file line number Diff line number Diff line change
@@ -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"

Expand Down
6 changes: 3 additions & 3 deletions consoler/consoler.go → app/consoler/consoler.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Copyright © 2022 NAME HERE <EMAIL ADDRESS>
package consoler

import (
"darkbot/consoler/commands"
"darkbot/settings"
"darkbot/settings/types"
"darkbot/app/consoler/commands"
"darkbot/app/settings"
"darkbot/app/settings/types"
"strings"
)

Expand Down
6 changes: 3 additions & 3 deletions consoler/consoler_test.go → app/consoler/consoler_test.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package consoler_types

import "darkbot/settings/types"
import "darkbot/app/settings/types"

type ChannelParams struct {
channelID types.DiscordChannelID
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions discorder/main.go → app/discorder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 5 additions & 5 deletions listener/main.go → app/listener/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
8 changes: 4 additions & 4 deletions management/anounce.go → app/management/anounce.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Copyright © 2023 NAME HERE <EMAIL ADDRESS>
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"

Expand Down
2 changes: 1 addition & 1 deletion management/check.go → app/management/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Copyright © 2023 NAME HERE <EMAIL ADDRESS>
package management

import (
"darkbot/discorder"
"darkbot/app/discorder"
"fmt"

"github.com/spf13/cobra"
Expand Down
4 changes: 2 additions & 2 deletions management/migrate.go → app/management/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Copyright © 2023 NAME HERE <EMAIL ADDRESS>
package management

import (
"darkbot/configurator"
"darkbot/settings"
"darkbot/app/configurator"
"darkbot/app/settings"
"fmt"

"github.com/spf13/cobra"
Expand Down
File renamed without changes.
14 changes: 7 additions & 7 deletions management/run.go → app/management/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ Copyright © 2023 NAME HERE <EMAIL ADDRESS>
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"

Expand Down
6 changes: 3 additions & 3 deletions scrappy/base/api.go → app/scrappy/base/api.go
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions scrappy/base/mock.go → app/scrappy/base/mock.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package base

import (
"darkbot/scrappy/tests"
"darkbot/settings/logus"
"darkbot/app/scrappy/tests"
"darkbot/app/settings/logus"
"os"
"path"
)
Expand Down
6 changes: 3 additions & 3 deletions scrappy/base/mock_test.go → app/scrappy/base/mock_test.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Loading

0 comments on commit b7d603c

Please sign in to comment.