Skip to content

Commit

Permalink
Merge pull request #140 from confetti-framework/framework
Browse files Browse the repository at this point in the history
Moving base Confetti Framework components
  • Loading branch information
reindert-vetter authored May 21, 2022
2 parents ee166ec + 22e73b5 commit 868d974
Show file tree
Hide file tree
Showing 30 changed files with 110 additions and 155 deletions.
2 changes: 1 addition & 1 deletion app/console/commands/example_command.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package commands

import (
"github.com/confetti-framework/contract/inter"
"github.com/confetti-framework/framework/inter"
)

// ExampleCommand to give you an example of what a command might look like.
Expand Down
4 changes: 2 additions & 2 deletions app/console/kernel.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package console

import (
"flag"
"github.com/confetti-framework/contract/inter"
"github.com/confetti-framework/foundation/console"
"github.com/confetti-framework/framework/foundation/console"
"github.com/confetti-framework/framework/inter"
"src/app/console/commands"
"src/app/console/getters"
)
Expand Down
4 changes: 2 additions & 2 deletions app/http/controllers/homepage.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package controllers

import (
"github.com/confetti-framework/contract/inter"
"github.com/confetti-framework/foundation/http/outcome"
"github.com/confetti-framework/framework/foundation/http/outcome"
"github.com/confetti-framework/framework/inter"
"src/resources/views"
)

Expand Down
4 changes: 2 additions & 2 deletions app/http/controllers/ping.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package controllers

import (
"github.com/confetti-framework/contract/inter"
"github.com/confetti-framework/foundation/http/outcome"
"github.com/confetti-framework/framework/foundation/http/outcome"
"github.com/confetti-framework/framework/inter"
net "net/http"
)

Expand Down
2 changes: 1 addition & 1 deletion app/http/decorator/boot_providers.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package decorator

import (
"github.com/confetti-framework/contract/inter"
"github.com/confetti-framework/framework/inter"
"src/app/providers"
)

Expand Down
6 changes: 3 additions & 3 deletions app/http/decorator/bootstrap_container.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package decorator

import (
"github.com/confetti-framework/contract/inter"
"github.com/confetti-framework/foundation"
"github.com/confetti-framework/foundation/decorator/container_decorator"
"github.com/confetti-framework/framework/foundation"
"github.com/confetti-framework/framework/foundation/decorator/container_decorator"
"github.com/confetti-framework/framework/inter"
)

