Documentation ¶
Index ¶
- Constants
- func Backup() error
- func DumpDatabase() error
- func DumpMysqlDatabase() error
- func DumpPostgresDatabase() error
- func FailResult(message string) gin.H
- func ParseConf(config string) error
- func Restore(file string, useOldConfig bool) error
- func RestoreDatabase() error
- func RestoreMysqlDatabase() error
- func RestorePostgresDatabase() error
- func Result(code int, message string) gin.H
- func SaveConf() error
- func SuccessDataResult(name string, data interface{}) gin.H
- func SuccessResult() gin.H
- func Unzip(target, out string) error
- func Zip(source, target string) error
- type Config
- type Database
- type Smtp
- type Tls
Constants ¶
View Source
const ( ResultSuccessCode = 200 ResultFailCode = 400 ResultNotFoundCode = 404 ResultInternalServerErrorCode = 500 )
Variables ¶
This section is empty.
Functions ¶
func DumpDatabase ¶
func DumpDatabase() error
func DumpMysqlDatabase ¶
func DumpMysqlDatabase() error
func DumpPostgresDatabase ¶
func DumpPostgresDatabase() error
func FailResult ¶
func RestoreDatabase ¶
func RestoreDatabase() error
func RestoreMysqlDatabase ¶
func RestoreMysqlDatabase() error
func RestorePostgresDatabase ¶
func RestorePostgresDatabase() error
func SuccessDataResult ¶
func SuccessResult ¶
Types ¶
type Config ¶
type Config struct { Mode string `json:"mode"` Name string `json:"name"` Password string `json:"password"` UseCategory bool `json:"useCategory"` OtherCategoryId uint `json:"otherCategoryId,omitempty"` DataDir string `json:"dataDir"` Db Database `json:"database"` Smtp Smtp `json:"smtp"` Tls Tls `json:"tls"` }
var Conf *Config
func GetConfigForZip ¶
Click to show internal directories.
Click to hide internal directories.