Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .air.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
root = "."
tmp_dir = "storage/temp"
tmp_dir = "tmp"

[build]
bin = "./storage/temp/main"
cmd = "go build -o ./storage/temp/main ."
bin = "./tmp/main.exe"
cmd = "go build -o ./tmp/main.exe ."
delay = 1000
exclude_dir = ["storage", "database"]
exclude_file = []
Expand Down
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
.idea
.vscode
.DS_Store
storage/framework
launch.json
.env
.env.*
!.env.example
storage
tmp
17 changes: 0 additions & 17 deletions app/console/kernel.go

This file was deleted.

10 changes: 10 additions & 0 deletions app/facades/app.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package facades

import (
contractsfoundation "github.com/goravel/framework/contracts/foundation"
"github.com/goravel/framework/foundation"
)

func App() contractsfoundation.Application {
return foundation.App
}
9 changes: 9 additions & 0 deletions app/facades/artisan.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package facades

import (
"github.com/goravel/framework/contracts/console"
)

func Artisan() console.Artisan {
return App().MakeArtisan()
}
10 changes: 10 additions & 0 deletions app/facades/auth.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package facades

import (
"github.com/goravel/framework/contracts/auth"
"github.com/goravel/framework/contracts/http"
)

func Auth(ctx ...http.Context) auth.Auth {
return App().MakeAuth(ctx...)
}
9 changes: 9 additions & 0 deletions app/facades/cache.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package facades

import (
"github.com/goravel/framework/contracts/cache"
)

func Cache() cache.Cache {
return App().MakeCache()
}
9 changes: 9 additions & 0 deletions app/facades/config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package facades

import (
"github.com/goravel/framework/contracts/config"
)

func Config() config.Config {
return App().MakeConfig()
}
9 changes: 9 additions & 0 deletions app/facades/crypt.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package facades

import (
"github.com/goravel/framework/contracts/crypt"
)

func Crypt() crypt.Crypt {
return App().MakeCrypt()
}
9 changes: 9 additions & 0 deletions app/facades/db.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package facades

import (
"github.com/goravel/framework/contracts/database/db"
)

func DB() db.DB {
return App().MakeDB()
}
9 changes: 9 additions & 0 deletions app/facades/event.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package facades

import (
"github.com/goravel/framework/contracts/event"
)

func Event() event.Instance {
return App().MakeEvent()
}
10 changes: 10 additions & 0 deletions app/facades/gate.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package facades

import (
"github.com/goravel/framework/contracts/auth/access"
"github.com/goravel/framework/contracts/http"
)

func Gate(ctx ...http.Context) access.Gate {
return App().MakeGate()
}
9 changes: 9 additions & 0 deletions app/facades/grpc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package facades

import (
"github.com/goravel/framework/contracts/grpc"
)

func Grpc() grpc.Grpc {
return App().MakeGrpc()
}
9 changes: 9 additions & 0 deletions app/facades/hash.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package facades

import (
"github.com/goravel/framework/contracts/hash"
)

func Hash() hash.Hash {
return App().MakeHash()
}
9 changes: 9 additions & 0 deletions app/facades/http.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package facades

import (
"github.com/goravel/framework/contracts/http/client"
)

func Http() client.Request {
return App().MakeHttp()
}
11 changes: 11 additions & 0 deletions app/facades/lang.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package facades

import (
"context"

"github.com/goravel/framework/contracts/translation"
)

func Lang(ctx context.Context) translation.Translator {
return App().MakeLang(ctx)
}
9 changes: 9 additions & 0 deletions app/facades/log.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package facades

import (
"github.com/goravel/framework/contracts/log"
)

func Log() log.Log {
return App().MakeLog()
}
9 changes: 9 additions & 0 deletions app/facades/mail.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package facades

import (
"github.com/goravel/framework/contracts/mail"
)

func Mail() mail.Mail {
return App().MakeMail()
}
9 changes: 9 additions & 0 deletions app/facades/orm.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package facades

import (
"github.com/goravel/framework/contracts/database/orm"
)

func Orm() orm.Orm {
return App().MakeOrm()
}
9 changes: 9 additions & 0 deletions app/facades/process.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package facades

import (
"github.com/goravel/framework/contracts/process"
)

func Process() process.Process {
return App().MakeProcess()
}
9 changes: 9 additions & 0 deletions app/facades/queue.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package facades

import (
"github.com/goravel/framework/contracts/queue"
)

func Queue() queue.Queue {
return App().MakeQueue()
}
9 changes: 9 additions & 0 deletions app/facades/rate_limiter.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package facades

import (
"github.com/goravel/framework/contracts/http"
)

func RateLimiter() http.RateLimiter {
return App().MakeRateLimiter()
}
9 changes: 9 additions & 0 deletions app/facades/route.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package facades

import (
"github.com/goravel/framework/contracts/route"
)

func Route() route.Route {
return App().MakeRoute()
}
9 changes: 9 additions & 0 deletions app/facades/schedule.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package facades

import (
"github.com/goravel/framework/contracts/schedule"
)

func Schedule() schedule.Schedule {
return App().MakeSchedule()
}
9 changes: 9 additions & 0 deletions app/facades/schema.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package facades

import (
"github.com/goravel/framework/contracts/database/schema"
)

func Schema() schema.Schema {
return App().MakeSchema()
}
9 changes: 9 additions & 0 deletions app/facades/seeder.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package facades

import (
"github.com/goravel/framework/contracts/database/seeder"
)

func Seeder() seeder.Facade {
return App().MakeSeeder()
}
9 changes: 9 additions & 0 deletions app/facades/session.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package facades

import (
"github.com/goravel/framework/contracts/session"
)

func Session() session.Manager {
return App().MakeSession()
}
9 changes: 9 additions & 0 deletions app/facades/storage.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package facades

import (
"github.com/goravel/framework/contracts/filesystem"
)

func Storage() filesystem.Storage {
return App().MakeStorage()
}
9 changes: 9 additions & 0 deletions app/facades/telemetry.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package facades

import (
"github.com/goravel/framework/contracts/telemetry"
)

func Telemetry() telemetry.Telemetry {
return App().MakeTelemetry()
}
9 changes: 9 additions & 0 deletions app/facades/testing.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package facades

import (
"github.com/goravel/framework/contracts/testing"
)

func Testing() testing.Testing {
return App().MakeTesting()
}
9 changes: 9 additions & 0 deletions app/facades/validation.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package facades

import (
"github.com/goravel/framework/contracts/validation"
)

func Validation() validation.Validation {
return App().MakeValidation()
}
9 changes: 9 additions & 0 deletions app/facades/view.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package facades

import (
"github.com/goravel/framework/contracts/view"
)

func View() view.View {
return App().MakeView()
}
2 changes: 1 addition & 1 deletion app/grpc/controllers/user_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
proto "github.com/goravel/example-proto"
"github.com/goravel/framework/auth"
contractshttp "github.com/goravel/framework/contracts/http"
"github.com/goravel/framework/facades"
goravelhttp "github.com/goravel/framework/http"
"github.com/pkg/errors"

"goravel/app/facades"
"goravel/app/models"
)

Expand Down
3 changes: 2 additions & 1 deletion app/grpc/interceptors/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import (
"io"
"strings"

"github.com/goravel/framework/facades"
"github.com/opentracing/opentracing-go"
"github.com/uber/jaeger-client-go"
"github.com/uber/jaeger-client-go/transport"
"google.golang.org/grpc/metadata"

"goravel/app/facades"
)

type MDReaderWriter struct {
Expand Down
Loading
Loading