app

package
v1.4.7 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitCache

func InitCache(ctx context.Context) (cache.CacheService, error)

func InitMySQLDatabase

func InitMySQLDatabase(cfg *config.Config) (*sql.DB, error)

func InitPqDatabase

func InitPqDatabase(cfg *config.Config) (*pgxpool.Pool, error)

Types

type App

type App struct {
	Config       *config.Config
	HttpServer   *http.Server
	BuildVersion string
	HttpPort     int
	PublicFS     fs.FS
	Cache        cache.CacheService
	DB           *pgxpool.Pool
	MDB          *sql.DB
	Logger       *zap.Logger
	FileUpload   *filesystem.FileUploadService
}

func NewApp

func NewApp(cfg *config.Config) *App

func StartApp

func StartApp() (*App, error)

func (*App) CheckDatabaseHealth added in v1.4.7

func (app *App) CheckDatabaseHealth() error

func (*App) CloseResources

func (app *App) CloseResources() error

func (*App) SetupHTTPServer added in v1.4.4

func (app *App) SetupHTTPServer(handler http.Handler)

Jump to

Keyboard shortcuts

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