Help us shape the future of Go! Take the 2026 Go Developer Survey

foundation

package
v1.20.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 64 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewApplication

func NewApplication() foundation.Application

Types

type Application

type Application struct {
	*Container
	// contains filtered or unexported fields
}

func (*Application) About

func (r *Application) About(section string, items []foundation.AboutItem)

func (*Application) BasePath

func (r *Application) BasePath(paths ...string) string

func (*Application) Boot

func (r *Application) Boot()

func (*Application) BootstrapPath

func (r *Application) BootstrapPath(paths ...string) string

func (*Application) Build

func (r *Application) Build() foundation.Application

func (*Application) Commands

func (r *Application) Commands(commands []contractsconsole.Command)

func (*Application) CommandsFilter

func (r *Application) CommandsFilter() []string

CommandsFilter returns the positive-list of command signatures to keep. nil means no filter is applied. Used by the console service provider so its own command batch goes through the same gate as the framework's defaultCommands batch.

func (*Application) ConfigPath

func (r *Application) ConfigPath(paths ...string) string

func (*Application) Context

func (r *Application) Context() context.Context

func (*Application) CurrentLocale

func (r *Application) CurrentLocale(ctx context.Context) string

func (*Application) DatabasePath

func (r *Application) DatabasePath(paths ...string) string

func (*Application) ExecutablePath

func (r *Application) ExecutablePath(paths ...string) string

func (*Application) FacadesPath

func (r *Application) FacadesPath(paths ...string) string

func (*Application) GetJson

func (r *Application) GetJson() foundation.Json

GetJson get the JSON implementation. DEPRECATED, use Json instead.

func (*Application) IsLocale

func (r *Application) IsLocale(ctx context.Context, locale string) bool

func (*Application) Json

func (r *Application) Json() foundation.Json

func (*Application) LangPath

func (r *Application) LangPath(paths ...string) string

func (*Application) ModelPath

func (r *Application) ModelPath(paths ...string) string

func (*Application) Path

func (r *Application) Path(paths ...string) string

func (*Application) PublicPath

func (r *Application) PublicPath(paths ...string) string

func (*Application) Publishes

func (r *Application) Publishes(packageName string, paths map[string]string, groups ...string)

func (*Application) Refresh

func (r *Application) Refresh()

func (*Application) RegisterBaseServiceProviders

func (r *Application) RegisterBaseServiceProviders()

func (*Application) ResourcePath

func (r *Application) ResourcePath(paths ...string) string

func (*Application) Restart

func (r *Application) Restart() error

func (*Application) SetBuilder

func (*Application) SetJson

func (r *Application) SetJson(j foundation.Json)

func (*Application) SetLocale

func (r *Application) SetLocale(ctx context.Context, locale string) context.Context

func (*Application) Shutdown

func (r *Application) Shutdown() error

func (*Application) Start

func (r *Application) Start()

func (*Application) StoragePath

func (r *Application) StoragePath(paths ...string) string

func (*Application) Version

func (r *Application) Version() string

type ApplicationBuilder

type ApplicationBuilder struct {
	// contains filtered or unexported fields
}

func NewApplicationBuilder

func NewApplicationBuilder(app foundation.Application) *ApplicationBuilder

func (*ApplicationBuilder) Create

func (*ApplicationBuilder) WithCallback

func (r *ApplicationBuilder) WithCallback(callback func()) foundation.ApplicationBuilder

func (*ApplicationBuilder) WithCommands

func (r *ApplicationBuilder) WithCommands(fn func() []console.Command) foundation.ApplicationBuilder

func (*ApplicationBuilder) WithCommandsFilter

func (r *ApplicationBuilder) WithCommandsFilter(fn func() []string) foundation.ApplicationBuilder

WithCommandsFilter registers a callback that returns the positive list of command signatures to keep when the framework registers Artisan commands. The callback runs once at Build() time.

Matching is signature-only (category never consulted):

  • Entries without '*' are exact-matched against command.Signature().
  • Entries containing '*' use glob matching via path.Match against command.Signature() (only '*' triggers the glob path; '?' is matched literally as an exact match).

