models

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppMode

type AppMode string
const (
	AppModeProduction AppMode = "production"
	AppModeDevelop    AppMode = "develop"
)

type AuthClaims

type AuthClaims struct {
	Email string `json:"email"`
	jwt.RegisteredClaims
}

type Config

type Config struct {
	Mode AppMode
	DB   ConfigDB
	MQTT ConfigMQTT
	HTTP ConfigHTTP
	Auth ConfigAuth
}

func (*Config) IsDevelop

func (c *Config) IsDevelop() bool

type ConfigAuth

type ConfigAuth struct {
	JWTSecretKey string
}

type ConfigDB

type ConfigDB struct {
	Enabled bool
	DSN     string
}

type ConfigHTTP

type ConfigHTTP struct {
	Port    uint16
	BaseURL string
}

type ConfigMQTT

type ConfigMQTT struct {
	Enabled bool
	Port    uint16
	Host    string
}

type Core

type Core struct {
	Version   string
	BuildTime string
	Config    Config
	Echo      *echo.Echo
	MQTT      *mqtt.Client
	DB        *gorm.DB
	Trans     *ut.Translator
}

type Module

type Module interface {
	Name() string
	Run(core *Core) error
}

Jump to

Keyboard shortcuts

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