Skip to content

Commit

Permalink
feat: refactor package
Browse files Browse the repository at this point in the history
  • Loading branch information
mgufrone committed Nov 9, 2023
1 parent 23562b1 commit 51f9e39
Show file tree
Hide file tree
Showing 23 changed files with 43 additions and 43 deletions.
2 changes: 1 addition & 1 deletion app/providers/console_service_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/goravel/framework/contracts/foundation"
"github.com/goravel/framework/facades"

"mgufrone.dev/job-tracking/app/console"
"mgufrone.dev/jenkins-bot-go/app/console"
)

type ConsoleServiceProvider struct {
Expand Down
2 changes: 1 addition & 1 deletion app/providers/database_service_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/goravel/framework/contracts/foundation"
"github.com/goravel/framework/facades"

"mgufrone.dev/job-tracking/database/seeders"
"mgufrone.dev/jenkins-bot-go/database/seeders"
)

type DatabaseServiceProvider struct {
Expand Down
6 changes: 3 additions & 3 deletions app/providers/event_service_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"github.com/goravel/framework/contracts/event"
"github.com/goravel/framework/contracts/foundation"
"github.com/goravel/framework/facades"
"mgufrone.dev/job-tracking/packages/jenkins/listeners"
"mgufrone.dev/job-tracking/packages/slack/events"
listeners2 "mgufrone.dev/job-tracking/packages/slack/listeners"
"mgufrone.dev/jenkins-bot-go/packages/jenkins/listeners"
"mgufrone.dev/jenkins-bot-go/packages/slack/events"
listeners2 "mgufrone.dev/jenkins-bot-go/packages/slack/listeners"
)

type EventServiceProvider struct {
Expand Down
4 changes: 2 additions & 2 deletions app/providers/grpc_service_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"github.com/goravel/framework/contracts/foundation"
"github.com/goravel/framework/facades"

"mgufrone.dev/job-tracking/app/grpc"
"mgufrone.dev/job-tracking/routes"
"mgufrone.dev/jenkins-bot-go/app/grpc"
"mgufrone.dev/jenkins-bot-go/routes"
)

type GrpcServiceProvider struct {
Expand Down
4 changes: 2 additions & 2 deletions app/providers/route_service_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"github.com/goravel/framework/contracts/foundation"
"github.com/goravel/framework/facades"

"mgufrone.dev/job-tracking/app/http"
"mgufrone.dev/job-tracking/routes"
"mgufrone.dev/jenkins-bot-go/app/http"
"mgufrone.dev/jenkins-bot-go/routes"
)

