core

package
v0.0.0-...-78514e9 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AppName       = "small-sparrow"
	Version       = "0.0.1"
	VerifyLicense = "true"
)

Functions

func GConfigs

func GConfigs() abstract.ConfigProvider

GConfigs 全局配置

func GResourceDir

func GResourceDir()

func GWorkDir

func GWorkDir()

func InitApp

func InitApp(options ...Option) error

func IsLocalEnv

func IsLocalEnv() bool

func IsProdEnv

func IsProdEnv() bool

func IsTestEnv

func IsTestEnv() bool

func SetupApp

func SetupApp()

Types

type Application

type Application struct {
	Env            *runtime.Env
	LicenseChecker abstract.LicenseChecker // 证书校验器
	LoggerProvider abstract.LoggerProvider
	ConfigProvider abstract.ConfigProvider
	Starters       []abstract.Starter
	Handlers       []abstract.Handler
}

func (Application) Print

func (app Application) Print()

type Option

type Option func(app *Application)

func WithConfigurator

func WithConfigurator(provider abstract.ConfigProvider) Option

func WithHandler

func WithHandler(handlers ...abstract.Handler) Option

func WithLicenseChecker

func WithLicenseChecker(checker abstract.LicenseChecker) Option

func WithLogger

func WithLogger(provider abstract.LoggerProvider) Option

func WithStarter

func WithStarter(starters ...abstract.Starter) Option

func WithWorkerDir

func WithWorkerDir(dir string) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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