core

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: MIT Imports: 9 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppName = "RFID App"
View Source
var Container = dig.New()
View Source
var StartupOptions = dig.Group("startups")
View Source
var Version = "latest"

Functions

func GetContainer

func GetContainer() *dig.Container

func InitConfig

func InitConfig(p Bootup) error

func InitLogger

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

func Provide added in v0.5.0

func Provide(constructor ...interface{})

func ProvideStartup added in v0.5.1

func ProvideStartup(constructor ...any)

func RegisterComponent added in v0.4.5

func RegisterComponent(comp Component)

func ToEmbedConfig added in v0.5.4

func ToEmbedConfig(content []byte)

Types

type Bootup added in v0.5.4

type Bootup struct {
	dig.In
	EmbedConfig []ConfigYamlContent `group:"config"`
}

type Component added in v0.4.5

type Component interface {
	Priority() int
	OnEngineInited(r *gin.Engine) error
}

type Components added in v0.4.5

type Components struct {
	Components []Component
}

func (*Components) InitAll added in v0.4.5

func (cs *Components) InitAll(r *gin.Engine)

type ConfigYamlContent added in v0.5.4

type ConfigYamlContent []byte

type DefaultComponent added in v0.4.5

type DefaultComponent struct{}

func (*DefaultComponent) Priority added in v0.4.5

func (dc *DefaultComponent) Priority() int

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