type RouteServiceProvider struct {
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package bootstrap
import (
"github.com/goravel/framework/foundation"

"mgufrone.dev/job-tracking/config"
"mgufrone.dev/jenkins-bot-go/config"
)

func Boot() {
Expand Down
6 changes: 3 additions & 3 deletions config/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ import (
"github.com/goravel/framework/testing"
"github.com/goravel/framework/validation"
"github.com/goravel/gin"
"mgufrone.dev/job-tracking/packages/jenkins"
"mgufrone.dev/job-tracking/packages/slack"
"mgufrone.dev/jenkins-bot-go/packages/jenkins"
"mgufrone.dev/jenkins-bot-go/packages/slack"

"mgufrone.dev/job-tracking/app/providers"
"mgufrone.dev/jenkins-bot-go/app/providers"
)

// Boot Start all init methods of the current folder to bootstrap all config.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module mgufrone.dev/job-tracking
module mgufrone.dev/jenkins-bot-go

go 1.20

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"github.com/goravel/framework/facades"

"mgufrone.dev/job-tracking/bootstrap"
"mgufrone.dev/jenkins-bot-go/bootstrap"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions packages/jenkins/facades/jenkins.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package facades
import (
"log"

"mgufrone.dev/job-tracking/packages/jenkins"
"mgufrone.dev/job-tracking/packages/jenkins/contracts"
"mgufrone.dev/jenkins-bot-go/packages/jenkins"
"mgufrone.dev/jenkins-bot-go/packages/jenkins/contracts"
)

func Jenkins() contracts.Jenkins {
Expand Down
4 changes: 2 additions & 2 deletions packages/jenkins/handlers/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/goravel/framework/contracts/log"
"github.com/goravel/framework/facades"
"github.com/slack-go/slack"
"mgufrone.dev/job-tracking/packages/jenkins/contracts"
"mgufrone.dev/job-tracking/packages/slack/events"
"mgufrone.dev/jenkins-bot-go/packages/jenkins/contracts"
"mgufrone.dev/jenkins-bot-go/packages/slack/events"
"strconv"
"strings"
)
Expand Down
4 changes: 2 additions & 2 deletions packages/jenkins/handlers/request_approval.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"github.com/goravel/framework/contracts/http"
"github.com/slack-go/slack"
"mgufrone.dev/job-tracking/app/http/requests"
facades2 "mgufrone.dev/job-tracking/packages/slack/facades"
"mgufrone.dev/jenkins-bot-go/app/http/requests"
facades2 "mgufrone.dev/jenkins-bot-go/packages/slack/facades"
)

type RequestApproval struct {
Expand Down
2 changes: 1 addition & 1 deletion packages/jenkins/jenkins.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"github.com/mgufrone/go-httpclient"
"github.com/pkg/errors"
"mgufrone.dev/job-tracking/packages/jenkins/contracts"
"mgufrone.dev/jenkins-bot-go/packages/jenkins/contracts"
"net/http"
"net/url"
"strings"
Expand Down
2 changes: 1 addition & 1 deletion packages/jenkins/listeners/on_interaction_submitted.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package listeners
import (
"context"
"github.com/goravel/framework/contracts/event"
facades2 "mgufrone.dev/job-tracking/packages/jenkins/facades"
facades2 "mgufrone.dev/jenkins-bot-go/packages/jenkins/facades"
)

type OnInteractionSubmitted struct {
Expand Down
6 changes: 3 additions & 3 deletions packages/jenkins/service_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"github.com/goravel/framework/contracts/route"
"github.com/mgufrone/go-httpclient"
"github.com/mgufrone/go-httpclient/interceptor"
"mgufrone.dev/job-tracking/packages/jenkins/contracts"
"mgufrone.dev/job-tracking/packages/jenkins/handlers"
"mgufrone.dev/jenkins-bot-go/packages/jenkins/contracts"
"mgufrone.dev/jenkins-bot-go/packages/jenkins/handlers"
"net/http"
"net/url"
)
Expand Down Expand Up @@ -49,7 +49,7 @@ func (receiver *ServiceProvider) Register(app foundation.Application) {

func (receiver *ServiceProvider) Boot(app foundation.Application) {
rt := app.MakeRoute()
app.Publishes("mgufrone.dev/job-tracking/packages/jenkins", map[string]string{
app.Publishes("mgufrone.dev/jenkins-bot-go/packages/jenkins", map[string]string{
"config/jenkins.go": app.ConfigPath("jenkins.go"),
})
rt.Prefix("/approval").Group(func(router route.Router) {
Expand Down
2 changes: 1 addition & 1 deletion packages/slack/commands/slack_socket.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/goravel/framework/contracts/event"
"github.com/goravel/framework/facades"
"github.com/slack-go/slack/socketmode"
"mgufrone.dev/job-tracking/packages/slack/events"
"mgufrone.dev/jenkins-bot-go/packages/slack/events"
)

type Console struct {
Expand Down
4 changes: 2 additions & 2 deletions packages/slack/facades/slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
slack2 "github.com/slack-go/slack"
"log"

"mgufrone.dev/job-tracking/packages/slack"
"mgufrone.dev/job-tracking/packages/slack/contracts"
"mgufrone.dev/jenkins-bot-go/packages/slack"
"mgufrone.dev/jenkins-bot-go/packages/slack/contracts"
)

func Slack() contracts.Slack {
Expand Down
2 changes: 1 addition & 1 deletion packages/slack/listeners/on_response_url.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"github.com/goravel/framework/contracts/event"
slack2 "github.com/slack-go/slack"
facades2 "mgufrone.dev/job-tracking/packages/slack/facades"
facades2 "mgufrone.dev/jenkins-bot-go/packages/slack/facades"
)

type OnResponseURL struct {
Expand Down
4 changes: 2 additions & 2 deletions packages/slack/service_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/goravel/framework/contracts/log"
"github.com/slack-go/slack"
"github.com/slack-go/slack/socketmode"
"mgufrone.dev/job-tracking/packages/slack/commands"
"mgufrone.dev/jenkins-bot-go/packages/slack/commands"
)

const Binding = "slack.service"
Expand Down Expand Up @@ -62,7 +62,7 @@ func (receiver *ServiceProvider) Register(app foundation.Application) {
func (receiver *ServiceProvider) Boot(app foundation.Application) {
cli, _ := app.Make(BindingSocket)
eventManager := app.MakeEvent()
app.Publishes("mgufrone.dev/job-tracking/packages/slack", map[string]string{
app.Publishes("mgufrone.dev/jenkins-bot-go/packages/slack", map[string]string{
"config/slack.go": app.ConfigPath("slack.go"),
})
app.Commands([]console.Command{
Expand Down
12 changes: 6 additions & 6 deletions tests/feature/jenkins_slack_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (
"github.com/slack-go/slack"
mock2 "github.com/stretchr/testify/mock"
"github.com/stretchr/testify/suite"
"mgufrone.dev/job-tracking/packages/jenkins"
"mgufrone.dev/job-tracking/packages/jenkins/contracts"
facades2 "mgufrone.dev/job-tracking/packages/jenkins/facades"
"mgufrone.dev/job-tracking/packages/jenkins/handlers"
"mgufrone.dev/job-tracking/tests"
"mgufrone.dev/job-tracking/tests/mocks"
"mgufrone.dev/jenkins-bot-go/packages/jenkins"
"mgufrone.dev/jenkins-bot-go/packages/jenkins/contracts"
facades2 "mgufrone.dev/jenkins-bot-go/packages/jenkins/facades"
"mgufrone.dev/jenkins-bot-go/packages/jenkins/handlers"
"mgufrone.dev/jenkins-bot-go/tests"
"mgufrone.dev/jenkins-bot-go/tests/mocks"
"testing"
)

Expand Down
6 changes: 3 additions & 3 deletions tests/feature/jenkins_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/suite"
"io"
"mgufrone.dev/job-tracking/packages/slack"
"mgufrone.dev/job-tracking/tests"
"mgufrone.dev/job-tracking/tests/mocks"
"mgufrone.dev/jenkins-bot-go/packages/slack"
"mgufrone.dev/jenkins-bot-go/tests"
"mgufrone.dev/jenkins-bot-go/tests/mocks"
"net/http"
"net/http/httptest"
"net/url"
Expand Down
2 changes: 1 addition & 1 deletion tests/mocks/jenkins.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package mocks
import (
"context"
mock2 "github.com/stretchr/testify/mock"
"mgufrone.dev/job-tracking/packages/jenkins/contracts"
"mgufrone.dev/jenkins-bot-go/packages/jenkins/contracts"
)

type MockJenkins struct {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_case.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package tests
import (
"github.com/goravel/framework/testing"

"mgufrone.dev/job-tracking/bootstrap"
"mgufrone.dev/jenkins-bot-go/bootstrap"
)

func init() {
Expand Down

0 comments on commit 51f9e39

Please sign in to comment.