README ¶ egret golang单体应用脚手架 Expand ▾ Collapse ▴ Documentation ¶ Index ¶ type App func New(opts ...Option) *App func (a *App) Name() string func (a *App) Run() error func (a *App) Stop() error func (a *App) Version() string type AppInfo type Option func Addr(addr string) Option func Context(ctx context.Context) Option func Name(name string) Option func Server(srv *gin.Engine) Option func Signal(sigs ...os.Signal) Option func Timeout(timeout time.Duration) Option func Version(version string) Option Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type App ¶ type App struct { // contains filtered or unexported fields } func New ¶ func New(opts ...Option) *App func (*App) Name ¶ func (a *App) Name() string func (*App) Run ¶ func (a *App) Run() error func (*App) Stop ¶ func (a *App) Stop() error func (*App) Version ¶ func (a *App) Version() string type AppInfo ¶ type AppInfo interface { Name() string Version() string } type Option ¶ type Option func(o *options) func Addr ¶ func Addr(addr string) Option func Context ¶ func Context(ctx context.Context) Option func Name ¶ func Name(name string) Option func Server ¶ func Server(srv *gin.Engine) Option func Signal ¶ func Signal(sigs ...os.Signal) Option func Timeout ¶ func Timeout(timeout time.Duration) Option func Version ¶ func Version(version string) Option Source Files ¶ View all Source files app.go options.go Directories ¶ Show internal Expand all Path Synopsis errors example api/v1 cmd/server internal/domain internal/pkg/config internal/pkg/logger internal/repo internal/server internal/service internal/usecase middleware pkg log utils validate Click to show internal directories. Click to hide internal directories.