Semantics:

  • Method not called → keep every command (default).
  • Callback returns nil → keep every command (no filter).
  • Callback returns []string{} → drop every command.
  • Callback returns entries → keep only commands matching an entry.

func (*ApplicationBuilder) WithConfig

func (r *ApplicationBuilder) WithConfig(fn func()) foundation.ApplicationBuilder

func (*ApplicationBuilder) WithEvents

func (r *ApplicationBuilder) WithEvents(fn func() map[event.Event][]event.Listener) foundation.ApplicationBuilder

func (*ApplicationBuilder) WithFilters

func (*ApplicationBuilder) WithGrpcClientCredentials

func (r *ApplicationBuilder) WithGrpcClientCredentials(fn func() map[string]credentials.TransportCredentials) foundation.ApplicationBuilder

func (*ApplicationBuilder) WithGrpcClientInterceptors

func (r *ApplicationBuilder) WithGrpcClientInterceptors(fn func() map[string][]grpc.UnaryClientInterceptor) foundation.ApplicationBuilder

func (*ApplicationBuilder) WithGrpcClientStatsHandlers

func (r *ApplicationBuilder) WithGrpcClientStatsHandlers(fn func() map[string][]stats.Handler) foundation.ApplicationBuilder

func (*ApplicationBuilder) WithGrpcServerCredentials

func (r *ApplicationBuilder) WithGrpcServerCredentials(fn func() credentials.TransportCredentials) foundation.ApplicationBuilder

func (*ApplicationBuilder) WithGrpcServerInterceptors

func (r *ApplicationBuilder) WithGrpcServerInterceptors(fn func() []grpc.UnaryServerInterceptor) foundation.ApplicationBuilder

func (*ApplicationBuilder) WithGrpcServerOptions

func (r *ApplicationBuilder) WithGrpcServerOptions(fn func() []grpc.ServerOption) foundation.ApplicationBuilder

func (*ApplicationBuilder) WithGrpcServerStatsHandlers

func (r *ApplicationBuilder) WithGrpcServerStatsHandlers(fn func() []stats.Handler) foundation.ApplicationBuilder

func (*ApplicationBuilder) WithJobs

func (r *ApplicationBuilder) WithJobs(fn func() []queue.Job) foundation.ApplicationBuilder

func (*ApplicationBuilder) WithMiddleware

func (*ApplicationBuilder) WithMigrations

func (r *ApplicationBuilder) WithMigrations(fn func() []schema.Migration) foundation.ApplicationBuilder

func (*ApplicationBuilder) WithPaths

func (*ApplicationBuilder) WithProviders

func (*ApplicationBuilder) WithRouting

func (r *ApplicationBuilder) WithRouting(fn func()) foundation.ApplicationBuilder

func (*ApplicationBuilder) WithRules

func (*ApplicationBuilder) WithRunners

func (*ApplicationBuilder) WithSchedule

func (r *ApplicationBuilder) WithSchedule(fn func() []schedule.Event) foundation.ApplicationBuilder

func (*ApplicationBuilder) WithSeeders

func (r *ApplicationBuilder) WithSeeders(fn func() []seeder.Seeder) foundation.ApplicationBuilder

type BindingNotFoundError

type BindingNotFoundError struct {
	Key any
}

func NewBindingNotFoundError

func NewBindingNotFoundError(key any) *BindingNotFoundError

func (*BindingNotFoundError) Error

func (r *BindingNotFoundError) Error() string

type Container

type Container struct {
	// contains filtered or unexported fields
}

func NewContainer

func NewContainer() *Container

func (*Container) Bind

func (r *Container) Bind(key any, callback func(app contractsfoundation.Application) (any, error))

func (*Container) BindWith

func (r *Container) BindWith(key any, callback func(app contractsfoundation.Application, parameters map[string]any) (any, error))

func (*Container) Bindings

func (r *Container) Bindings() []any

func (*Container) Fresh

func (r *Container) Fresh(bindings ...any)

func (*Container) Instance

