Versions in this module Expand all Collapse all v3 v3.6.4 Nov 29, 2021 v3.6.3 Nov 21, 2021 Changes in this version + var DefaultLogCategories = []string + var DefaultPort = 9999 type Config + func (c *Config) SetDefaults(configFile string) type Log + Categories []string + func (c *Log) LogCategories() []string type VersionInfo + BuildArch string + BuildOS string v3.6.2 Oct 13, 2021 Changes in this version + func OnGroupSetSettings(groupAndKey string, fn func(Diffs) error) + func OnKeySetSettings(groupAndKey string, fn func(Diff) error) type CLIConfig + func (c *CLIConfig) InitEnviron(needFindEnvFile ...bool) (err error) + func (c *CLIConfig) WatchEnvConfig() + type Diff struct + IsDiff bool + New interface{} + Old interface{} + func (d Diff) String() string + type Diffs map[string]*Diff + func (d Diffs) Get(key string) interface{} v3.6.1 Sep 8, 2021 v3.6.0 Sep 6, 2021 v3.5.7 Aug 12, 2021 Changes in this version type Config + func (c *Config) GenerateSample() error v3.5.6 Jul 29, 2021 v3.5.5 Jul 23, 2021 Changes in this version + const FRPConfigExtension + var CmdIsRunning = com.CmdIsRunning + var CookieOptions *cookie.CookieOptions + var DBConnecters = map[string]func(*Config) error + var DBCreaters = map[string]func(error, *Config) error + var DBEngines = echo.NewKVData().Add(`mysql`, `MySQL`) + var DBInstallers = map[string]func(string) error + var DBUpgraders = map[string]func(string, *sync.Config, *Config) (DBOperators, error) + var Daemon = goforever.Default + var DaemonDefaultHook = DaemonCommonHook + var DefaultCLIConfig = NewCLIConfig() + var DefaultConfig *Config + var DefaultStartup = `webserver,task,daemon,ftpserver,frpserver,frpclient` + var EmptyBytes = []byte + var ErrCmdNotRunning = errors.New(`command is not running`) + var ErrNoAvailibaleConfigFound = errors.New(`no available configurations found`) + var ErrUnknowDatabaseType = errors.New(`unkown database type`) + var Installed sql.NullBool + var Navigations = []*Navigation + var OAuthUserSessionKey = `oauthUser` + var SessionEngine = `file` + var SessionName = `SID` + var SessionOptions *echo.SessionOptions + var Setting = common.Setting + var Version = &VersionInfo + func AddDaemon(p *dbschema.NgingForeverProcess, run ...bool) *goforever.Process + func ConnectDB(c *Config) error + func ConnectMongoDB(c *Config) error + func ConnectMySQL(c *Config) error + func CreaterMySQL(err error, c *Config) error + func DaemonCommonHook(p *goforever.Process) + func ExecMySQL(sqlStr string) error + func FireInitSettings(cfg echo.H) error + func FireSetSettings(group string, globalCfg echo.H) error + func GetPreupgradeSQLFiles() []string + func GetSQLInsertFiles() []string + func GetSQLInstallFiles() ([]string, error) + func InitSessionOptions(c *Config) + func IsInstalled() bool + func MustOK(err error) + func OnExitedDaemon(processM *dbschema.NgingForeverProcess) + func OnSetSettings(groupAndKey string, fn func(echo.H) error) + func OnceUpgradeDB() error + func ParseArgsSlice(a string) []string + func ParseConfig() error + func ParseEnvSlice(a string) []string + func ParseTimeDuration(timeout string) time.Duration + func QueryTo(sqlStr string, result interface{}) (sqlbuilder.Iterator, error) + func RestartDaemon() + func RunDaemon() + func SetInstalled(lockFile string) error + func Table(table string) string + func ToTable(m sqlbuilder.Name_) string + func UpgradeDB() + func WatchConfig(fn func(string) error) + type CLIConfig struct + Address string + BackendDomain string + Conf string + Confx string + FrontendDomain string + Port int + Startup string + Type string + func NewCLIConfig() *CLIConfig + func (c *CLIConfig) CaddyReload() error + func (c *CLIConfig) CaddyRestart(writer ...io.Writer) error + func (c *CLIConfig) CaddyStart(writer ...io.Writer) (err error) + func (c *CLIConfig) CaddyStop() error + func (c *CLIConfig) CaddyStopHistory() (err error) + func (c *CLIConfig) Close() error + func (c *CLIConfig) CmdGet(typeName string) *exec.Cmd + func (c *CLIConfig) CmdGroupStop(groupName string) error + func (c *CLIConfig) CmdHasGroup(groupName string) bool + func (c *CLIConfig) CmdSendSignal(typeName string, sig os.Signal) error + func (c *CLIConfig) CmdSet(name string, cmd *exec.Cmd) + func (c *CLIConfig) CmdStop(typeName string) error + func (c *CLIConfig) FRPClientRestart(writer ...io.Writer) error + func (c *CLIConfig) FRPClientRestartID(id string, writer ...io.Writer) error + func (c *CLIConfig) FRPClientStart(writer ...io.Writer) (err error) + func (c *CLIConfig) FRPClientStartID(id uint, writer ...io.Writer) (err error) + func (c *CLIConfig) FRPClientStop() error + func (c *CLIConfig) FRPClientStopHistory(ids ...string) (err error) + func (c *CLIConfig) FRPClientStopID(id string) error + func (c *CLIConfig) FRPConfigFile(id uint, isServer bool) string + func (c *CLIConfig) FRPPidFile(id string, isServer bool) string + func (c *CLIConfig) FRPRebuildConfigFile(data interface{}, configFiles ...string) error + func (c *CLIConfig) FRPRestart(writer ...io.Writer) error + func (c *CLIConfig) FRPRestartID(id string, writer ...io.Writer) error + func (c *CLIConfig) FRPSaveConfigFile(data interface{}) (err error) + func (c *CLIConfig) FRPStart(writer ...io.Writer) (err error) + func (c *CLIConfig) FRPStartID(id uint, writer ...io.Writer) (err error) + func (c *CLIConfig) FRPStop() error + func (c *CLIConfig) FRPStopHistory(ids ...string) (err error) + func (c *CLIConfig) FRPStopID(id string) error + func (c *CLIConfig) FTPRestart(writer ...io.Writer) error + func (c *CLIConfig) FTPStart(writer ...io.Writer) (err error) + func (c *CLIConfig) FTPStop() error + func (c *CLIConfig) FTPStopHistory() (err error) + func (c *CLIConfig) GenerateIDFromConfigFileName(configFile string, musts ...bool) string + func (c *CLIConfig) InitFlag(flagSet *pflag.FlagSet) + func (c *CLIConfig) IsRunning(ct string) bool + func (c *CLIConfig) Kill(cmd *exec.Cmd) error + func (c *CLIConfig) MustFRPRebuildConfigFile(data interface{}, configFiles ...string) error + func (c *CLIConfig) OnlyRunServer() bool + func (c *CLIConfig) ParseConfig() + func (c *CLIConfig) Pid() int + func (c *CLIConfig) Reload(cfg *Config, cts ...string) error + func (c *CLIConfig) RunStartup() + func (c *CLIConfig) SendSignal(cmd *exec.Cmd, sig os.Signal) error + func (c *CLIConfig) SetLogWriter(cmdType string, writer ...io.Writer) error + type Config struct + Caddy caddy.Config + Cookie scookie.Config + Cron scron.Cron + DB sdb.DB + Download struct{ ... } + Extend echo.H + FTP ftp.Config + Language language.Config + Sys ssystem.System + func InitConfig() (*Config, error) + func NewConfig() *Config + func (c *Config) APIKey() string + func (c *Config) AsDefault() + func (c *Config) Codec(lengths ...int) codec.Codec + func (c *Config) ConfigFromDB() echo.H + func (c *Config) ConnectedDB(autoConn ...bool) bool + func (c *Config) CookieConfig() scookie.Config + func (c *Config) Decode(encrypted string, keys ...string) string + func (c *Config) Encode(raw string, keys ...string) string + func (c *Config) GenerateRandomKey() string + func (c *Config) GetMaxRequestBodySize() int + func (c *Config) InitExtend() *Config + func (c *Config) InitSecretKey() *Config + func (c *Config) IsEnv(env string) bool + func (c *Config) IsEnvDev() bool + func (c *Config) IsEnvProd() bool + func (c *Config) Reload(newConfig *Config) error + func (c *Config) SaveToFile() error + func (c *Config) SetDebug(on bool) *Config + type DBOperators struct + Destination sync.DBOperator + Source sync.DBOperator + func UpgradeMySQL(schema string, syncConfig *sync.Config, cfg *Config) (DBOperators, error) + type Email struct + Engine string + From string + QueueSize int + Timeout int64 + func (c *Email) Init() + func (c *Email) SetBy(r echo.H, defaults echo.H) *Email + type Log struct + Colorable bool + Debug bool + FileMaxBytes int64 + SaveFile string + Targets string + func (c *Log) Init() + func (c *Log) LogFile() string + func (c *Log) SetBy(r echo.H, defaults echo.H) *Log + func (c *Log) Show(ctx echo.Context) error + type Navigation struct + Attrs map[string]string + Children []*Navigation + Label string + Name string + Pjax string + URL string + func NewNavigation() *Navigation + type ReloadByConfig interface + ReloadByConfig func(cfg *Config, args ...string) error + type Settings struct + APIKey string + Base echo.H + Debug bool + Email Email + Log Log + MaxRequestBodySize int + func NewSettings(config *Config) *Settings + func (c *Settings) GetConfig() echo.H + func (c *Settings) Init() + func (c *Settings) SetBy(r echo.H, defaults echo.H) *Settings + func (c *Settings) SetConfig(group string, ngingConfig echo.H, defaults echo.H) + func (c *Settings) SetConfigs(groups ...string) + func (c *Settings) SetDebug(on bool) + type VersionInfo struct + BuildTime string + CommitID string + DBSchema float64 + Expired time.Time + Label string + Licensed bool + Name string + Number string + Package string + func (v *VersionInfo) IsExpired() bool + func (v *VersionInfo) IsNew(number string, label string) bool + func (v *VersionInfo) String() string + func (v *VersionInfo) VString() string Other modules containing this package github.com/admpub/nging github.com/admpub/nging/v4 github.com/admpub/nging/v5