app

package
v0.0.0-...-81ba34a Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	DB        *gorm.DB
	Redis     *redis.Client
	Router    *chi.Mux
	Cache     cache.Cache
	Validator *validator.Validate
	Deps      *injection.Dependencies
	Server    *http.Server
	Config    *config.AppConfig
	// contains filtered or unexported fields
}

App 应用结构体

func New

func New() (*App, error)

New 创建新的应用实例

func (*App) Shutdown

func (app *App) Shutdown(ctx context.Context) error

Shutdown 优雅关闭应用

func (*App) StartServer

func (app *App) StartServer() <-chan error

StartServer 启动HTTP服务器

Directories

Path Synopsis
v1

Jump to

Keyboard shortcuts

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