var bootstraps = []inter.Bootstrap{
Expand Down
2 changes: 1 addition & 1 deletion app/http/decorator/register_providers.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package decorator

import (
"github.com/confetti-framework/contract/inter"
"github.com/confetti-framework/framework/inter"
"src/app/providers"
)

Expand Down
6 changes: 3 additions & 3 deletions app/http/kernel.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package http

import (
"github.com/confetti-framework/contract/inter"
"github.com/confetti-framework/foundation/http"
"github.com/confetti-framework/framework/foundation/http"
"github.com/confetti-framework/framework/inter"
)

// NewKernel generates a HTTP Kernel. The kernel is responsible
// NewKernel generates an HTTP Kernel. The kernel is responsible
// for building the middlewares and calling the controller.
func NewKernel(app inter.App) http.Kernel {
return http.Kernel{App: &app}
Expand Down
6 changes: 3 additions & 3 deletions app/http/middleware/api.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package middleware

import (
"github.com/confetti-framework/contract/inter"
"github.com/confetti-framework/foundation/http/middleware"
"github.com/confetti-framework/foundation/http/outcome"
"github.com/confetti-framework/framework/foundation/http/middleware"
"github.com/confetti-framework/framework/foundation/http/outcome"
"github.com/confetti-framework/framework/inter"
)

// Api contains all middlewares that only apply to the API endpoints.
Expand Down
2 changes: 1 addition & 1 deletion app/http/middleware/route_model_binding.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package middleware

import (
"github.com/confetti-framework/contract/inter"
"github.com/confetti-framework/framework/inter"
)

// RouteModelBinding For simple transformation of a parameter to a model, you can bind a
Expand Down
6 changes: 3 additions & 3 deletions app/http/middleware/web.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package middleware

import (
"github.com/confetti-framework/contract/inter"
"github.com/confetti-framework/foundation/http/middleware"
"github.com/confetti-framework/foundation/http/outcome"
"github.com/confetti-framework/framework/foundation/http/middleware"
"github.com/confetti-framework/framework/foundation/http/outcome"
"github.com/confetti-framework/framework/inter"
)

// Web contains all middlewares that only apply to the web pages.
Expand Down
2 changes: 1 addition & 1 deletion app/providers/app_service_provider.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package providers

import (
"github.com/confetti-framework/contract/inter"
"github.com/confetti-framework/framework/inter"
)

// AppServiceProvider contains all providers
Expand Down
2 changes: 1 addition & 1 deletion app/providers/env_service_provider.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package providers

import (
"github.com/confetti-framework/contract/inter"
"github.com/confetti-framework/framework/inter"
"src/config"
)

Expand Down
4 changes: 2 additions & 2 deletions app/providers/provider_index.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package providers

import (
"github.com/confetti-framework/contract/inter"
"github.com/confetti-framework/foundation/providers"
"github.com/confetti-framework/framework/foundation/providers"
"github.com/confetti-framework/framework/inter"
"src/config"
)

Expand Down
6 changes: 3 additions & 3 deletions app/providers/response_service_provider.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package providers

import (
"github.com/confetti-framework/contract/inter"
decorator "github.com/confetti-framework/foundation/decorator/response_decorator"
"github.com/confetti-framework/foundation/encoder"
decorator "github.com/confetti-framework/framework/foundation/decorator/response_decorator"
"github.com/confetti-framework/framework/foundation/encoder"
"github.com/confetti-framework/framework/inter"
net "net/http"
"src/resources/views"
)
Expand Down
6 changes: 3 additions & 3 deletions app/providers/route_service_provider.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package providers

import (
"github.com/confetti-framework/contract/inter"
foundationMiddleware "github.com/confetti-framework/foundation/http/middleware"
"github.com/confetti-framework/foundation/http/routing"
foundationMiddleware "github.com/confetti-framework/framework/foundation/http/middleware"
"github.com/confetti-framework/framework/foundation/http/routing"
"github.com/confetti-framework/framework/inter"
"src/app/http/middleware"
"src/routes"
)
Expand Down
4 changes: 2 additions & 2 deletions app/providers/view_service_provider.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package providers

import (
"github.com/confetti-framework/contract/inter"
"github.com/confetti-framework/validation/val_errors"
"github.com/confetti-framework/framework/inter"
"github.com/confetti-framework/framework/validation/val_errors"
"html/template"
"src/config"
"strings"
Expand Down
4 changes: 2 additions & 2 deletions bootstrap/app.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package bootstrap

import (
"github.com/confetti-framework/contract/inter"
"github.com/confetti-framework/foundation"
"github.com/confetti-framework/framework/foundation"
"github.com/confetti-framework/framework/inter"
"src/app/console"
"src/app/http"
"src/app/http/decorator"
Expand Down
2 changes: 1 addition & 1 deletion config/app.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package config

import (
"github.com/confetti-framework/support/env"
"github.com/confetti-framework/framework/support/env"
"golang.org/x/text/language"
"os"
"time"
Expand Down
22 changes: 11 additions & 11 deletions config/database.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package config

import (
"github.com/confetti-framework/contract/inter"
"github.com/confetti-framework/support/env"
"github.com/confetti-framework/framework/inter"
"github.com/confetti-framework/framework/support/env"
)

var Database = struct {
Expand Down Expand Up @@ -35,15 +35,15 @@ var Database = struct {

Connections: map[string]inter.Connection{
/*
"mysql": &db.MySQL{
Host: env.StringOr("DB_HOST", "127.0.0.1"),
Port: env.IntOr("DB_PORT", 3306),
Database: env.StringOr("DB_DATABASE", "confetti"),
Username: env.StringOr("DB_USERNAME", "app"),
Password: env.StringOr("DB_PASSWORD", ""),
QueryTimeout: 10 * time.Second,
},
*/
"mysql": &db.MySQL{
Host: env.StringOr("DB_HOST", "127.0.0.1"),
Port: env.IntOr("DB_PORT", 3306),
Database: env.StringOr("DB_DATABASE", "confetti"),
Username: env.StringOr("DB_USERNAME", "app"),
Password: env.StringOr("DB_PASSWORD", ""),
QueryTimeout: 10 * time.Second,
},
*/

/*
"postgresql": &db.PostgreSQL{
Expand Down
2 changes: 1 addition & 1 deletion config/errors.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package config

import (
"github.com/confetti-framework/foundation/http/routing"
"github.com/confetti-framework/framework/foundation/http/routing"
"src/app/report"
)

Expand Down
6 changes: 3 additions & 3 deletions config/logging.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package config

import (
"github.com/confetti-framework/contract/inter"
"github.com/confetti-framework/foundation/loggers"
"github.com/confetti-framework/support/env"
"github.com/confetti-framework/framework/foundation/loggers"
"github.com/confetti-framework/framework/inter"
"github.com/confetti-framework/framework/support/env"
"github.com/confetti-framework/syslog/log_level"
"os"
)
Expand Down
35 changes: 16 additions & 19 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,32 +1,29 @@
module src

go 1.17
go 1.18

require (
github.com/confetti-framework/contract v0.3.0
github.com/confetti-framework/errors v0.12.0
github.com/confetti-framework/foundation v0.13.0
github.com/confetti-framework/support v0.5.1
github.com/confetti-framework/framework v0.29.4-beta
github.com/confetti-framework/syslog v0.1.1
github.com/confetti-framework/validation v0.1.0
golang.org/x/text v0.3.7
)

require (
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
github.com/chzyer/readline v1.5.0 // indirect
github.com/confetti-framework/baker v1.1.1 // indirect
github.com/go-sql-driver/mysql v1.6.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgconn v1.11.0 // indirect
github.com/jackc/pgconn v1.12.1 // indirect
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3/v2 v2.2.0 // indirect
github.com/jackc/pgproto3/v2 v2.3.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
github.com/jackc/pgtype v1.10.0 // indirect
github.com/jackc/pgx/v4 v4.15.0 // indirect
github.com/jedib0t/go-pretty/v6 v6.2.7 // indirect
github.com/jackc/pgtype v1.11.0 // indirect
github.com/jackc/pgx/v4 v4.16.1 // indirect
github.com/jedib0t/go-pretty/v6 v6.3.1 // indirect
github.com/joho/godotenv v1.4.0 // indirect
github.com/manifoldco/promptui v0.9.0 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
Expand All @@ -35,15 +32,15 @@ require (
github.com/peterh/liner v1.2.2 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/schollz/progressbar/v3 v3.8.6 // indirect
github.com/spf13/cast v1.4.1 // indirect
github.com/tidwall/gjson v1.14.0 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/tidwall/gjson v1.14.1 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/vigneshuvi/GoDateFormat v0.0.0-20210204121036-67364dc23c79 // indirect
golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect
golang.org/x/mod v0.5.1 // indirect
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9 // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/tools v0.1.9 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88 // indirect
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 // indirect
golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 // indirect
golang.org/x/tools v0.1.10 // indirect
golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect
)
Loading

0 comments on commit 868d974

Please # to comment.