app

package
v0.0.0-...-988442a Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeCommands

func InitializeCommands(app *core.App, env *EnvironmentVariables)

func InitializeConfigs

func InitializeConfigs(app *core.App, env *EnvironmentVariables)

func InitializeCron

func InitializeCron(app *core.App, env *EnvironmentVariables)

func InitializeEvent

func InitializeEvent(app *core.App, env *EnvironmentVariables)

func NewApp

func NewApp() *core.App

func ProvideEventPubSubContainer

func ProvideEventPubSubContainer(env *EnvironmentVariables) (pubsub.Container, error)

func ProvideLogger

func ProvideLogger() *slog.Logger

func RunApp

func RunApp()

func SetEventMiddleware

func SetEventMiddleware(
	eventEmitter *core.EventEmitter,
)

func SetRouteHTTPServer

func SetRouteHTTPServer(
	logger *slog.Logger,
	server *core.Server,
)

Types

type EnvironmentVariables

type EnvironmentVariables struct {
	AppName        string `validate:"required" env:"APP_NAME" json:"app_name,omitempty"`
	Addr           string `validate:"required" env:"ADDR" json:"addr,omitempty"`
	EventDriver    string `validate:"required" env:"EVENT_DRIVER" json:"event_driver,omitempty"`
	EventRedisAddr string `env:"EVENT_REDIS_ADDR" json:"event_redis_addr,omitempty"`
	EventRedisDB   int    `env:"EVENT_REDIS_DB" json:"event_redis_db,omitempty"`
	EventSQLDBType string `env:"EVENT_SQL_DB_TYPE" json:"event_sql_db_type,omitempty"`
	EventSQLUser   string `env:"EVENT_SQL_USER" json:"event_sql_user,omitempty"`
	EventSQLPass   string `env:"EVENT_SQL_PASS" json:"event_sql_pass,omitempty"`
	EventSQLHost   string `env:"EVENT_SQL_HOST" json:"event_sql_host,omitempty"`
	EventSQLPort   string `env:"EVENT_SQL_PORT" json:"event_sql_port,omitempty"`
	EventSQLDBName string `env:"EVENT_SQL_DB_NAME" json:"event_sql_db_name,omitempty"`
}

func ProvideEnvironmentVariables

func ProvideEnvironmentVariables() *EnvironmentVariables

type TestApp

type TestApp struct {
	Deps TestAppDependencies
}

func NewTestApp

func NewTestApp(deps TestAppDependencies) *TestApp

func ProvideTestApp

func ProvideTestApp(t *testing.T) *TestApp

type TestAppDependencies

type TestAppDependencies struct {
	fx.In
}

Jump to

Keyboard shortcuts

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