appx

package
v1.6.23 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDevMode added in v1.5.20

func IsDevMode(mode string) bool

func IsProdMode added in v1.5.20

func IsProdMode(mode string) bool

func IsStageMode added in v1.5.20

func IsStageMode(mode string) bool

Types

type App

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

func New

func New(log *slog.Logger, runners ...Runner) *App

func (*App) Run

func (a *App) Run(ctx context.Context) error

type Config

type Config struct {
	Mode   string // Application mode: development, staging, production
	Domain string // Public-facing domain, e.g., example.com
}

Config holds basic environment configuration like mode and domain.

func NewConfig

func NewConfig(mode, domain string) *Config

func (*Config) WithDomain

func (c *Config) WithDomain(domain string) *Config

WithDomain sets the domain and returns the updated Config.

func (*Config) WithMode

func (c *Config) WithMode(mode string) *Config

WithMode sets the mode and returns the updated Config.

type Runner

type Runner interface {
	Start(ctx context.Context) error
	Shutdown(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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