func (r *Container) Instance(key any, ins any)

func (*Container) Make

func (r *Container) Make(key any) (any, error)

func (*Container) MakeAI

func (r *Container) MakeAI() contractsai.AI

func (*Container) MakeArtisan

func (r *Container) MakeArtisan() contractsconsole.Artisan

func (*Container) MakeAuth

func (r *Container) MakeAuth(ctx ...contractshttp.Context) contractsauth.Auth

func (*Container) MakeBroadcast

func (r *Container) MakeBroadcast() contractsbroadcast.Broadcast

func (*Container) MakeCache

func (r *Container) MakeCache() contractscache.Cache

func (*Container) MakeConfig

func (r *Container) MakeConfig() contractsconfig.Config

func (*Container) MakeCrypt

func (r *Container) MakeCrypt() contractscrypt.Crypt

func (*Container) MakeDB

func (r *Container) MakeDB() contractsdb.DB

func (*Container) MakeEvent

func (r *Container) MakeEvent() contractsevent.Instance

func (*Container) MakeGate

func (r *Container) MakeGate() contractsaccess.Gate

func (*Container) MakeGrpc

func (r *Container) MakeGrpc() contractsgrpc.Grpc

func (*Container) MakeHash

func (r *Container) MakeHash() contractshash.Hash

func (*Container) MakeHttp

func (r *Container) MakeHttp() contractshttpclient.Factory

func (*Container) MakeLang

func (*Container) MakeLog

func (r *Container) MakeLog() contractslog.Log

func (*Container) MakeMail

func (r *Container) MakeMail() contractsmail.Mail

func (*Container) MakeNotification

func (r *Container) MakeNotification() contractsnotification.Manager

func (*Container) MakeOrm

func (r *Container) MakeOrm() contractsorm.Orm

func (*Container) MakeProcess

func (r *Container) MakeProcess() contractsprocess.Process

func (*Container) MakeQueue

func (r *Container) MakeQueue() contractsqueue.Queue

func (*Container) MakeRateLimiter

func (r *Container) MakeRateLimiter() contractshttp.RateLimiter

func (*Container) MakeRoute

func (r *Container) MakeRoute() contractsroute.Route

func (*Container) MakeSchedule

func (r *Container) MakeSchedule() contractsschedule.Schedule

func (*Container) MakeSchema

func (r *Container) MakeSchema() contractsmigration.Schema

func (*Container) MakeSeeder

func (r *Container) MakeSeeder() contractsseerder.Facade

func (*Container) MakeSession

func (r *Container) MakeSession() contractsession.Manager

func (*Container) MakeStorage

func (r *Container) MakeStorage() contractsfilesystem.Storage

func (*Container) MakeTelemetry

func (r *Container) MakeTelemetry() contractstelemetry.Telemetry

func (*Container) MakeTesting

func (r *Container) MakeTesting() contractstesting.Testing

func (*Container) MakeValidation

func (r *Container) MakeValidation() contractsvalidation.Validation

func (*Container) MakeView

func (r *Container) MakeView() contractsview.View

func (*Container) MakeWith

func (r *Container) MakeWith(key any, parameters map[string]any) (any, error)

func (*Container) Singleton

func (r *Container) Singleton(key any, callback func(app contractsfoundation.Application) (any, error))

type ProviderRepository

type ProviderRepository struct {
	// contains filtered or unexported fields
}

func NewProviderRepository

func NewProviderRepository() *ProviderRepository

func (*ProviderRepository) Add

func (r *ProviderRepository) Add(providers []foundation.ServiceProvider)

func (*ProviderRepository) Boot

func (*ProviderRepository) GetBooted

func (*ProviderRepository) LoadFromConfig

func (r *ProviderRepository) LoadFromConfig(config config.Config) []foundation.ServiceProvider

func (*ProviderRepository) Register

func (*ProviderRepository) Reset

func (r *ProviderRepository) Reset()

type ProviderState

type ProviderState struct {
	// contains filtered or unexported fields
}

type RunnerWithInfo

type RunnerWithInfo struct {
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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