app

package
v0.0.0-...-5b7ebeb Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: LGPL-2.1 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigSystemTitle         = "SystemTitle"
	ConfigSystemTheme         = "SystemTheme"
	ConfigSystemLoginRemark   = "SystemLoginRemark"
	ConfigSystemLoginSubtitle = "SystemLoginSubtitle"
)

Variables

Functions

func GConfig

func GConfig() *config.AppConfig

func GDB

func GDB() *gorm.DB

func InitGlobalApplication

func InitGlobalApplication(cfg *config.AppConfig)

func Release

func Release()

Types

type Application

type Application struct {
	// contains filtered or unexported fields
}

func GApp

func GApp() *Application

func NewApplication

func NewApplication(appConfig *config.AppConfig) *Application

func (*Application) BackupDatabase

func (a *Application) BackupDatabase() error

BackupDatabase Backup database

func (*Application) Config

func (a *Application) Config() *config.AppConfig

func (*Application) DB

func (a *Application) DB() *gorm.DB

func (*Application) DropAll

func (a *Application) DropAll()

func (*Application) GetSettingsInt64Value

func (a *Application) GetSettingsInt64Value(stype string, name string) int64

func (*Application) GetSettingsStringValue

func (a *Application) GetSettingsStringValue(stype string, name string) string

GetSettingsStringValue Get settings string value

func (*Application) GetSystemSettingsStringValue

func (a *Application) GetSystemSettingsStringValue(name string) string

func (*Application) GetSystemTheme

func (a *Application) GetSystemTheme() string

func (*Application) GetTemplateFuncMap

func (a *Application) GetTemplateFuncMap() map[string]interface{}

func (*Application) Init

func (a *Application) Init(cfg *config.AppConfig)

func (*Application) InitDb

func (a *Application) InitDb()

func (*Application) InitTest

func (a *Application) InitTest()

func (*Application) MigrateDB

func (a *Application) MigrateDB(track bool) (err error)

func (*Application) SchedProcessMonitorTask

func (a *Application) SchedProcessMonitorTask()

SchedProcessMonitorTask app process monitor

func (*Application) SchedSystemMonitorTask

func (a *Application) SchedSystemMonitorTask()

SchedSystemMonitorTask system monitor

func (*Application) SetSystemTheme

func (a *Application) SetSystemTheme(value string)

type SyslogServer

type SyslogServer struct {
	Rfc3164Parser  syslog.Machine
	Rfc5424Parser  syslog.Machine
	Rfc3164Enabled bool
	Debug          bool
	// contains filtered or unexported fields
}

func NewSyslogServer

func NewSyslogServer() *SyslogServer

func (SyslogServer) HandleRfc3164

func (s SyslogServer) HandleRfc3164(remoteaddr net.Addr, data []byte) (*models.TsSyslog, error)

HandleRfc3164 Handling Rfc3164 messages

func (SyslogServer) HandleRfc5424

func (s SyslogServer) HandleRfc5424(remoteaddr net.Addr, data []byte) (*models.TsSyslog, error)

HandleRfc5424 Handling Rfc5424 messages

func (SyslogServer) HandleSyslog

func (s SyslogServer) HandleSyslog(remoteaddr net.Addr, data []byte)

HandleSyslog Handling Text messages

func (SyslogServer) StartSyslogServer

func (s SyslogServer) StartSyslogServer() error

Jump to

Keyboard shortcuts

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