foundation

package
v1.13.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2023 License: MIT Imports: 20 Imported by: 75

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application interface {
	Container
	// Boot register and bootstrap configured service providers.
	Boot()
	// Commands register the given commands with the console application.
	Commands([]console.Command)
	// Path gets the path respective to "app" directory.
	Path(path string) string
	// BasePath get the base path of the Goravel installation.
	BasePath(path string) string
	// ConfigPath get the path to the configuration files.
	ConfigPath(path string) string
	// DatabasePath get the path to the database directory.
	DatabasePath(path string) string
	// StoragePath get the path to the storage directory.
	StoragePath(path string) string
	// PublicPath get the path to the public directory.
	PublicPath(path string) string
	// Publishes register the given paths to be published by the "vendor:publish" command.
	Publishes(packageName string, paths map[string]string, groups ...string)
}

type BaseServiceProvider added in v1.13.0

type BaseServiceProvider struct{}

BaseServiceProvider is a default implementation of the Provider interface.

func (*BaseServiceProvider) Boot added in v1.13.0

func (*BaseServiceProvider) Register added in v1.13.0

func (s *BaseServiceProvider) Register(Application)

type Container

type Container interface {
	// Bind registers a binding with the container.
	Bind(key any, callback func(app Application) (any, error))
	// BindWith registers a binding with the container.
	BindWith(key any, callback func(app Application, parameters map[string]any) (any, error))
	// Instance registers an existing instance as shared in the container.
	Instance(key, instance any)
	// Make resolves the given type from the container.
	Make(key any) (any, error)
	// MakeArtisan resolves the artisan console instance.
	MakeArtisan() console.Artisan
	// MakeAuth resolves the auth instance.
	MakeAuth() auth.Auth
	// MakeCache resolves the cache instance.
	MakeCache() cache.Cache
	// MakeConfig resolves the config instance.
	MakeConfig() config.Config
	// MakeCrypt resolves the crypt instance.
	MakeCrypt() crypt.Crypt
	// MakeEvent resolves the event instance.
	MakeEvent() event.Instance
	// MakeGate resolves the gate instance.
	MakeGate() access.Gate
	// MakeGrpc resolves the grpc instance.
	MakeGrpc() grpc.Grpc
	// MakeHash resolves the hash instance.
	MakeHash() hash.Hash
	// MakeLog resolves the log instance.
	MakeLog() log.Log
	// MakeMail resolves the mail instance.
	MakeMail() mail.Mail
	// MakeOrm resolves the orm instance.
	MakeOrm() orm.Orm
	// MakeQueue resolves the queue instance.
	MakeQueue() queue.Queue
	// MakeRateLimiter resolves the rate limiter instance.
	MakeRateLimiter() http.RateLimiter
	// MakeRoute resolves the route instance.
	MakeRoute() route.Route
	// MakeSchedule resolves the schedule instance.
	MakeSchedule() schedule.Schedule
	// MakeStorage resolves the storage instance.
	MakeStorage() filesystem.Storage
	// MakeTesting resolves the testing instance.
	MakeTesting() testing.Testing
	// MakeValidation resolves the validation instance.
	MakeValidation() validation.Validation
	// MakeView resolves the view instance.
	MakeView() http.View
	// MakeSeeder resolves the seeder instance.
	MakeSeeder() seeder.Facade
	// MakeWith resolves the given type with the given parameters from the container.
	MakeWith(key any, parameters map[string]any) (any, error)
	// Singleton registers a shared binding in the container.
	Singleton(key any, callback func(app Application) (any, error))
}

type ServiceProvider

type ServiceProvider interface {
	// Register any application services.
	Register(app Application)
	// Boot any application services after register.
	Boot(app Application)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL