Documentation ¶
Index ¶
- Constants
- Variables
- func BuildNewAnswer(outputPath string, plugins []string, originalAnswerInfo OriginalAnswerInfo) (err error)
- 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
- func InstallI18nBundle(replace bool)
- type OriginalAnswerInfo
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 BuildNewAnswer ¶
func BuildNewAnswer(outputPath string, plugins []string, originalAnswerInfo OriginalAnswerInfo) (err error)
BuildNewAnswer builds a new answer with specified plugins
func CheckConfigFile ¶
func CheckDBConnection ¶
CheckDBConnection check database whether the connection is normal
func CheckDBTableExist ¶
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 ¶
func FormatAllPath(dataDirPath string)
func InstallAllInitialEnvironment ¶
func InstallAllInitialEnvironment(dataDirPath string)
InstallAllInitialEnvironment install all initial environment
func InstallConfigFile ¶
func InstallI18nBundle ¶
func InstallI18nBundle(replace bool)
Types ¶
type OriginalAnswerInfo ¶
Click to show internal directories.
Click to hide internal directories.