Documentation ¶
Index ¶
- Constants
- Variables
- func CheckConfigFile(configPath string) bool
- func CheckDBConnection(dataConf *data.Database) bool
- func CheckDBTableExist(dataConf *data.Database) bool
- func CheckUploadDir() bool
- func DumpAllData(dataConf *data.Database, dumpDataPath string) error
- func FormatAllPath(dataDirPath string)
- func GetConfigFilePath() string
- func InstallAllInitialEnvironment(dataDirPath string)
- func InstallConfigFile(configFilePath string) error
Constants ¶
View Source
const ( DefaultConfigFileName = "config.yaml" DefaultCacheFileName = "cache.db" DefaultReservedUsernamesConfigFileName = "reserved-usernames.json" )
Variables ¶
View Source
var ( ConfigFileDir = "/conf/" UploadFilePath = "/uploads/" I18nPath = "/i18n/" CacheDir = "/cache/" )
Functions ¶
func CheckConfigFile ¶
func CheckDBConnection ¶ added in v0.3.0
CheckDBConnection check database whether the connection is normal
func CheckDBTableExist ¶ added in v0.3.0
CheckDBTableExist check database whether the table is already exists
func CheckUploadDir ¶
func CheckUploadDir() bool
func DumpAllData ¶
DumpAllData dump all database data to sql
func FormatAllPath ¶ added in v0.3.0
func FormatAllPath(dataDirPath string)
func GetConfigFilePath ¶ added in v0.3.0
func GetConfigFilePath() string
GetConfigFilePath get config file path
func InstallAllInitialEnvironment ¶
func InstallAllInitialEnvironment(dataDirPath string)
InstallAllInitialEnvironment install all initial environment
func InstallConfigFile ¶ added in v0.3.0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.