Documentation ¶
Index ¶
- Constants
- Variables
- func GConfig() *config.AppConfig
- func GDB() *gorm.DB
- func InitGlobalApplication(cfg *config.AppConfig)
- func Release()
- type Application
- func (a *Application) BackupDatabase() error
- func (a *Application) Config() *config.AppConfig
- func (a *Application) DB() *gorm.DB
- func (a *Application) DropAll()
- func (a *Application) GetSettingsInt64Value(stype string, name string) int64
- func (a *Application) GetSettingsStringValue(stype string, name string) string
- func (a *Application) GetSystemSettingsStringValue(name string) string
- func (a *Application) GetSystemTheme() string
- func (a *Application) GetTemplateFuncMap() map[string]interface{}
- func (a *Application) Init(cfg *config.AppConfig)
- func (a *Application) InitDb()
- func (a *Application) InitTest()
- func (a *Application) MigrateDB(track bool) (err error)
- func (a *Application) SchedProcessMonitorTask()
- func (a *Application) SchedSystemMonitorTask()
- func (a *Application) SetSystemTheme(value string)
- type SyslogServer
- func (s SyslogServer) HandleRfc3164(remoteaddr net.Addr, data []byte) (*models.TsSyslog, error)
- func (s SyslogServer) HandleRfc5424(remoteaddr net.Addr, data []byte) (*models.TsSyslog, error)
- func (s SyslogServer) HandleSyslog(remoteaddr net.Addr, data []byte)
- func (s SyslogServer) StartSyslogServer() error
Constants ¶
View Source
const ( ConfigSystemTitle = "SystemTitle" ConfigSystemTheme = "SystemTheme" ConfigSystemLoginRemark = "SystemLoginRemark" ConfigSystemLoginSubtitle = "SystemLoginSubtitle" )
Variables ¶
View Source
var ConfigConstants = []string{ ConfigSystemTitle, ConfigSystemTheme, ConfigSystemLoginRemark, ConfigSystemLoginSubtitle, }
Functions ¶
func InitGlobalApplication ¶
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 ¶
HandleRfc3164 Handling Rfc3164 messages
func (SyslogServer) HandleRfc5424 ¶
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
Click to show internal directories.
Click to hide internal directories.