{"modulePath":"github.com/apache/answer","version":"v1.7.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cli\n\n## Functions\n\n```go\nfunc BuildNewAnswer(buildDir, outputPath string, plugins []string, originalAnswerInfo OriginalAnswerInfo) (err error)\n```\nBuildNewAnswer builds a new answer with specified plugins\n\n```go\nfunc CheckConfigFile(configPath string) bool\n```\n\n```go\nfunc CheckDBConnection(dataConf *data.Database) bool\n```\nCheckDBConnection check database whether the connection is normal\n\n```go\nfunc CheckDBTableExist(dataConf *data.Database) bool\n```\nCheckDBTableExist check database whether the table is already exists\n\n```go\nfunc CheckUploadDir() bool\n```\n\n```go\nfunc DumpAllData(dataConf *data.Database, dumpDataPath string) error\n```\nDumpAllData dump all database data to sql\n\n```go\nfunc InstallAllInitialEnvironment(dataDirPath string)\n```\nInstallAllInitialEnvironment install all initial environment\n\n```go\nfunc InstallConfigFile(configFilePath string) error\n```\n\n```go\nfunc InstallI18nBundle(replace bool)\n```\n\n```go\nfunc MergeI18nFilesLocal(originalI18nDir, targetI18nDir string) (err error)\n```\nMergeI18nFilesLocal merge i18n files\n\n```go\nfunc ReplaceI18nFilesLocal(i18nDir string) error\n```\nReplaceI18nFilesLocal replace i18n files\n\n```go\nfunc ResetPassword(ctx context.Context, dataDirPath string, opts *ResetPasswordOptions) error\n```\n\n```go\nfunc SetDefaultConfig(dbConf *data.Database, cacheConf *data.CacheConf, field *ConfigField) error\n```\nSetDefaultConfig set default config\n\n## Types\n\n```go\ntype ConfigField struct {\n\tAllowPasswordLogin bool `json:\"allow_password_login\"`\n\t// The slug name of plugin that you want to deactivate\n\tDeactivatePluginSlugName string `json:\"deactivate_plugin_slug_name\"`\n}\n```\n\n```go\ntype OriginalAnswerInfo struct {\n\tVersion  string\n\tRevision string\n\tTime     string\n}\n```\n\n```go\ntype ResetPasswordOptions struct {\n\tEmail    string\n\tPassword string\n}\n```\n\n```go\ntype YamlPluginContent struct {\n\tPlugin map[string]any `yaml:\"plugin\"`\n}\n```\n\n","path":"github.com/apache/answer/internal/cli","name":"cli","synopsis":"","isRedistributable":true}
