Documentation ¶
Index ¶
- Constants
- func Connect(configs *DbConfig, retry bool) error
- func ConnectConfigs(configs *DbConfig, retry bool) error
- func CreateAdminUser(c *DbConfig) error
- func TriggerSamples() error
- type DbConfig
- func (d *DbConfig) BackupAssets() error
- func (d *DbConfig) Close()
- func (d *DbConfig) ConnectionString() string
- func (d *DbConfig) CreateDatabase() error
- func (d *DbConfig) DatabaseChanges() error
- func (d *DbConfig) DropDatabase() error
- func (d *DbConfig) MigrateDatabase() error
- func (d *DbConfig) ResetCore() error
- func (d *DbConfig) Save(directory string) error
- func (d *DbConfig) Update() error
- type Sampler
- type SamplerFunc
Constants ¶
View Source
const SqliteFilename = "statping.db"
Variables ¶
This section is empty.
Functions ¶
func ConnectConfigs ¶
func CreateAdminUser ¶
func TriggerSamples ¶
func TriggerSamples() error
Types ¶
type DbConfig ¶
type DbConfig struct { DbConn string `yaml:"connection" json:"connection"` DbHost string `yaml:"host" json:"-"` DbUser string `yaml:"user" json:"-"` DbPass string `yaml:"password" json:"-"` DbData string `yaml:"database" json:"-"` DbPort int `yaml:"port" json:"-"` ApiSecret string `yaml:"api_secret" json:"-"` Language string `yaml:"language" json:"language"` SendReports bool `yaml:"send_reports" json:"send_reports"` Project string `yaml:"-" json:"-"` Description string `yaml:"-" json:"-"` Domain string `yaml:"-" json:"-"` Username string `yaml:"-" json:"-"` Password string `yaml:"-" json:"-"` Email string `yaml:"-" json:"-"` Error error `yaml:"-" json:"-"` Location string `yaml:"location" json:"-"` SqlFile string `yaml:"sqlfile,omitempty" json:"-"` LetsEncryptHost string `yaml:"letsencrypt_host,omitempty" json:"letsencrypt_host"` LetsEncryptEmail string `yaml:"letsencrypt_email,omitempty" json:"letsencrypt_email"` LetsEncryptEnable bool `yaml:"letsencrypt_enable" json:"letsencrypt_enable"` LocalIP string `yaml:"-" json:"-"` Db database.Database `yaml:"-" json:"-"` // contains filtered or unexported fields }
DbConfig struct is used for the Db connection and creates the 'config.yml' file
func LoadConfigs ¶
func (*DbConfig) BackupAssets ¶ added in v0.90.14
BackupAssets is a temporary function (to version 0.90.*) to backup your customized theme to a new folder called 'assets_backup'.
func (*DbConfig) ConnectionString ¶ added in v0.90.28
func (*DbConfig) CreateDatabase ¶
CreateDatabase will CREATE TABLES for each of the Statping elements
func (*DbConfig) DatabaseChanges ¶
func (*DbConfig) DropDatabase ¶
DropDatabase will DROP each table Statping created
func (*DbConfig) MigrateDatabase ¶
MigrateDatabase will migrate the database structure to current version. This function will NOT remove previous records, tables or columns from the database. If this function has an issue, it will ROLLBACK to the previous state.
type SamplerFunc ¶
type SamplerFunc func() error
Click to show internal directories.
Click to hide internal directories.