core

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 14 Imported by: 7

Documentation

Index

Constants

View Source
const (
	EventError    = "event.error"
	EventTracing  = "event.tracing"
	EventInit     = "event.gin.inited" //trigger when gin ready to service.
	EventStopping = "event.gin.stopping"
	EventStarted  = "sys.started" //trigger when all inited done.
)
View Source
const (
	NO_INIT = "SCM_MUTED"
)

Variables

View Source
var AppName = "RFID App"
View Source
var ConfigFolder = "config"
View Source
var Container = dig.New()
View Source
var EmbedConfigFile = "embed" // for init function can't guarantee embed config be load before startup, so write all content to file.
View Source
var StartupOptions = dig.Group("startups")
View Source
var Version = "latest"

Functions

func GenerateEmbedConfigfile added in v0.7.4

func GenerateEmbedConfigfile() error

func GetContainer

func GetContainer() *dig.Container

func Ignored added in v0.7.4

func Ignored() bool

func InitConfig

func InitConfig(p Bootup) error

func InitLogger

func InitLogger(p Bootup) (*zap.Logger, error)

func NotifyStarted added in v0.7.8

func NotifyStarted()

func Provide added in v0.5.0

func Provide(constructor ...interface{})

func ProvideStartup added in v0.5.1

func ProvideStartup(constructor ...any)

func ToEmbedConfig added in v0.5.4

func ToEmbedConfig(content []byte, keys ...string)

Types

type Bootup added in v0.5.4

type Bootup struct {
	dig.In
}

type OptionalParam added in v0.5.7

type OptionalParam[T any] struct {
	dig.In
	P T `optional:"true"`
}

type ServiceParam added in v0.8.3

type ServiceParam struct {
	dig.In
	DB     *gorm.DB
	Logger *zap.Logger
	Bus    EventBus.Bus
}

type Startup added in v0.5.1

type Startup interface{}

Jump to

Keyboard shortcuts

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