Showing preview only (8,403K chars total). Download the full file or copy to clipboard to get everything.
Repository: apache/answer
Branch: main
Commit: fca80abbaf38
Files: 1094
Total size: 7.8 MB
Directory structure:
gitextract_8j8m3hg4/
├── .asf.yaml
├── .editorconfig
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ ├── config.yml
│ │ ├── enhancement_request.md
│ │ └── feature_request.md
│ ├── PULL_REQUEST_TEMPLATE/
│ │ └── pull_request_template.md
│ └── workflows/
│ ├── build-binary-for-release.yml
│ ├── build-image-for-latest-release.yml
│ ├── build-image-for-manual.yml
│ ├── build-image-for-release.yml
│ ├── build-image-for-test.yml
│ ├── check-asf-header.yml
│ └── lint.yml
├── .gitignore
├── .gitlab-ci.yml
├── .golangci.yaml
├── .goreleaser.yaml
├── .vaunt/
│ └── config.yaml
├── .vscode/
│ └── settings.json
├── Dockerfile
├── LICENSE
├── Makefile
├── NOTICE
├── README.md
├── build/
│ └── README.md
├── charts/
│ ├── .helmignore
│ ├── Chart.yaml
│ ├── README.md
│ ├── templates/
│ │ ├── _helpers.tpl
│ │ ├── deployment.yaml
│ │ ├── hpa.yaml
│ │ ├── ingress.yaml
│ │ ├── pvc.yaml
│ │ ├── service.yaml
│ │ └── serviceaccount.yaml
│ └── values.yaml
├── cmd/
│ ├── answer/
│ │ └── main.go
│ ├── command.go
│ ├── main.go
│ ├── wire.go
│ └── wire_gen.go
├── configs/
│ ├── config.go
│ ├── config.yaml
│ ├── path_ignore.yaml
│ └── reserved-usernames.json
├── crowdin.yml
├── docker-compose.yaml
├── docs/
│ ├── docs.go
│ ├── release/
│ │ ├── LICENSE
│ │ ├── NOTICE
│ │ └── licenses/
│ │ ├── LICENSE-JedWatson-classnames.txt
│ │ ├── LICENSE-Machiel-slugify.txt
│ │ ├── LICENSE-Masterminds-semver.txt
│ │ ├── LICENSE-Qix--color.txt
│ │ ├── LICENSE-anargu-gin-brotli.txt
│ │ ├── LICENSE-asaskevich-govalidator.txt
│ │ ├── LICENSE-axios-axios.txt
│ │ ├── LICENSE-bwmarrin-snowflake.txt
│ │ ├── LICENSE-codemirror-basic-setup.txt
│ │ ├── LICENSE-codemirror-lang-markdown.txt
│ │ ├── LICENSE-codemirror-language-data.txt
│ │ ├── LICENSE-codemirror-state.txt
│ │ ├── LICENSE-codemirror-view.txt
│ │ ├── LICENSE-cznic-sqlite.txt
│ │ ├── LICENSE-disintegration-imaging.txt
│ │ ├── LICENSE-emn178-js-sha256.txt
│ │ ├── LICENSE-facebook-react.txt
│ │ ├── LICENSE-gin-gonic-gin.txt
│ │ ├── LICENSE-go-gomail-gomail.txt
│ │ ├── LICENSE-go-playground-locales.txt
│ │ ├── LICENSE-go-playground-universal-translator.txt
│ │ ├── LICENSE-go-playground-validator.txt
│ │ ├── LICENSE-go-resty-resty.txt
│ │ ├── LICENSE-go-sql-driver-mysql.txt
│ │ ├── LICENSE-go-yaml-yaml.txt
│ │ ├── LICENSE-goccy-go-json.txt
│ │ ├── LICENSE-golang-org-x.txt
│ │ ├── LICENSE-google-uuid.txt
│ │ ├── LICENSE-google-wire.txt
│ │ ├── LICENSE-grokify-html-strip-tags-go.txt
│ │ ├── LICENSE-i18next-i18next.txt
│ │ ├── LICENSE-i18next-react-i18next.txt
│ │ ├── LICENSE-iamkun-dayjs.txt
│ │ ├── LICENSE-jinzhu-copier.txt
│ │ ├── LICENSE-jinzhu-now.txt
│ │ ├── LICENSE-joho-godotenv.txt
│ │ ├── LICENSE-jordan-wright-email.txt
│ │ ├── LICENSE-jxson-front-matter.txt
│ │ ├── LICENSE-kpdecker-jsdiff.txt
│ │ ├── LICENSE-lib-pq.txt
│ │ ├── LICENSE-ljharb-qs.txt
│ │ ├── LICENSE-lodash-lodash.txt
│ │ ├── LICENSE-mark3labs-mcp-go.txt
│ │ ├── LICENSE-markedjs-marked.txt
│ │ ├── LICENSE-mattn-go-sqlite3.txt
│ │ ├── LICENSE-microcosm-cc-bluemonday.txt
│ │ ├── LICENSE-mojocn-base64Captcha.txt
│ │ ├── LICENSE-mozillazg-go-pinyin.txt
│ │ ├── LICENSE-npm-node-semver.txt
│ │ ├── LICENSE-ory-dockertest.txt
│ │ ├── LICENSE-pmndrs-zustand.txt
│ │ ├── LICENSE-react-bootstrap-react-bootstrap.txt
│ │ ├── LICENSE-remix-run-react-router.txt
│ │ ├── LICENSE-robfig-cron.txt
│ │ ├── LICENSE-sashabaranov-go-openai.txt
│ │ ├── LICENSE-scottleedavis-go-exif-remove.txt
│ │ ├── LICENSE-segmentfault-pacman.txt
│ │ ├── LICENSE-soldair-qrcode.txt
│ │ ├── LICENSE-spf13-cobra.txt
│ │ ├── LICENSE-staylor-react-helmet-async.txt
│ │ ├── LICENSE-stretchr-testify.txt
│ │ ├── LICENSE-sudodoki-copy-to-clipboard.txt
│ │ ├── LICENSE-swaggo-files.txt
│ │ ├── LICENSE-swaggo-gin-swagger.txt
│ │ ├── LICENSE-swaggo-swag.txt
│ │ ├── LICENSE-tidwall-gjson.txt
│ │ ├── LICENSE-twbs-bootstrap.txt
│ │ ├── LICENSE-twbs-icons.txt
│ │ ├── LICENSE-uber-go-mock.txt
│ │ ├── LICENSE-vercel-swr.txt
│ │ ├── LICENSE-xorm.txt
│ │ ├── LICENSE-yuin-goldmark.txt
│ │ └── LIcENSE-Bunlong-next-share.txt
│ ├── swagger.json
│ └── swagger.yaml
├── go.mod
├── go.sum
├── i18n/
│ ├── af_ZA.yaml
│ ├── ar_SA.yaml
│ ├── az_AZ.yaml
│ ├── bal_BA.yaml
│ ├── ban_ID.yaml
│ ├── bn_BD.yaml
│ ├── bs_BA.yaml
│ ├── ca_ES.yaml
│ ├── cs_CZ.yaml
│ ├── cy_GB.yaml
│ ├── da_DK.yaml
│ ├── de_DE.yaml
│ ├── el_GR.yaml
│ ├── en_US.yaml
│ ├── es_ES.yaml
│ ├── fa_IR.yaml
│ ├── fi_FI.yaml
│ ├── fr_FR.yaml
│ ├── he_IL.yaml
│ ├── hi_IN.yaml
│ ├── hu_HU.yaml
│ ├── hy_AM.yaml
│ ├── i18n.go
│ ├── i18n.yaml
│ ├── id_ID.yaml
│ ├── it_IT.yaml
│ ├── ja_JP.yaml
│ ├── ko_KR.yaml
│ ├── ml_IN.yaml
│ ├── nl_NL.yaml
│ ├── no_NO.yaml
│ ├── pl_PL.yaml
│ ├── pt_BR.yaml
│ ├── pt_PT.yaml
│ ├── ro_RO.yaml
│ ├── ru_RU.yaml
│ ├── sk_SK.yaml
│ ├── sq_AL.yaml
│ ├── sr_SP.yaml
│ ├── sv_SE.yaml
│ ├── te_IN.yaml
│ ├── tr_TR.yaml
│ ├── uk_UA.yaml
│ ├── vi_VN.yaml
│ ├── zh_CN.yaml
│ └── zh_TW.yaml
├── internal/
│ ├── base/
│ │ ├── conf/
│ │ │ └── conf.go
│ │ ├── constant/
│ │ │ ├── acticity.go
│ │ │ ├── ai_config.go
│ │ │ ├── cache_key.go
│ │ │ ├── comment.go
│ │ │ ├── constant.go
│ │ │ ├── ctx_flag.go
│ │ │ ├── email_tpl_key.go
│ │ │ ├── event.go
│ │ │ ├── meta.go
│ │ │ ├── notification.go
│ │ │ ├── object_type.go
│ │ │ ├── plugin_config_key.go
│ │ │ ├── privilege.go
│ │ │ ├── question.go
│ │ │ ├── reason.go
│ │ │ ├── revision.go
│ │ │ ├── site_info.go
│ │ │ ├── site_type.go
│ │ │ ├── upload.go
│ │ │ └── user.go
│ │ ├── cron/
│ │ │ ├── cron.go
│ │ │ └── provider.go
│ │ ├── data/
│ │ │ ├── config.go
│ │ │ └── data.go
│ │ ├── handler/
│ │ │ ├── handler.go
│ │ │ ├── lang.go
│ │ │ ├── response.go
│ │ │ └── short_id.go
│ │ ├── middleware/
│ │ │ ├── accept_language.go
│ │ │ ├── api_key_auth.go
│ │ │ ├── auth.go
│ │ │ ├── avatar.go
│ │ │ ├── header.go
│ │ │ ├── mcp_auth.go
│ │ │ ├── provider.go
│ │ │ ├── rate_limit.go
│ │ │ ├── short_id.go
│ │ │ ├── user_center_plugin_auth.go
│ │ │ └── visit_img_auth.go
│ │ ├── pager/
│ │ │ ├── pager.go
│ │ │ └── pagination.go
│ │ ├── path/
│ │ │ └── path.go
│ │ ├── queue/
│ │ │ ├── queue.go
│ │ │ └── queue_test.go
│ │ ├── reason/
│ │ │ ├── privilege.go
│ │ │ └── reason.go
│ │ ├── server/
│ │ │ ├── config.go
│ │ │ ├── http.go
│ │ │ ├── http_funcmap.go
│ │ │ └── provider.go
│ │ ├── translator/
│ │ │ ├── config.go
│ │ │ └── provider.go
│ │ └── validator/
│ │ └── validator.go
│ ├── cli/
│ │ ├── build.go
│ │ ├── config.go
│ │ ├── dump.go
│ │ ├── i18n.go
│ │ ├── install.go
│ │ ├── install_check.go
│ │ └── reset_password.go
│ ├── controller/
│ │ ├── activity_controller.go
│ │ ├── ai_controller.go
│ │ ├── ai_conversation_controller.go
│ │ ├── answer_controller.go
│ │ ├── badge_controller.go
│ │ ├── collection_controller.go
│ │ ├── comment_controller.go
│ │ ├── connector_controller.go
│ │ ├── controller.go
│ │ ├── dashboard_controller.go
│ │ ├── embed_controller.go
│ │ ├── follow_controller.go
│ │ ├── lang_controller.go
│ │ ├── mcp_controller.go
│ │ ├── meta_controller.go
│ │ ├── notification_controller.go
│ │ ├── permission_controller.go
│ │ ├── plugin_captcha_controller.go
│ │ ├── plugin_sidebar_controller.go
│ │ ├── plugin_user_center_controller.go
│ │ ├── question_controller.go
│ │ ├── rank_controller.go
│ │ ├── reason_controller.go
│ │ ├── render_controller.go
│ │ ├── report_controller.go
│ │ ├── review_controller.go
│ │ ├── revision_controller.go
│ │ ├── search_controller.go
│ │ ├── siteinfo_controller.go
│ │ ├── tag_controller.go
│ │ ├── template_controller.go
│ │ ├── template_render/
│ │ │ ├── answer.go
│ │ │ ├── comment.go
│ │ │ ├── controller.go
│ │ │ ├── question.go
│ │ │ ├── tags.go
│ │ │ └── userinfo.go
│ │ ├── upload_controller.go
│ │ ├── user_controller.go
│ │ ├── user_plugin_controller.go
│ │ └── vote_controller.go
│ ├── controller_admin/
│ │ ├── ai_conversation_admin_controller.go
│ │ ├── badge_controller.go
│ │ ├── controller.go
│ │ ├── e_api_key_controller.go
│ │ ├── plugin_controller.go
│ │ ├── role_controller.go
│ │ ├── siteinfo_controller.go
│ │ ├── theme_controller.go
│ │ └── user_backyard_controller.go
│ ├── entity/
│ │ ├── activity_entity.go
│ │ ├── ai_conversation.go
│ │ ├── ai_conversation_record.go
│ │ ├── answer_entity.go
│ │ ├── api_key_entity.go
│ │ ├── auth_user_entity.go
│ │ ├── badge_award_entity.go
│ │ ├── badge_entity.go
│ │ ├── badge_group_entity.go
│ │ ├── captcha_entity.go
│ │ ├── collection_entity.go
│ │ ├── collection_group_entity.go
│ │ ├── comment_entity.go
│ │ ├── config_entity.go
│ │ ├── file_record_entity.go
│ │ ├── meta_entity.go
│ │ ├── notification_entity.go
│ │ ├── plugin_config_entity.go
│ │ ├── plugin_kv_storage_entity.go
│ │ ├── plugin_user_config_entity.go
│ │ ├── power_entity.go
│ │ ├── question_entity.go
│ │ ├── question_link_entity.go
│ │ ├── report_entity.go
│ │ ├── review_entity.go
│ │ ├── revision_entity.go
│ │ ├── role_entity.go
│ │ ├── role_power_rel_entity.go
│ │ ├── site_info.go
│ │ ├── tag_entity.go
│ │ ├── tag_rel_entity.go
│ │ ├── uniqid_entity.go
│ │ ├── user_entity.go
│ │ ├── user_external_login_entity.go
│ │ ├── user_notification_config_entity.go
│ │ ├── user_role_rel_entity.go
│ │ └── version_entity.go
│ ├── install/
│ │ ├── install_controller.go
│ │ ├── install_from_env.go
│ │ ├── install_main.go
│ │ ├── install_req.go
│ │ └── install_server.go
│ ├── migrations/
│ │ ├── init.go
│ │ ├── init_data.go
│ │ ├── migrations.go
│ │ ├── v1.go
│ │ ├── v10.go
│ │ ├── v11.go
│ │ ├── v12.go
│ │ ├── v13.go
│ │ ├── v14.go
│ │ ├── v15.go
│ │ ├── v16.go
│ │ ├── v17.go
│ │ ├── v18.go
│ │ ├── v19.go
│ │ ├── v2.go
│ │ ├── v20.go
│ │ ├── v21.go
│ │ ├── v22.go
│ │ ├── v23.go
│ │ ├── v24.go
│ │ ├── v25.go
│ │ ├── v26.go
│ │ ├── v27.go
│ │ ├── v28.go
│ │ ├── v29.go
│ │ ├── v3.go
│ │ ├── v30.go
│ │ ├── v31.go
│ │ ├── v4.go
│ │ ├── v5.go
│ │ ├── v6.go
│ │ ├── v7.go
│ │ ├── v8.go
│ │ └── v9.go
│ ├── repo/
│ │ ├── activity/
│ │ │ ├── activity_repo.go
│ │ │ ├── answer_repo.go
│ │ │ ├── follow_repo.go
│ │ │ ├── review_repo.go
│ │ │ ├── user_active_repo.go
│ │ │ └── vote_repo.go
│ │ ├── activity_common/
│ │ │ ├── activity_repo.go
│ │ │ ├── follow.go
│ │ │ └── vote.go
│ │ ├── ai_conversation/
│ │ │ └── ai_conversation_repo.go
│ │ ├── answer/
│ │ │ └── answer_repo.go
│ │ ├── api_key/
│ │ │ └── api_key_repo.go
│ │ ├── auth/
│ │ │ └── auth.go
│ │ ├── badge/
│ │ │ ├── badge_event_rule.go
│ │ │ └── badge_repo.go
│ │ ├── badge_award/
│ │ │ └── badge_award_repo.go
│ │ ├── badge_group/
│ │ │ └── badge_group_repo.go
│ │ ├── captcha/
│ │ │ └── captcha.go
│ │ ├── collection/
│ │ │ ├── collection_group_repo.go
│ │ │ └── collection_repo.go
│ │ ├── comment/
│ │ │ └── comment_repo.go
│ │ ├── config/
│ │ │ └── config_repo.go
│ │ ├── export/
│ │ │ └── email_repo.go
│ │ ├── file_record/
│ │ │ └── file_record_repo.go
│ │ ├── limit/
│ │ │ └── limit.go
│ │ ├── meta/
│ │ │ └── meta_repo.go
│ │ ├── notification/
│ │ │ └── notification_repo.go
│ │ ├── plugin_config/
│ │ │ ├── plugin_config_repo.go
│ │ │ └── plugin_user_config_repo.go
│ │ ├── provider.go
│ │ ├── question/
│ │ │ └── question_repo.go
│ │ ├── rank/
│ │ │ └── user_rank_repo.go
│ │ ├── reason/
│ │ │ └── reason_repo.go
│ │ ├── repo_test/
│ │ │ ├── auth_test.go
│ │ │ ├── captcha_test.go
│ │ │ ├── comment_repo_test.go
│ │ │ ├── email_repo_test.go
│ │ │ ├── meta_repo_test.go
│ │ │ ├── notification_repo_test.go
│ │ │ ├── reason_repo_test.go
│ │ │ ├── recommend_test.go
│ │ │ ├── repo_main_test.go
│ │ │ ├── revision_repo_test.go
│ │ │ ├── siteinfo_repo_test.go
│ │ │ ├── tag_rel_repo_test.go
│ │ │ ├── tag_repo_test.go
│ │ │ ├── user_backyard_repo_test.go
│ │ │ └── user_repo_test.go
│ │ ├── report/
│ │ │ └── report_repo.go
│ │ ├── review/
│ │ │ └── review_repo.go
│ │ ├── revision/
│ │ │ └── revision_repo.go
│ │ ├── role/
│ │ │ ├── power_repo.go
│ │ │ ├── role_power_rel_repo.go
│ │ │ ├── role_repo.go
│ │ │ └── user_role_rel_repo.go
│ │ ├── search_common/
│ │ │ └── search_repo.go
│ │ ├── search_sync/
│ │ │ └── search_sync.go
│ │ ├── site_info/
│ │ │ └── siteinfo_repo.go
│ │ ├── tag/
│ │ │ ├── tag_rel_repo.go
│ │ │ └── tag_repo.go
│ │ ├── tag_common/
│ │ │ └── tag_common_repo.go
│ │ ├── unique/
│ │ │ └── uniqid_repo.go
│ │ ├── user/
│ │ │ ├── user_backyard_repo.go
│ │ │ └── user_repo.go
│ │ ├── user_external_login/
│ │ │ └── user_external_login_repo.go
│ │ └── user_notification_config/
│ │ └── user_notification_config_repo.go
│ ├── router/
│ │ ├── answer_api_router.go
│ │ ├── config.go
│ │ ├── mcp_router.go
│ │ ├── plugin_api_router.go
│ │ ├── provider.go
│ │ ├── static_router.go
│ │ ├── swagger_router.go
│ │ ├── template_router.go
│ │ ├── ui.go
│ │ └── ui_test.go
│ ├── schema/
│ │ ├── activity.go
│ │ ├── ai_config_schema.go
│ │ ├── ai_conversation_schema.go
│ │ ├── answer_activity_schema.go
│ │ ├── answer_schema.go
│ │ ├── api_key_schema.go
│ │ ├── backyard_user_schema.go
│ │ ├── badge_schema.go
│ │ ├── collection_group_schema.go
│ │ ├── comment_schema.go
│ │ ├── config_schema.go
│ │ ├── connector_schema.go
│ │ ├── dashboard_schema.go
│ │ ├── email_template.go
│ │ ├── err_schema.go
│ │ ├── event_schema.go
│ │ ├── follow_schema.go
│ │ ├── forbidden_schema.go
│ │ ├── mcp_schema.go
│ │ ├── mcp_tools/
│ │ │ └── mcp_tools.go
│ │ ├── meta_schema.go
│ │ ├── new_question_queue_schema.go
│ │ ├── notification_schema.go
│ │ ├── permission.go
│ │ ├── plugin_admin_schema.go
│ │ ├── plugin_user_center.go
│ │ ├── plugin_user_schema.go
│ │ ├── question_schema.go
│ │ ├── rank_schema.go
│ │ ├── reason_schema.go
│ │ ├── render_schema.go
│ │ ├── report_schema.go
│ │ ├── review_schema.go
│ │ ├── revision_schema.go
│ │ ├── role_schema.go
│ │ ├── search_schema.go
│ │ ├── search_schema_test.go
│ │ ├── simple_obj_info_schema.go
│ │ ├── siteinfo_schema.go
│ │ ├── sitemap_schema.go
│ │ ├── tag_list_schema.go
│ │ ├── tag_schema.go
│ │ ├── template_schema.go
│ │ ├── theme_schema.go
│ │ ├── user_external_login_schema.go
│ │ ├── user_notification_schema.go
│ │ ├── user_schema.go
│ │ └── vote_schema.go
│ └── service/
│ ├── action/
│ │ ├── captcha_service.go
│ │ └── captcha_strategy.go
│ ├── activity/
│ │ ├── activity.go
│ │ ├── answer_activity_service.go
│ │ ├── review_active.go
│ │ └── user_active.go
│ ├── activity_common/
│ │ ├── activity.go
│ │ ├── follow.go
│ │ └── vote.go
│ ├── activity_type/
│ │ └── activity_type.go
│ ├── activityqueue/
│ │ └── activity_queue.go
│ ├── ai_conversation/
│ │ └── ai_conversation_service.go
│ ├── answer_common/
│ │ └── answer.go
│ ├── apikey/
│ │ └── apikey_service.go
│ ├── auth/
│ │ └── auth.go
│ ├── badge/
│ │ ├── badge_award_service.go
│ │ ├── badge_event_handler.go
│ │ ├── badge_group_service.go
│ │ └── badge_service.go
│ ├── collection/
│ │ ├── collection_group_service.go
│ │ └── collection_service.go
│ ├── collection_common/
│ │ └── collection.go
│ ├── comment/
│ │ └── comment_service.go
│ ├── comment_common/
│ │ └── comment_service.go
│ ├── config/
│ │ └── config_service.go
│ ├── content/
│ │ ├── answer_service.go
│ │ ├── question_hottest_service.go
│ │ ├── question_service.go
│ │ ├── revision_service.go
│ │ ├── search_service.go
│ │ ├── user_service.go
│ │ └── vote_service.go
│ ├── dashboard/
│ │ ├── dashboard_service.go
│ │ └── dashboard_test.go
│ ├── eventqueue/
│ │ └── event_queue.go
│ ├── export/
│ │ └── email_service.go
│ ├── feature_toggle/
│ │ └── feature_toggle_service.go
│ ├── file_record/
│ │ └── file_record_service.go
│ ├── follow/
│ │ └── follow_service.go
│ ├── importer/
│ │ └── importer_service.go
│ ├── meta/
│ │ └── meta_service.go
│ ├── meta_common/
│ │ └── meta_common_service.go
│ ├── mock/
│ │ └── siteinfo_repo_mock.go
│ ├── noticequeue/
│ │ └── notice_queue.go
│ ├── notification/
│ │ ├── external_notification.go
│ │ ├── invite_answer_notification.go
│ │ ├── new_answer_notification.go
│ │ ├── new_comment_notification.go
│ │ ├── new_question_notification.go
│ │ └── notification_service.go
│ ├── notification_common/
│ │ └── notification.go
│ ├── object_info/
│ │ └── object_info.go
│ ├── permission/
│ │ ├── answer_permission.go
│ │ ├── comment_permission.go
│ │ ├── permission_name.go
│ │ ├── question_permission.go
│ │ └── tag_permission.go
│ ├── plugin_common/
│ │ └── plugin_common_service.go
│ ├── provider.go
│ ├── question_common/
│ │ └── question.go
│ ├── rank/
│ │ └── rank_service.go
│ ├── reason/
│ │ └── reason_service.go
│ ├── reason_common/
│ │ └── reason.go
│ ├── report/
│ │ └── report_service.go
│ ├── report_common/
│ │ └── report_common.go
│ ├── report_handle/
│ │ └── report_handle.go
│ ├── review/
│ │ └── review_service.go
│ ├── revision/
│ │ └── revision.go
│ ├── revision_common/
│ │ └── revision_service.go
│ ├── role/
│ │ ├── power_service.go
│ │ ├── role_power_rel_service.go
│ │ ├── role_service.go
│ │ └── user_role_rel_service.go
│ ├── search_common/
│ │ └── search.go
│ ├── search_parser/
│ │ └── search_parser.go
│ ├── service_config/
│ │ └── service_config.go
│ ├── siteinfo/
│ │ └── siteinfo_service.go
│ ├── siteinfo_common/
│ │ ├── siteinfo_service.go
│ │ └── siteinfo_service_test.go
│ ├── tag/
│ │ └── tag_service.go
│ ├── tag_common/
│ │ └── tag_common.go
│ ├── unique/
│ │ └── uniqid_service.go
│ ├── uploader/
│ │ └── upload.go
│ ├── user_admin/
│ │ └── user_backyard.go
│ ├── user_common/
│ │ └── user.go
│ ├── user_external_login/
│ │ ├── user_center_login_service.go
│ │ └── user_external_login_service.go
│ └── user_notification_config/
│ └── user_notification_config_service.go
├── licenserc.toml
├── pkg/
│ ├── checker/
│ │ ├── chinese.go
│ │ ├── email.go
│ │ ├── file_type.go
│ │ ├── password.go
│ │ ├── path_ignore.go
│ │ ├── question_link.go
│ │ ├── question_link_test.go
│ │ ├── reserved_username.go
│ │ ├── url.go
│ │ ├── username.go
│ │ └── zero_string.go
│ ├── converter/
│ │ ├── array.go
│ │ ├── markdown.go
│ │ ├── str.go
│ │ └── user.go
│ ├── day/
│ │ ├── day.go
│ │ └── day_test.go
│ ├── dir/
│ │ └── dir.go
│ ├── display/
│ │ └── url.go
│ ├── encryption/
│ │ └── md5.go
│ ├── gravatar/
│ │ ├── gravatar.go
│ │ └── gravatar_test.go
│ ├── htmltext/
│ │ ├── htmltext.go
│ │ └── htmltext_test.go
│ ├── obj/
│ │ └── obj.go
│ ├── random/
│ │ └── random_username.go
│ ├── token/
│ │ └── token.go
│ ├── uid/
│ │ ├── id.go
│ │ └── sid.go
│ └── writer/
│ └── writer.go
├── plugin/
│ ├── agent.go
│ ├── base.go
│ ├── cache.go
│ ├── captcha.go
│ ├── cdn.go
│ ├── config.go
│ ├── connector.go
│ ├── embed.go
│ ├── filter.go
│ ├── importer.go
│ ├── kv_storage.go
│ ├── notification.go
│ ├── parser.go
│ ├── plugin.go
│ ├── plugin_test/
│ │ ├── kv_storage_test.go
│ │ └── plugin_main_test.go
│ ├── render.go
│ ├── reviewer.go
│ ├── search.go
│ ├── sidebar.go
│ ├── storage.go
│ ├── user_center.go
│ └── user_config.go
├── script/
│ ├── build_plugin.sh
│ ├── check-asf-header.sh
│ ├── entrypoint.sh
│ ├── gen-api.sh
│ └── plugin_list
└── ui/
├── .browserslistrc
├── .editorconfig
├── .eslintignore
├── .eslintrc.js
├── .gitignore
├── .lintstagedrc.json
├── .npmrc
├── .prettierrc.json
├── commitlint.config.js
├── config-overrides.js
├── package.json
├── pnpm-workspace.yaml
├── public/
│ ├── index.html
│ ├── manifest.json
│ └── robots.txt
├── scripts/
│ ├── env.js
│ ├── importPlugins.js
│ ├── loadPlugins.js
│ ├── preinstall.js
│ └── setup-eslint.js
├── src/
│ ├── App.test.tsx
│ ├── App.tsx
│ ├── behaviour/
│ │ └── useLegalClick.tsx
│ ├── common/
│ │ ├── _variable.scss
│ │ ├── color.scss
│ │ ├── constants.ts
│ │ ├── interface.ts
│ │ ├── pattern.ts
│ │ └── sideNavLayout.scss
│ ├── components/
│ │ ├── AccordionNav/
│ │ │ ├── index.css
│ │ │ └── index.tsx
│ │ ├── Actions/
│ │ │ └── index.tsx
│ │ ├── AdminSideNav/
│ │ │ └── index.tsx
│ │ ├── Avatar/
│ │ │ └── index.tsx
│ │ ├── BaseUserCard/
│ │ │ └── index.tsx
│ │ ├── BrandUpload/
│ │ │ └── index.tsx
│ │ ├── BubbleAi/
│ │ │ └── index.tsx
│ │ ├── BubbleUser/
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── CardBadge/
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── Comment/
│ │ │ ├── components/
│ │ │ │ ├── ActionBar/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Form/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Reply/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── Counts/
│ │ │ └── index.tsx
│ │ ├── CustomSidebar/
│ │ │ └── index.tsx
│ │ ├── Customize/
│ │ │ └── index.tsx
│ │ ├── CustomizeTheme/
│ │ │ └── index.tsx
│ │ ├── DiffContent/
│ │ │ └── index.tsx
│ │ ├── Editor/
│ │ │ ├── EditorContext.ts
│ │ │ ├── MarkdownEditor.tsx
│ │ │ ├── Select/
│ │ │ │ └── index.tsx
│ │ │ ├── ToolBars/
│ │ │ │ ├── blockquote.tsx
│ │ │ │ ├── bold.tsx
│ │ │ │ ├── code.tsx
│ │ │ │ ├── file.tsx
│ │ │ │ ├── heading.tsx
│ │ │ │ ├── help.tsx
│ │ │ │ ├── hr.tsx
│ │ │ │ ├── image.tsx
│ │ │ │ ├── indent.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── italic.tsx
│ │ │ │ ├── link.tsx
│ │ │ │ ├── ol.tsx
│ │ │ │ ├── outdent.tsx
│ │ │ │ ├── table.tsx
│ │ │ │ └── ul.tsx
│ │ │ ├── Viewer.tsx
│ │ │ ├── hooks/
│ │ │ │ └── useImageUpload.ts
│ │ │ ├── index.scss
│ │ │ ├── index.tsx
│ │ │ ├── toolItem.tsx
│ │ │ ├── types.ts
│ │ │ └── utils/
│ │ │ ├── codemirror/
│ │ │ │ ├── adapter.ts
│ │ │ │ ├── base.ts
│ │ │ │ ├── commands.ts
│ │ │ │ └── events.ts
│ │ │ └── index.ts
│ │ ├── Empty/
│ │ │ └── index.tsx
│ │ ├── FollowingTags/
│ │ │ └── index.tsx
│ │ ├── Footer/
│ │ │ └── index.tsx
│ │ ├── FormatTime/
│ │ │ └── index.tsx
│ │ ├── Header/
│ │ │ ├── components/
│ │ │ │ ├── NavItems/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── SearchInput/
│ │ │ │ └── index.tsx
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── HighlightText/
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── HotQuestions/
│ │ │ └── index.tsx
│ │ ├── HttpErrorContent/
│ │ │ └── index.tsx
│ │ ├── Icon/
│ │ │ ├── index.tsx
│ │ │ └── svg.tsx
│ │ ├── ImgViewer/
│ │ │ ├── index.css
│ │ │ └── index.tsx
│ │ ├── InitialLoadingPlaceholder/
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── Mentions/
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── MobileSideNav/
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── Modal/
│ │ │ ├── BadgeModal.tsx
│ │ │ ├── Confirm.tsx
│ │ │ ├── LoginToContinueModal.tsx
│ │ │ ├── Modal.tsx
│ │ │ ├── index.tsx
│ │ │ └── login.scss
│ │ ├── Operate/
│ │ │ └── index.tsx
│ │ ├── PageTags/
│ │ │ └── index.tsx
│ │ ├── Pagination/
│ │ │ └── index.tsx
│ │ ├── PinList/
│ │ │ └── index.tsx
│ │ ├── PluginRender/
│ │ │ └── index.tsx
│ │ ├── QueryGroup/
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── QuestionList/
│ │ │ └── index.tsx
│ │ ├── QuestionListLoader/
│ │ │ └── index.tsx
│ │ ├── SchemaForm/
│ │ │ ├── README.md
│ │ │ ├── components/
│ │ │ │ ├── Button.tsx
│ │ │ │ ├── Check.tsx
│ │ │ │ ├── Input.tsx
│ │ │ │ ├── InputGroup.tsx
│ │ │ │ ├── Legend.tsx
│ │ │ │ ├── Select.tsx
│ │ │ │ ├── Switch.tsx
│ │ │ │ ├── TagSelector.tsx
│ │ │ │ ├── Textarea.tsx
│ │ │ │ ├── Timezone.tsx
│ │ │ │ ├── Upload.tsx
│ │ │ │ └── index.ts
│ │ │ ├── index.tsx
│ │ │ └── types.ts
│ │ ├── Sender/
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── Share/
│ │ │ └── index.tsx
│ │ ├── SideNav/
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── TabNav/
│ │ │ └── index.tsx
│ │ ├── Tag/
│ │ │ └── index.tsx
│ │ ├── TagSelector/
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── TagsLoader/
│ │ │ └── index.tsx
│ │ ├── TextArea/
│ │ │ └── index.tsx
│ │ ├── TimeZonePicker/
│ │ │ └── index.tsx
│ │ ├── Toast/
│ │ │ └── index.tsx
│ │ ├── Unactivate/
│ │ │ └── index.tsx
│ │ ├── UploadImg/
│ │ │ └── index.tsx
│ │ ├── UserCard/
│ │ │ └── index.tsx
│ │ ├── WelcomeTitle/
│ │ │ └── index.tsx
│ │ └── index.ts
│ ├── hooks/
│ │ ├── index.ts
│ │ ├── useActivationEmailModal/
│ │ │ └── index.tsx
│ │ ├── useCaptchaModal/
│ │ │ └── index.tsx
│ │ ├── useChangePasswordModal/
│ │ │ └── index.tsx
│ │ ├── useChangeProfileModal/
│ │ │ └── index.tsx
│ │ ├── useChangeUserRoleModal/
│ │ │ └── index.tsx
│ │ ├── useExternalToast/
│ │ │ └── index.tsx
│ │ ├── useLoginRedirect/
│ │ │ └── index.tsx
│ │ ├── usePageTags/
│ │ │ └── index.tsx
│ │ ├── usePageUsers/
│ │ │ └── index.tsx
│ │ ├── usePrompt/
│ │ │ └── index.tsx
│ │ ├── useReportModal/
│ │ │ └── index.tsx
│ │ ├── useSkeletonControl/
│ │ │ └── index.tsx
│ │ ├── useTagModal/
│ │ │ └── index.tsx
│ │ ├── useToast/
│ │ │ └── index.tsx
│ │ └── useUserModal/
│ │ └── index.tsx
│ ├── i18n/
│ │ └── init.ts
│ ├── index.scss
│ ├── index.tsx
│ ├── pages/
│ │ ├── 404/
│ │ │ ├── 403/
│ │ │ │ └── index.tsx
│ │ │ └── index.tsx
│ │ ├── 50X/
│ │ │ └── index.tsx
│ │ ├── Admin/
│ │ │ ├── AiAssistant/
│ │ │ │ ├── components/
│ │ │ │ │ ├── Action/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ └── DetailModal/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── AiSettings/
│ │ │ │ └── index.tsx
│ │ │ ├── Answers/
│ │ │ │ ├── components/
│ │ │ │ │ └── Action/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Apikeys/
│ │ │ │ ├── components/
│ │ │ │ │ ├── Action/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── AddOrEditModal/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── CreatedModal/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ └── index.tsx
│ │ │ ├── Badges/
│ │ │ │ ├── components/
│ │ │ │ │ └── Action/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Branding/
│ │ │ │ └── index.tsx
│ │ │ ├── CssAndHtml/
│ │ │ │ └── index.tsx
│ │ │ ├── Dashboard/
│ │ │ │ ├── components/
│ │ │ │ │ ├── AnswerLinks/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── HealthStatus/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── Statistics/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── SystemInfo/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ └── index.tsx
│ │ │ ├── Files/
│ │ │ │ └── index.tsx
│ │ │ ├── General/
│ │ │ │ └── index.tsx
│ │ │ ├── Interface/
│ │ │ │ └── index.tsx
│ │ │ ├── Login/
│ │ │ │ └── index.tsx
│ │ │ ├── Mcp/
│ │ │ │ └── index.tsx
│ │ │ ├── Plugins/
│ │ │ │ ├── Config/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── Installed/
│ │ │ │ └── index.tsx
│ │ │ ├── Policies/
│ │ │ │ └── index.tsx
│ │ │ ├── Privileges/
│ │ │ │ └── index.tsx
│ │ │ ├── QaSettings/
│ │ │ │ └── index.tsx
│ │ │ ├── Questions/
│ │ │ │ ├── components/
│ │ │ │ │ └── Action/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Security/
│ │ │ │ └── index.tsx
│ │ │ ├── Seo/
│ │ │ │ └── index.tsx
│ │ │ ├── Smtp/
│ │ │ │ └── index.tsx
│ │ │ ├── TagsSettings/
│ │ │ │ └── index.tsx
│ │ │ ├── Themes/
│ │ │ │ └── index.tsx
│ │ │ ├── Users/
│ │ │ │ ├── components/
│ │ │ │ │ ├── Action/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── DeleteUserModal/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ └── SuspenseUserModal/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── UsersSettings/
│ │ │ │ └── index.tsx
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── AiAssistant/
│ │ │ ├── components/
│ │ │ │ └── ConversationList/
│ │ │ │ └── index.tsx
│ │ │ └── index.tsx
│ │ ├── Badges/
│ │ │ ├── Detail/
│ │ │ │ ├── components/
│ │ │ │ │ ├── Badge/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── HeaderLoader/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── Loader/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ └── UserCard/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ └── index.tsx
│ │ ├── Install/
│ │ │ ├── components/
│ │ │ │ ├── FifthStep/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── FirstStep/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── FourthStep/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Progress/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── SecondStep/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── ThirdStep/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.ts
│ │ │ └── index.tsx
│ │ ├── Layout/
│ │ │ └── index.tsx
│ │ ├── Legal/
│ │ │ ├── Privacy/
│ │ │ │ └── index.tsx
│ │ │ ├── Tos/
│ │ │ │ └── index.tsx
│ │ │ └── index.tsx
│ │ ├── Maintenance/
│ │ │ └── index.tsx
│ │ ├── Questions/
│ │ │ ├── Ask/
│ │ │ │ ├── components/
│ │ │ │ │ └── SearchQuestion/
│ │ │ │ │ ├── index.scss
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Detail/
│ │ │ │ ├── components/
│ │ │ │ │ ├── Alert/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── Answer/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── AnswerHead/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── ContentLoader/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── InviteToAnswer/
│ │ │ │ │ │ ├── PeopleDropdown.scss
│ │ │ │ │ │ ├── PeopleDropdown.tsx
│ │ │ │ │ │ ├── index.scss
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── LinkedQuestions/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── Question/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── Reactions/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── RelatedQuestions/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── WriteAnswer/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── index.scss
│ │ │ │ └── index.tsx
│ │ │ ├── EditAnswer/
│ │ │ │ ├── index.scss
│ │ │ │ └── index.tsx
│ │ │ ├── Linked/
│ │ │ │ └── index.tsx
│ │ │ └── index.tsx
│ │ ├── Review/
│ │ │ ├── components/
│ │ │ │ ├── ApproveDropdown/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── EditPostModal/
│ │ │ │ │ ├── index.scss
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── FlagContent/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── QueuedContent/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── ReviewType/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── SuggestContent/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.ts
│ │ │ ├── index.tsx
│ │ │ └── utils/
│ │ │ └── generateData.ts
│ │ ├── Search/
│ │ │ ├── components/
│ │ │ │ ├── AiCard/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Empty/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Head/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── ListLoader/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── SearchHead/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── SearchItem/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Tips/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.ts
│ │ │ └── index.tsx
│ │ ├── SideNavLayout/
│ │ │ └── index.tsx
│ │ ├── SideNavLayoutWithoutFooter/
│ │ │ └── index.tsx
│ │ ├── Tags/
│ │ │ ├── Create/
│ │ │ │ └── index.tsx
│ │ │ ├── Detail/
│ │ │ │ └── index.tsx
│ │ │ ├── Edit/
│ │ │ │ └── index.tsx
│ │ │ ├── Info/
│ │ │ │ ├── components/
│ │ │ │ │ └── MergeTagModal/
│ │ │ │ │ ├── index.scss
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ └── index.tsx
│ │ ├── Timeline/
│ │ │ ├── components/
│ │ │ │ └── Item/
│ │ │ │ └── index.tsx
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── UserCenter/
│ │ │ ├── Auth/
│ │ │ │ ├── components/
│ │ │ │ │ └── WeCom/
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ └── service.ts
│ │ │ │ └── index.tsx
│ │ │ └── AuthFailed/
│ │ │ ├── components/
│ │ │ │ └── WeCom.tsx
│ │ │ └── index.tsx
│ │ └── Users/
│ │ ├── AccountForgot/
│ │ │ ├── components/
│ │ │ │ └── sendEmail.tsx
│ │ │ └── index.tsx
│ │ ├── ActivationResult/
│ │ │ └── index.tsx
│ │ ├── ActiveEmail/
│ │ │ └── index.tsx
│ │ ├── AuthCallback/
│ │ │ └── index.tsx
│ │ ├── ChangeEmail/
│ │ │ ├── components/
│ │ │ │ └── sendEmail.tsx
│ │ │ └── index.tsx
│ │ ├── ConfirmNewEmail/
│ │ │ └── index.tsx
│ │ ├── Login/
│ │ │ └── index.tsx
│ │ ├── Logout/
│ │ │ └── index.tsx
│ │ ├── Notifications/
│ │ │ ├── components/
│ │ │ │ ├── Achievements/
│ │ │ │ │ ├── index.scss
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Inbox/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.ts
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── OauthBindEmail/
│ │ │ └── index.tsx
│ │ ├── PasswordReset/
│ │ │ └── index.tsx
│ │ ├── Personal/
│ │ │ ├── components/
│ │ │ │ ├── Alert/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Answers/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Badges/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Comments/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── DefaultList/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── ListHead/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── NavBar/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Overview/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Reputation/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── TopList/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── UserInfo/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Votes/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.ts
│ │ │ └── index.tsx
│ │ ├── Register/
│ │ │ ├── components/
│ │ │ │ └── SignUpForm/
│ │ │ │ └── index.tsx
│ │ │ └── index.tsx
│ │ ├── Settings/
│ │ │ ├── Account/
│ │ │ │ ├── components/
│ │ │ │ │ ├── ModifyEmail/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── ModifyPass/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── MyLogins/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ └── index.tsx
│ │ │ ├── Interface/
│ │ │ │ └── index.tsx
│ │ │ ├── Notification/
│ │ │ │ └── index.tsx
│ │ │ ├── Plugins/
│ │ │ │ └── index.tsx
│ │ │ ├── Profile/
│ │ │ │ └── index.tsx
│ │ │ ├── components/
│ │ │ │ └── Nav/
│ │ │ │ └── index.tsx
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── Suspended/
│ │ │ └── index.tsx
│ │ ├── Unsubscribe/
│ │ │ └── index.tsx
│ │ └── index.tsx
│ ├── plugins/
│ │ ├── builtin/
│ │ │ ├── HostingConnector/
│ │ │ │ ├── i18n/
│ │ │ │ │ ├── en_US.yaml
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── zh_CN.yaml
│ │ │ │ ├── index.tsx
│ │ │ │ └── info.yaml
│ │ │ ├── SearchInfo/
│ │ │ │ ├── i18n/
│ │ │ │ │ ├── en_US.yaml
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── zh_CN.yaml
│ │ │ │ ├── index.tsx
│ │ │ │ ├── info.yaml
│ │ │ │ └── services.ts
│ │ │ ├── ThirdPartyConnector/
│ │ │ │ ├── i18n/
│ │ │ │ │ ├── en_US.yaml
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── zh_CN.yaml
│ │ │ │ ├── index.tsx
│ │ │ │ ├── info.yaml
│ │ │ │ └── services.ts
│ │ │ └── index.ts
│ │ └── index.ts
│ ├── react-app-env.d.ts
│ ├── router/
│ │ ├── RouteErrorBoundary.tsx
│ │ ├── RouteGuard.tsx
│ │ ├── alias.ts
│ │ ├── index.tsx
│ │ ├── pathFactory.ts
│ │ └── routes.ts
│ ├── services/
│ │ ├── admin/
│ │ │ ├── ai.ts
│ │ │ ├── answer.ts
│ │ │ ├── apikeys.ts
│ │ │ ├── badges.ts
│ │ │ ├── dashboard.ts
│ │ │ ├── flag.ts
│ │ │ ├── index.ts
│ │ │ ├── mcp.ts
│ │ │ ├── plugins.ts
│ │ │ ├── question.ts
│ │ │ ├── settings.ts
│ │ │ ├── tags.ts
│ │ │ └── users.ts
│ │ ├── client/
│ │ │ ├── Oauth.ts
│ │ │ ├── activity.ts
│ │ │ ├── ai.ts
│ │ │ ├── badges.ts
│ │ │ ├── index.ts
│ │ │ ├── legal.ts
│ │ │ ├── notification.ts
│ │ │ ├── personal.ts
│ │ │ ├── question.ts
│ │ │ ├── review.ts
│ │ │ ├── revision.ts
│ │ │ ├── search.ts
│ │ │ ├── settings.ts
│ │ │ ├── tag.ts
│ │ │ ├── timeline.ts
│ │ │ └── user.ts
│ │ ├── common.ts
│ │ ├── index.ts
│ │ ├── install/
│ │ │ └── index.ts
│ │ └── user-center/
│ │ └── index.ts
│ ├── stores/
│ │ ├── aiControl.ts
│ │ ├── branding.ts
│ │ ├── commentReply.ts
│ │ ├── customize.ts
│ │ ├── errorCode.ts
│ │ ├── index.ts
│ │ ├── interface.ts
│ │ ├── loggedUserInfo.ts
│ │ ├── loginSetting.ts
│ │ ├── loginToContinue.ts
│ │ ├── pageTags.ts
│ │ ├── seoSetting.ts
│ │ ├── sideNav.ts
│ │ ├── siteInfo.ts
│ │ ├── siteSecurity.ts
│ │ ├── themeSetting.ts
│ │ ├── toast.ts
│ │ ├── userCenter.ts
│ │ └── writeSetting.ts
│ └── utils/
│ ├── animateGift.ts
│ ├── color.ts
│ ├── common.ts
│ ├── floppyNavigation.ts
│ ├── guard.ts
│ ├── index.ts
│ ├── localize.ts
│ ├── pluginKit/
│ │ ├── index.ts
│ │ ├── interface.ts
│ │ └── utils.ts
│ ├── progress.ts
│ ├── request.ts
│ ├── requestAi.ts
│ ├── saveDraft.ts
│ ├── storage.ts
│ ├── storageWithExpires.ts
│ └── userCenter.ts
├── static.go
├── template/
│ ├── 404.html
│ ├── comment.html
│ ├── footer.html
│ ├── header.html
│ ├── homepage.html
│ ├── hot-question.html
│ ├── opensearch.xml
│ ├── page.html
│ ├── question-detail.html
│ ├── question.html
│ ├── related-question.html
│ ├── sidenav.html
│ ├── sitemap-list.xml
│ ├── sitemap.xml
│ ├── sort-btns.html
│ ├── tag-detail.html
│ └── tags.html
└── tsconfig.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .asf.yaml
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# NOTE: All configurations could be found here: https://cwiki.apache.org/confluence/display/INFRA/Git+-+.asf.yaml+features
github:
description: "A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer."
homepage: https://answer.apache.org
labels:
- react
- go
- golang
- community
- forum
- question
- typescript
- q-and-a
- hacktoberfest
features:
wiki: true
issues: true
projects: true
discussions: false
enabled_merge_buttons:
squash: true
rebase: true
merge: false
protected_branches:
main: {}
notifications:
commits: commits@answer.apache.org
issues: issues@answer.apache.org
pullrequests: issues@answer.apache.org
discussions: issues@answer.apache.org
================================================
FILE: .editorconfig
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# http://editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.go]
indent_style = tab
indent_size = 2
[{Makefile, Dockerfile}]
indent_style = tab
indent_size = 4
[{*.yml, *.json}]
indent_style = space
indent_size = 2
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Report an issue to help the project improve.
title: ''
labels: bug
type: 'Bug'
assignees: ''
---
## Describe the bug
A clear and concise description of what the bug is.
## To Reproduce
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
## Expected behavior
A clear and concise description of what you expected to happen.
## Screenshots
If applicable, add screenshots or video to help explain your problem.
## Platform
- Device: [e.g. Desktop, Mobile]
- OS: [e.g. macOS]
- Browser and version: [e.g. Chrome, Safari]
- Version: [e.g. v1.2.0]
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
blank_issues_enabled: true
contact_links:
- name: Questions & Discussions
url: https://meta.answer.dev
about: If you have any questions while using.
================================================
FILE: .github/ISSUE_TEMPLATE/enhancement_request.md
================================================
---
name: Enhancement request
about: Suggest an enhancement for this project. Improve an existing feature.
title: ''
labels: enhancement
type: 'Feature'
assignees: ''
---
## Is your enhancement request related to a problem? Please describe
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
## Describe the solution you'd like
A clear and concise description of what you want to happen.
## Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea or possible new feature for this project.
title: ''
labels: new-feature
type: 'Feature'
assignees: ''
---
## Is your feature request related to a problem? Please describe
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
## Describe the solution you'd like
A clear and concise description of what you want to happen.
## Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
================================================
FILE: .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
================================================
Fixes #
## Proposed Changes
-
-
-
================================================
FILE: .github/workflows/build-binary-for-release.yml
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
name: Build Binary For Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build-goreleaser:
if: ${{ github.repository_owner == 'apache' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 20.18.1
- name: Node Build
run: make install-ui-packages ui
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.23
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --clean --skip=validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v4
with:
name: answer
path: ./dist/*
================================================
FILE: .github/workflows/build-image-for-latest-release.yml
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
name: Build Latest Docker Image For Release
on:
push:
tags:
- v2.*
- v1.*
- v0.*
- "!v*-RC*"
# pull_request:
# branches: [ "main" ]
jobs:
build:
if: ${{ github.repository_owner == 'apache' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: apache/answer
tags: |
type=raw,value=latest
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
file: ./Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
================================================
FILE: .github/workflows/build-image-for-manual.yml
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
name: Manual Build Docker Image For Release
on:
workflow_dispatch:
inputs:
tag_name:
type: string
required: true
description: 'DockerHub img tag name'
jobs:
build:
if: ${{ github.repository_owner == 'apache' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: apache/answer
tags: |
type=ref,enable=true,priority=600,prefix=,suffix=,event=branch
type=semver,pattern={{version}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
file: ./Dockerfile
tags: apache/answer:${{ inputs.tag_name }}
labels: ${{ steps.meta.outputs.labels }}
================================================
FILE: .github/workflows/build-image-for-release.yml
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
name: Build Docker Image For Release
on:
push:
tags:
- v2.*
- v1.*
- v0.*
# pull_request:
# branches: [ "main" ]
jobs:
build:
if: ${{ github.repository_owner == 'apache' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: apache/answer
tags: |
type=ref,enable=true,priority=600,prefix=,suffix=,event=branch
type=semver,pattern={{version}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
file: ./Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
================================================
FILE: .github/workflows/build-image-for-test.yml
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
name: Build Docker Image For Test
on:
push:
branches: [ "test" ]
jobs:
build:
if: ${{ github.repository_owner == 'apache' }}
name: Build and Push
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: apache/answer
tags: |
type=raw,value=test
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
================================================
FILE: .github/workflows/check-asf-header.yml
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
name: CI
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
# Concurrency strategy:
# github.workflow: distinguish this workflow from others
# github.event_name: distinguish `push` event from `pull_request` event
# github.event.number: set to the number of the pull request if `pull_request` event
# github.run_id: otherwise, it's a `push` or `schedule` event, only cancel if we rerun the workflow
#
# Reference:
# https://docs.github.com/en/actions/using-jobs/using-concurrency
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.number || github.run_id }}
cancel-in-progress: true
jobs:
check:
name: Check and lint
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Check license header
uses: korandoru/hawkeye@v3
================================================
FILE: .github/workflows/lint.yml
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
name: Lint
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.number || github.run_id }}
cancel-in-progress: true
jobs:
lint:
name: Lint (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
cache: true
- name: Run go mod tidy
run: go mod tidy
- name: Run golangci-lint
run: make lint
- name: Check for uncommitted changes
shell: bash
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "::error::Uncommitted changes detected"
git status
git diff
exit 1
fi
================================================
FILE: .gitignore
================================================
*.exe
*.orig
*.rej
*.so
*~
*.db
.DS_Store
._*
/.idea
/.fleet
/.vscode/*.log
/cmd/answer/*.sh
/cmd/answer/answer
/cmd/answer/uploads/*
/cmd/logs
/configs/config-dev.yaml
/go.work*
/logs
/ui/node_modules
/ui/build/*/*/*
/ui/build/*.json
/ui/build/*.html
/ui/build/*.txt
/vendor
Thumbs*.db
tmp
vendor/
/answer-data/
/answer
/new_answer
build/tools/
dist/
# Lint setup generated file
.husky/
# Environment variables
.env
================================================
FILE: .gitlab-ci.yml
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
include:
- project: "segmentfault/devops/templates"
file: ".docker-build-push.yml"
- project: "segmentfault/devops/templates"
file: ".deploy-helm.yml"
stages:
- deploy-dev
"deploy-to-local-develop-environment":
stage: deploy-dev
extends: .deploy-helm
only:
- test
variables:
LoadBalancerIP: 10.0.10.98
KubernetesCluster: dev
KubernetesNamespace: "sf-web"
InstallArgs: --set service.loadBalancerIP=${LoadBalancerIP} --set image.tag=latest --set replicaCount=1 --set serivce.targetPort=80
ChartName: answer
InstallPolicy: replace
================================================
FILE: .golangci.yaml
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
version: "2"
linters:
exclusions:
paths:
- answer-data
- ui
- i18n
enable:
- asasalint # checks for pass []any as any in variadic func(...any)
- asciicheck # checks that your code does not contain non-ASCII identifiers
- bidichk # checks for dangerous unicode character sequences
- bodyclose # checks whether HTTP response body is closed successfully
- canonicalheader # checks whether net/http.Header uses canonical header
- copyloopvar # detects places where loop variables are copied (Go 1.22+)
- gocritic # provides diagnostics that check for bugs, performance and style issues
- misspell # finds commonly misspelled English words in comments and strings
- modernize # detects code that can be modernized to use newer Go features
- testifylint # checks usage of github.com/stretchr/testify
- unconvert # removes unnecessary type conversions
- unparam # reports unused function parameters
- whitespace # detects leading and trailing whitespace
formatters:
enable:
- gofmt
- goimports
settings:
gofmt:
simplify: true
rewrite-rules:
- pattern: 'interface{}'
replacement: 'any'
================================================
FILE: .goreleaser.yaml
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
version: 2
env:
- GO11MODULE=on
- GO111MODULE=on
- GOPROXY=https://goproxy.io,direct
- CGO_ENABLED=0
before:
hooks:
- go mod tidy
release:
draft: true
builds:
- id: build
main: ./cmd/answer/.
binary: answer
ldflags: -s -w -X github.com/apache/answer/cmd.Version={{.RawVersion}} -X github.com/apache/answer/cmd.Revision={{.ShortCommit}} -X github.com/apache/answer/cmd.Time={{.Date}} -X github.com/apache/answer/cmd.BuildUser=goreleaser
flags: -v
goos:
- linux
- darwin
goarch:
- amd64
- arm64
- id: build-windows
main: ./cmd/answer/.
binary: answer
ldflags: -s -w -X github.com/apache/answer/cmd.Version={{.RawVersion}} -X github.com/apache/answer/cmd.Revision={{.ShortCommit}} -X github.com/apache/answer/cmd.Time={{.Date}} -X github.com/apache/answer/cmd.BuildUser=goreleaser
flags: -v
goos:
- windows
goarch:
- amd64
archives:
- name_template: >-
apache-answer-{{ .RawVersion }}-bin-{{ .Os }}-{{ .Arch }}
files:
- src: "docs/release/LICENSE"
dst: LICENSE
- src: "docs/release/NOTICE"
dst: NOTICE
- src: "docs/release/licenses/*"
dst: licenses/
wrap_in_directory: true
checksum:
name_template: 'checksums.txt'
snapshot:
version_template: "{{ incpatch .Version }}"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
source:
enabled: true
name_template: apache-answer-{{ .RawVersion }}-src
prefix_template: "apache-answer-{{ .RawVersion }}-src/"
# goreleaser release --skip-validate --skip-publish --clean
================================================
FILE: .vaunt/config.yaml
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
version: 0.0.1
achievements:
- achievement:
name: Visionary Architect
icon: https://raw.githubusercontent.com/apache/answer/main/.vaunt/enhancement.png
description: Awarded for bringing up enhancement, dream big!
triggers:
- trigger:
actor: assignees
action: issue
condition: labels in ['enhancement'] & labels in ['LGTM']
- achievement:
name: Bug Hunter
icon: https://raw.githubusercontent.com/apache/answer/main/.vaunt/bug.png
description: Awarded for identifying real bugs, well spotted!
triggers:
- trigger:
actor: assignees
action: issue
condition: labels in ['bug'] & labels in ['LGTM']
================================================
FILE: .vscode/settings.json
================================================
{
"eslint.workingDirectories": [
"ui"
],
"explorer.autoReveal": "focusNoScroll",
"cSpell.words": [
"grecaptcha"
]
}
================================================
FILE: Dockerfile
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
FROM golang:1.24-alpine AS golang-builder
LABEL maintainer="linkinstar@apache.org"
ARG GOPROXY
# ENV GOPROXY ${GOPROXY:-direct}
# ENV GOPROXY=https://proxy.golang.com.cn,direct
ENV GOPATH /go
ENV GOROOT /usr/local/go
ENV PACKAGE github.com/apache/answer
ENV BUILD_DIR ${GOPATH}/src/${PACKAGE}
ENV ANSWER_MODULE ${BUILD_DIR}
ARG TAGS="sqlite sqlite_unlock_notify"
ENV TAGS "bindata timetzdata $TAGS"
ARG CGO_EXTRA_CFLAGS
COPY . ${BUILD_DIR}
WORKDIR ${BUILD_DIR}
RUN apk --no-cache add build-base git bash nodejs npm && npm install -g pnpm@9.7.0 \
&& make clean build
RUN chmod 755 answer
RUN ["/bin/bash","-c","script/build_plugin.sh"]
RUN cp answer /usr/bin/answer
RUN mkdir -p /data/uploads && chmod 777 /data/uploads \
&& mkdir -p /data/i18n && cp -r i18n/*.yaml /data/i18n
FROM alpine
LABEL maintainer="linkinstar@apache.org"
ARG TIMEZONE
ENV TIMEZONE=${TIMEZONE:-"Asia/Shanghai"}
RUN apk update \
&& apk --no-cache add \
bash \
ca-certificates \
curl \
dumb-init \
gettext \
openssh \
sqlite \
gnupg \
tzdata \
&& ln -sf /usr/share/zoneinfo/${TIMEZONE} /etc/localtime \
&& echo "${TIMEZONE}" > /etc/timezone
COPY --from=golang-builder /usr/bin/answer /usr/bin/answer
COPY --from=golang-builder /data /data
COPY /script/entrypoint.sh /entrypoint.sh
RUN chmod 755 /entrypoint.sh
VOLUME /data
EXPOSE 80
ENTRYPOINT ["/entrypoint.sh"]
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: Makefile
================================================
.PHONY: build clean ui
VERSION=2.0.0
BIN=answer
DIR_SRC=./cmd/answer
DOCKER_CMD=docker
GO_ENV=CGO_ENABLED=0 GO111MODULE=on
Revision=$(shell git rev-parse --short HEAD 2>/dev/null || echo "")
GO_FLAGS=-ldflags="-X github.com/apache/answer/cmd.Version=$(VERSION) -X 'github.com/apache/answer/cmd.Revision=$(Revision)' -X 'github.com/apache/answer/cmd.Time=`date +%s`' -extldflags -static"
GO=$(GO_ENV) "$(shell which go)"
GOLANGCI_VERSION ?= v2.6.2
TOOLS_BIN := $(shell mkdir -p build/tools && realpath build/tools)
GOLANGCI = $(TOOLS_BIN)/golangci-lint-$(GOLANGCI_VERSION)
$(GOLANGCI):
rm -f $(TOOLS_BIN)/golangci-lint*
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/$(GOLANGCI_VERSION)/install.sh | sh -s -- -b $(TOOLS_BIN) $(GOLANGCI_VERSION)
mv $(TOOLS_BIN)/golangci-lint $(TOOLS_BIN)/golangci-lint-$(GOLANGCI_VERSION)
build: generate
@$(GO) build $(GO_FLAGS) -o $(BIN) $(DIR_SRC)
# https://dev.to/thewraven/universal-macos-binaries-with-go-1-16-3mm3
universal: generate
@GOOS=darwin GOARCH=amd64 $(GO_ENV) $(GO) build $(GO_FLAGS) -o ${BIN}_amd64 $(DIR_SRC)
@GOOS=darwin GOARCH=arm64 $(GO_ENV) $(GO) build $(GO_FLAGS) -o ${BIN}_arm64 $(DIR_SRC)
@lipo -create -output ${BIN} ${BIN}_amd64 ${BIN}_arm64
@rm -f ${BIN}_amd64 ${BIN}_arm64
generate:
@$(GO) get github.com/swaggo/swag/cmd/swag@v1.16.3
@$(GO) get github.com/google/wire/cmd/wire@v0.5.0
@$(GO) get go.uber.org/mock/mockgen@v0.6.0
@$(GO) install github.com/swaggo/swag/cmd/swag@v1.16.3
@$(GO) install github.com/google/wire/cmd/wire@v0.5.0
@$(GO) install go.uber.org/mock/mockgen@v0.6.0
@$(GO) generate ./...
@$(GO) mod tidy
check:
@mockgen -version
@swag -v
@wire flags
test:
@$(GO) test ./internal/repo/repo_test
# clean all build result
clean:
@$(GO) clean ./...
@rm -f $(BIN)
install-ui-packages:
@corepack enable
@corepack prepare pnpm@9.7.0 --activate
ui:
@cd ui && pnpm pre-install && pnpm build && cd -
lint: generate $(GOLANGCI)
@bash ./script/check-asf-header.sh
$(GOLANGCI) run
lint-fix: generate $(GOLANGCI)
@bash ./script/check-asf-header.sh
$(GOLANGCI) run --fix
all: clean build
================================================
FILE: NOTICE
================================================
Apache Answer
Copyright 2023-2025 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (https://www.apache.org/).
================================================
FILE: README.md
================================================
<a href="https://answer.apache.org">
<img alt="logo" src="docs/img/logo.svg" height="99px">
</a>
# Apache Answer - Build Q&A platform
A Q&A platform software for teams at any scales. Whether it’s a community forum, help center, or knowledge management platform, you can always count on Answer.
To learn more about the project, visit [answer.apache.org](https://answer.apache.org).
[](https://github.com/apache/answer/blob/main/LICENSE)
[](https://golang.org/)
[](https://reactjs.org/)
[](https://goreportcard.com/report/github.com/apache/answer)
[](https://discord.gg/Jm7Y4cbUej)
## Screenshots

## Quick start
### Running with docker
```bash
docker run -d -p 9080:80 -v answer-data:/data --name answer apache/answer:2.0.0
```
For more information, see [Installation](https://answer.apache.org/docs/installation).
### Plugins
Answer provides a plugin system for developers to create custom plugins and expand Answer’s features. You can find the [plugin documentation here](https://answer.apache.org/community/plugins).
We value your feedback and suggestions to improve our documentation. If you have any comments or questions, please feel free to contact us. We’re excited to see what you can create using our plugin system!
You can also check out the [plugins here](https://answer.apache.org/plugins).
## Building from Source
### Prerequisites
- Golang >= 1.23
- Node.js >= 20
- pnpm >= 9
- [mockgen](https://github.com/uber-go/mock?tab=readme-ov-file#installation) >= 0.6.0
- [wire](https://github.com/google/wire/) >= 0.5.0
### Build
```bash
# Install wire and mockgen for building. You can run `make check` to check if they are installed.
$ make generate
# Install frontend dependencies and build
$ make ui
# Install backend dependencies and build
$ make build
```
## Contributing
Contributions are always welcome!
See [CONTRIBUTING](https://answer.apache.org/community/contributing) for ways to get started.
## License
[Apache License 2.0](https://github.com/apache/answer/blob/main/LICENSE)
================================================
FILE: build/README.md
================================================
# /build
Packaging and Continuous Integration.
================================================
FILE: charts/.helmignore
================================================
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
================================================
FILE: charts/Chart.yaml
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
apiVersion: v2
name: answer
description: A simple answer deployments for kubernetes
type: application
version: 0.1.0
appVersion: "1.0.7"
================================================
FILE: charts/README.md
================================================
# answer
An open-source knowledge-based community software. You can use it quickly to build Q&A community for your products, customers, teams, and more.
## Prerequisites
- Kubernetes 1.20+
## Configuration
The following table lists the configurable parameters of the answer chart and their default values.
| Parameter | Description | Default |
| --------- | ----------- | ------- |
| `replicaCount` | Number of answer replicas | `1` |
| `image.repository` | Image repository | `apache/answer` |
| `image.pullPolicy` | Image pull policy | `Always` |
| `image.tag` | Image tag | `latest` |
| `env` | Optional environment variables for answer | `LOG_LEVEL: INFO` |
| `extraContainers` | Optional sidecar containers to run along side answer | `[]` |
| `persistence.enabled` | Enable or disable persistence for the /data volume | `true` |
| `persistence.accessMode` | Specify the access mode of the persistent volume | `ReadWriteOnce` |
| `persistence.size` | The size of the persistent volume | `5Gi` |
| `persistence.annotations` | Annotations to add to the volume claim | `{}` |
| `imagePullSecrets` | Reference to one or more secrets to be used when pulling images | `[]` |
| `nameOverride` | nameOverride replaces the name of the chart in the Chart.yaml file, when this is used to construct Kubernetes object names. | |
| `fullnameOverride` | fullnameOverride completely replaces the generated name. | |
| `serviceAccount.create` | If `true`, create a new service account | `true` |
| `serviceAccount.annotations` | Annotations to add to the service account | `{}` |
| `serviceAccount.name` | Service account to be used. If not set and `serviceAccount.create` is `true`, a name is generated using the fullname template | |
| `podAnnotations` | Annotations to add to the answer pod | `{}` |
| `podSecurityContext` | Security context for the answer pod | `{}` refer to [Default Security Contexts](#default-security-contexts) |
| `securityContext` | Security context for the answer container | `{}` refer to [Default Security Contexts](#default-security-contexts) |
| `service.type` | The type of service to be used | `ClusterIP` |
| `service.port` | The port that the service should listen on for requests. Also used as the container port. | `80` |
| `ingress.enabled` | Enable or disable ingress. | `false` |
| `resources` | CPU/memory resource requests/limits | `{}` |
| `autoscaling.enabled` | Enable or disable pod autoscaling. If enabled, replicas are disabled. | `false` |
| `nodeSelector` | Node labels for pod assignment | `{}` |
| `tolerations` | Node tolerations for pod assignment | `[]` |
| `affinity` | Node affinity for pod assignment | `{}` |
### Default Security Contexts
The default pod-level and container-level security contexts, below, adhere to the [restricted](https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted) Pod Security Standards policies.
Default pod-level securityContext:
```yaml
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
```
Default containerSecurityContext:
```yaml
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
```
### Installing with a Values file
```console
$ helm install answer -f values.yaml .
```
> **Tip**: You can use the default [values.yaml]
## TODO
Publish the chart to Artifacthub and add proper installation instructions. E.G.
> **NOTE**: This is not currently a valid installation option.
```console
$ helm repo add apache https://charts.answer.apache.org/
$ helm repo update
$ helm install apache/answer -n mynamespace
```
================================================
FILE: charts/templates/_helpers.tpl
================================================
{{/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/}}
{{- define "answer.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "answer.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "answer.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "answer.labels" -}}
helm.sh/chart: {{ include "answer.chart" . }}
{{ include "answer.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "answer.selectorLabels" -}}
app.kubernetes.io/name: {{ include "answer.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "answer.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "answer.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
================================================
FILE: charts/templates/deployment.yaml
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "answer.fullname" . }}
labels:
{{- include "answer.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "answer.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "answer.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "answer.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if .Values.env }}
env:
{{- range .Values.env }}
- name: {{ .name }}
{{- if .value | quote }}
value: {{ .value | quote }}
{{- end }}
{{- if .valueFrom }}
valueFrom:
{{- toYaml .valueFrom | nindent 16 }}
{{- end }}
{{- end }}
{{- end }}
volumeMounts:
- name: data
mountPath: "/data"
{{- if .Values.extraContainers }}
{{- toYaml .Values.extraContainers | nindent 8 }}
{{- end }}
volumes:
- name: data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ include "answer.fullname" . }}-claim
{{- else }}
emptyDir: {}
{{- end -}}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
================================================
FILE: charts/templates/hpa.yaml
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
{{ if .Values.autoscaling.enabled -}}
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "answer.fullname" . }}
labels:
{{- include "answer.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "answer.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
================================================
FILE: charts/templates/ingress.yaml
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
{{ if .Values.ingress.enabled -}}
{{- $fullName := include "answer.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
{{- end }}
{{- end }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "answer.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ .pathType }}
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
================================================
FILE: charts/templates/pvc.yaml
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
{{ if .Values.persistence.enabled -}}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ include "answer.fullname" . }}-claim
{{- with .Values.persistence.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
labels:
{{- include "answer.labels" . | nindent 4 }}
spec:
{{- if .Values.persistence.storageClass }}
{{- if (eq "-" .Values.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.storageClass }}"
{{- end }}
{{- end }}
accessModes:
- {{ .Values.persistence.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
{{- with .Values.persistence.dataSource }}
dataSource:
name: {{ .name }}
kind: {{ .kind | default "VolumeSnapshot" }}
apiGroup: {{ .apiGroup | default "snapshot.storage.k8s.io" }}
{{- end }}
{{- end }}
================================================
FILE: charts/templates/service.yaml
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
apiVersion: v1
kind: Service
metadata:
name: {{ include "answer.fullname" . }}
labels:
{{- include "answer.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "answer.selectorLabels" . | nindent 4 }}
================================================
FILE: charts/templates/serviceaccount.yaml
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
{{ if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "answer.serviceAccountName" . }}
labels:
{{- include "answer.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
================================================
FILE: charts/values.yaml
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# Default values for answer.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: apache/answer
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: "latest"
# Environment variables
# Configure environment variables below
# https://answer.apache.org/docs/env
env:
- name: LOG_LEVEL
# [DEBUG INFO WARN ERROR]
value: "INFO"
# uncomment the below values to use AUTO_INSTALL and not have to go through the setup process.
# Once used to do the initial setup, these variables won't be used moving forward.
# You must at a minimum comment AUTO_INSTALL after initial setup to prevent an error about the database already being initiated.
# - name: AUTO_INSTALL
# value: "true"
# - name: DB_TYPE
# value: "sqlite3"
# # DB_FILE Only for sqlite3
# - name: DB_FILE
# value: "/data/answer.db"
# - name: LANGUAGE
# value: "en-US"
# - name: SITE_NAME
# value: "MyAnswer"
# - name: SITE_URL
# value: "http://localhost:80"
# - name: CONTACT_EMAIL
# value: "support@mydomain.com"
# - name: ADMIN_NAME
# # lowercase
# value: "myadmin"
# - name: ADMIN_PASSWORD
# # 32 Characters MAX
# value: "MyInsecurePasswordInTheRepo!"
# # Use valueFrom to use a secret
# # valueFrom:
# # secretKeyRef:
# # key: answer-admin-password
# # name: answer-secrets
# - name: ADMIN_EMAIL
# value: "myAdmin@mydomain.com"
# Configure extra containers
extraContainers: []
# - name: cloudsql-proxy
# image: gcr.io/cloud-sql-connectors/cloud-sql-proxy:2.1.2
# command:
# - /cloud-sql-proxy
# args:
# - project:region:instance
# - --port=5432
# - --auto-iam-authn
# ports:
# - containerPort: 5432
# Persistence for the /data volume
# Without persistence, your uploads and config.yaml will not be remembered between restarts.
persistence:
enabled: true
# If set to "-", storageClassName: "", which disables dynamic provisioning
# If undefined (the default) or set to null, no storageClassName spec is
# set, choosing the default provisioner. (gp2 on AWS, standard on
# GKE, AWS & OpenStack)
# storageClass: "-"
accessMode: ReadWriteOnce
size: 5Gi
annotations: {}
# To restore a PVC from a VolumeSnapshot, set the dataSource;
# the kind and apiGroup are optional and default to the shown values
dataSource: {}
# name: my-volume-snapshot
# kind: VolumeSnapshot
# apiGroup: snapshot.storage.k8s.io
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
podAnnotations: {}
podSecurityContext: {}
# fsGroup: 2000
securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
service:
type: ClusterIP
port: 80
ingress:
enabled: false
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: answer.local
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: answer-tls
# hosts:
# - answer.local
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
nodeSelector: {}
tolerations: []
affinity: {}
================================================
FILE: cmd/answer/main.go
================================================
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//go:generate go run github.com/swaggo/swag/cmd/swag init -g ./cmd/answer/main.go -d ../../ -o ../../docs
package main
import (
answercmd "github.com/apache/answer/cmd"
)
// main godoc
// @title Apache Answer
// @description Apache Answer API
// @BasePath /
// @securityDefinitions.apikey ApiKeyAuth
// @in header
// @name Authorization
func main() {
answercmd.Main()
}
================================================
FILE: cmd/command.go
================================================
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package answercmd
import (
"context"
"fmt"
"os"
"strings"
"github.com/apache/answer/internal/base/conf"
"github.com/apache/answer/internal/base/path"
"github.com/apache/answer/internal/cli"
"github.com/apache/answer/internal/install"
"github.com/apache/answer/internal/migrations"
"github.com/apache/answer/plugin"
"github.com/segmentfault/pacman/log"
"github.com/spf13/cobra"
)
var (
// dataDirPath save all answer application data in this directory. like config file, upload file...
dataDirPath string
// dumpDataPath dump data path
dumpDataPath string
// place to build new answer
buildDir string
// plugins needed to build in answer application
buildWithPlugins []string
// build output path
buildOutput string
// This config is used to upgrade the database from a specific version manually.
// If you want to upgrade the database to version 1.1.0, you can use `answer upgrade -f v1.1.0`.
upgradeVersion string
// The fields that need to be set to the default value
configFields []string
// i18nSourcePath i18n from path
i18nSourcePath string
// i18nTargetPath i18n to path
i18nTargetPath string
// resetPasswordEmail user email for password reset
resetPasswordEmail string
// resetPasswordPassword new password for password reset
resetPasswordPassword string
)
func init() {
rootCmd.Version = fmt.Sprintf("%s\nrevision: %s\nbuild time: %s", Version, Revision, Time)
rootCmd.PersistentFlags().StringVarP(&dataDirPath, "data-path", "C", "/data/", "data path, eg: -C ./data/")
dumpCmd.Flags().StringVarP(&dumpDataPath, "path", "p", "./", "dump data path, eg: -p ./dump/data/")
buildCmd.Flags().StringSliceVarP(&buildWithPlugins, "with", "w", []string{}, "plugins needed to build")
buildCmd.Flags().StringVarP(&buildOutput, "output", "o", "", "build output path")
buildCmd.Flags().StringVarP(&buildDir, "build-dir", "b", "", "dir for build process")
upgradeCmd.Flags().StringVarP(&upgradeVersion, "from", "f", "", "upgrade from specific version, eg: -f v1.1.0")
configCmd.Flags().StringSliceVarP(&configFields, "with", "w", []string{}, "the fields that need to be set to the default value, eg: -w allow_password_login")
i18nCmd.Flags().StringVarP(&i18nSourcePath, "source", "s", "", "i18n source path, eg: -s ./i18n/source")
i18nCmd.Flags().StringVarP(&i18nTargetPath, "target", "t", "", "i18n target path, eg: -t ./i18n/target")
resetPasswordCmd.Flags().StringVarP(&resetPasswordEmail, "email", "e", "", "user email address")
resetPasswordCmd.Flags().StringVarP(&resetPasswordPassword, "password", "p", "", "new password (not recommended, will be recorded in shell history)")
for _, cmd := range []*cobra.Command{initCmd, checkCmd, runCmd, dumpCmd, upgradeCmd, buildCmd, pluginCmd, configCmd, i18nCmd, resetPasswordCmd} {
rootCmd.AddCommand(cmd)
}
}
var (
rootCmd = &cobra.Command{
Use: "answer",
Short: "Answer is a minimalist open source Q&A community.",
Long: `Answer is a minimalist open source Q&A community.
To run answer, use:
- 'answer init' to initialize the required environment.
- 'answer run' to launch application.`,
}
runCmd = &cobra.Command{
Use: "run",
Short: "Run Answer",
Long: `Start running Answer`,
Run: func(_ *cobra.Command, _ []string) {
path.FormatAllPath(dataDirPath)
fmt.Println("config file path: ", path.GetConfigFilePath())
fmt.Println("Answer is starting..........................")
runApp()
},
}
initCmd = &cobra.Command{
Use: "init",
Short: "Initialize Answer",
Long: `Initialize Answer with specified configuration`,
Run: func(_ *cobra.Command, _ []string) {
// check config file and database. if config file exists and database is already created, init done
cli.InstallAllInitialEnvironment(dataDirPath)
configFileExist := cli.CheckConfigFile(path.GetConfigFilePath())
if configFileExist {
fmt.Println("config file exists, try to read the config...")
c, err := conf.ReadConfig(path.GetConfigFilePath())
if err != nil {
fmt.Println("read config failed: ", err.Error())
return
}
fmt.Println("config file read successfully, try to connect database...")
if cli.CheckDBTableExist(c.Data.Database) {
fmt.Println("connect to database successfully and table already exists, do nothing.")
return
}
}
// start installation server to install
install.Run(path.GetConfigFilePath())
},
}
upgradeCmd = &cobra.Command{
Use: "upgrade",
Short: "Upgrade Answer",
Long: `Upgrade Answer to the latest version`,
Run: func(_ *cobra.Command, _ []string) {
log.SetLogger(log.NewStdLogger(os.Stdout))
path.FormatAllPath(dataDirPath)
cli.InstallI18nBundle(true)
c, err := conf.ReadConfig(path.GetConfigFilePath())
if err != nil {
fmt.Println("read config failed: ", err.Error())
return
}
if err = migrations.Migrate(c.Debug, c.Data.Database, c.Data.Cache, upgradeVersion); err != nil {
fmt.Println("migrate failed: ", err.Error())
return
}
fmt.Println("upgrade done")
},
}
dumpCmd = &cobra.Command{
Use: "dump",
Short: "Back up data",
Long: `Back up database into an SQL file`,
Run: func(_ *cobra.Command, _ []string) {
fmt.Println("Answer is backing up data")
path.FormatAllPath(dataDirPath)
c, err := conf.ReadConfig(path.GetConfigFilePath())
if err != nil {
fmt.Println("read config failed: ", err.Error())
return
}
err = cli.DumpAllData(c.Data.Database, dumpDataPath)
if err != nil {
fmt.Println("dump failed: ", err.Error())
return
}
fmt.Println("Answer backed up the data successfully.")
},
}
checkCmd = &cobra.Command{
Use: "check",
Short: "Check the required environment",
Long: `Check if the current environment meets the startup requirements`,
Run: func(_ *cobra.Command, _ []string) {
path.FormatAllPath(dataDirPath)
fmt.Println("Start checking the required environment...")
if cli.CheckConfigFile(path.GetConfigFilePath()) {
fmt.Println("config file exists [✔]")
} else {
fmt.Println("config file not exists [x]")
}
if cli.CheckUploadDir() {
fmt.Println("upload directory exists [✔]")
} else {
fmt.Println("upload directory not exists [x]")
}
c, err := conf.ReadConfig(path.GetConfigFilePath())
if err != nil {
fmt.Println("read config failed: ", err.Error())
return
}
if cli.CheckDBConnection(c.Data.Database) {
fmt.Println("db connection successfully [✔]")
} else {
fmt.Println("db connection failed [x]")
}
fmt.Println("check environment all done")
},
}
buildCmd = &cobra.Command{
Use: "build",
Short: "Build Answer with plugins",
Long: `Build a new Answer with plugins that you need`,
Run: func(_ *cobra.Command, _ []string) {
fmt.Printf("try to build a new answer with plugins:\n%s\n", strings.Join(buildWithPlugins, "\n"))
err := cli.BuildNewAnswer(buildDir, buildOutput, buildWithPlugins, cli.OriginalAnswerInfo{
Version: Version,
Revision: Revision,
Time: Time,
})
if err != nil {
fmt.Printf("build failed %v\n", err)
os.Exit(1)
}
fmt.Printf("build new answer successfully %s\n", buildOutput)
},
}
pluginCmd = &cobra.Command{
Use: "plugin",
Short: "Print all plugins packed in the binary",
Long: `Print all plugins packed in the binary`,
Run: func(_ *cobra.Command, _ []string) {
_ = plugin.CallBase(func(base plugin.Base) error {
info := base.Info()
fmt.Printf("%s[%s] made by %s\n", info.SlugName, info.Version, info.Author)
return nil
})
},
}
configCmd = &cobra.Command{
Use: "config",
Short: "Set some config to default value",
Long: `Set some config to default value`,
Run: func(_ *cobra.Command, _ []string) {
path.FormatAllPath(dataDirPath)
c, err := conf.ReadConfig(path.GetConfigFilePath())
if err != nil {
fmt.Println("read config failed: ", err.Error())
return
}
field := &cli.ConfigField{}
fmt.Println(configFields)
if len(configFields) > 0 {
switch configFields[0] {
case "allow_password_login":
field.AllowPasswordLogin = true
case "deactivate_plugin":
if len(configFields) > 1 {
field.DeactivatePluginSlugName = configFields[1]
}
default:
fmt.Printf("field %s not support\n", configFields[0])
}
}
err = cli.SetDefaultConfig(c.Data.Database, c.Data.Cache, field)
if err != nil {
fmt.Println("set default config failed: ", err.Error())
} else {
fmt.Println("set default config successfully")
}
},
}
i18nCmd = &cobra.Command{
Use: "i18n",
Short: "Overwrite i18n files",
Long: `Merge i18n files from plugins to original i18n files. It will overwrite the original i18n files`,
Run: func(_ *cobra.Command, _ []string) {
if err := cli.ReplaceI18nFilesLocal(i18nTargetPath); err != nil {
fmt.Printf("replace i18n files failed %v\n", err)
} else {
fmt.Printf("replace i18n files successfully\n")
}
fmt.Printf("try to merge i18n files from %q to %q\n", i18nSourcePath, i18nTargetPath)
if err := cli.MergeI18nFilesLocal(i18nTargetPath, i18nSourcePath); err != nil {
fmt.Printf("merge i18n files failed %v\n", err)
} else {
fmt.Printf("merge i18n files successfully\n")
}
},
}
resetPasswordCmd = &cobra.Command{
Use: "passwd",
Aliases: []string{"password", "reset-password"},
Short: "Reset user password",
Long: "Reset user password by email address.",
Example: ` # Interactive mode (recommended, safest)
answer passwd -C ./answer-data
# Specify email only (will prompt for password securely)
answer passwd -C ./answer-data --email user@example.com
answer passwd -C ./answer-data -e user@example.com
# Specify email and password (NOT recommended, will be recorded in shell history)
answer passwd -C ./answer-data -e user@example.com -p newpassword123`,
Run: func(cmd *cobra.Command, args []string) {
opts := &cli.ResetPasswordOptions{
Email: resetPasswordEmail,
Password: resetPasswordPassword,
}
if err := cli.ResetPassword(context.Background(), dataDirPath, opts); err != nil {
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
os.Exit(1)
}
},
}
)
// Execute adds all child commands to the root command and sets flags appropriately.
// This is called by main(). It only needs to happen once to the rootCmd.
func Execute() {
err := rootCmd.Execute()
if err != nil {
os.Exit(1)
}
}
================================================
FILE: cmd/main.go
================================================
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package answercmd
import (
"context"
"fmt"
"os"
"time"
"github.com/apache/answer/internal/base/conf"
"github.com/apache/answer/internal/base/constant"
"github.com/apache/answer/internal/base/cron"
"github.com/apache/answer/internal/base/path"
"github.com/apache/answer/internal/schema"
"github.com/gin-gonic/gin"
"github.com/joho/godotenv"
"github.com/segmentfault/pacman"
"github.com/segmentfault/pacman/contrib/log/zap"
"github.com/segmentfault/pacman/contrib/server/http"
"github.com/segmentfault/pacman/log"
)
func init() {
// Load .env if present, ignore error to keep backward compatibility
_ = godotenv.Load()
}
// go build -ldflags "-X github.com/apache/answer/cmd.Version=x.y.z"
var (
// Name is the name of the project
Name = "answer"
// Version is the version of the project
Version = "0.0.0"
// Revision is the git short commit revision number
// If built without a Git repository, this field will be empty.
Revision = ""
// Time is the build time of the project
Time = ""
// GoVersion is the go version of the project
GoVersion = "1.23"
// log level
logLevel = os.Getenv("LOG_LEVEL")
// log path
logPath = os.Getenv("LOG_PATH")
)
// Main
// @securityDefinitions.apikey ApiKeyAuth
// @in header
// @name Authorization
func Main() {
log.SetLogger(zap.NewLogger(
log.ParseLevel(logLevel), zap.WithName("answer"), zap.WithPath(logPath)))
Execute()
}
func runApp() {
c, err := conf.ReadConfig(path.GetConfigFilePath())
if err != nil {
panic(err)
}
app, cleanup, err := initApplication(
c.Debug, c.Server, c.Data.Database, c.Data.Cache, c.I18n, c.Swaggerui, c.ServiceConfig, c.UI, log.GetLogger())
if err != nil {
panic(err)
}
constant.Version = Version
constant.Revision = Revision
constant.GoVersion = GoVersion
schema.AppStartTime = time.Now()
fmt.Println("answer Version:", constant.Version, " Revision:", constant.Revision)
defer cleanup()
if err := app.Run(context.Background()); err != nil {
panic(err)
}
}
func newApplication(serverConf *conf.Server, server *gin.Engine, manager *cron.ScheduledTaskManager) *pacman.Application {
manager.Run()
return pacman.NewApp(
pacman.WithName(Name),
pacman.WithVersion(Version),
pacman.WithServer(http.NewServer(server, serverConf.HTTP.Addr)),
)
}
================================================
FILE: cmd/wire.go
================================================
//go:build wireinject
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
// The build tag makes sure the stub is not built in the final build.
package answercmd
import (
"github.com/apache/answer/internal/base/conf"
"github.com/apache/answer/internal/base/cron"
"github.com/apache/answer/internal/base/data"
"github.com/apache/answer/internal/base/middleware"
"github.com/apache/answer/internal/base/server"
"github.com/apache/answer/internal/base/translator"
"github.com/apache/answer/internal/controller"
templaterender "github.com/apache/answer/internal/controller/template_render"
"github.com/apache/answer/internal/controller_admin"
"github.com/apache/answer/internal/repo"
"github.com/apache/answer/internal/router"
"github.com/apache/answer/internal/service"
"github.com/apache/answer/internal/service/service_config"
"github.com/google/wire"
"github.com/segmentfault/pacman"
"github.com/segmentfault/pacman/log"
)
// initApplication init application.
func initApplication(
debug bool,
serverConf *conf.Server,
dbConf *data.Database,
cacheConf *data.CacheConf,
i18nConf *translator.I18n,
swaggerConf *router.SwaggerConfig,
serviceConf *service_config.ServiceConfig,
uiConf *server.UI,
logConf log.Logger) (*pacman.Application, func(), error) {
panic(wire.Build(
server.ProviderSetServer,
router.ProviderSetRouter,
controller.ProviderSetController,
controller_admin.ProviderSetController,
templaterender.ProviderSetTemplateRenderController,
service.ProviderSetService,
cron.ProviderSetService,
repo.ProviderSetRepo,
translator.ProviderSet,
middleware.ProviderSetMiddleware,
newApplication,
))
}
================================================
FILE: cmd/wire_gen.go
================================================
//go:build !wireinject
// +build !wireinject
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
// Code generated by Wire. DO NOT EDIT.
//go:generate go run github.com/google/wire/cmd/wire
package answercmd
import (
"github.com/apache/answer/internal/base/conf"
"github.com/apache/answer/internal/base/cron"
"github.com/apache/answer/internal/base/data"
"github.com/apache/answer/internal/base/middleware"
"github.com/apache/answer/internal/base/server"
"github.com/apache/answer/internal/base/translator"
"github.com/apache/answer/internal/controller"
"github.com/apache/answer/internal/controller/template_render"
"github.com/apache/answer/internal/controller_admin"
"github.com/apache/answer/internal/repo/activity"
"github.com/apache/answer/internal/repo/activity_common"
"github.com/apache/answer/internal/repo/ai_conversation"
"github.com/apache/answer/internal/repo/answer"
"github.com/apache/answer/internal/repo/api_key"
"github.com/apache/answer/internal/repo/auth"
"github.com/apache/answer/internal/repo/badge"
"github.com/apache/answer/internal/repo/badge_award"
"github.com/apache/answer/internal/repo/badge_group"
"github.com/apache/answer/internal/repo/captcha"
"github.com/apache/answer/internal/repo/collection"
"github.com/apache/answer/internal/repo/comment"
"github.com/apache/answer/internal/repo/config"
"github.com/apache/answer/internal/repo/export"
"github.com/apache/answer/internal/repo/file_record"
"github.com/apache/answer/internal/repo/limit"
"github.com/apache/answer/internal/repo/meta"
notification2 "github.com/apache/answer/internal/repo/notification"
"github.com/apache/answer/internal/repo/plugin_config"
"github.com/apache/answer/internal/repo/question"
"github.com/apache/answer/internal/repo/rank"
"github.com/apache/answer/internal/repo/reason"
"github.com/apache/answer/internal/repo/report"
"github.com/apache/answer/internal/repo/review"
"github.com/apache/answer/internal/repo/revision"
"github.com/apache/answer/internal/repo/role"
"github.com/apache/answer/internal/repo/search_common"
"github.com/apache/answer/internal/repo/site_info"
"github.com/apache/answer/internal/repo/tag"
"github.com/apache/answer/internal/repo/tag_common"
"github.com/apache/answer/internal/repo/unique"
"github.com/apache/answer/internal/repo/user"
"github.com/apache/answer/internal/repo/user_external_login"
"github.com/apache/answer/internal/repo/user_notification_config"
"github.com/apache/answer/internal/router"
"github.com/apache/answer/internal/service/action"
activity2 "github.com/apache/answer/internal/service/activity"
activity_common2 "github.com/apache/answer/internal/service/activity_common"
"github.com/apache/answer/internal/service/activityqueue"
ai_conversation2 "github.com/apache/answer/internal/service/ai_conversation"
"github.com/apache/answer/internal/service/answer_common"
"github.com/apache/answer/internal/service/apikey"
auth2 "github.com/apache/answer/internal/service/auth"
badge2 "github.com/apache/answer/internal/service/badge"
collection2 "github.com/apache/answer/internal/service/collection"
"github.com/apache/answer/internal/service/collection_common"
comment2 "github.com/apache/answer/internal/service/comment"
"github.com/apache/answer/internal/service/comment_common"
config2 "github.com/apache/answer/internal/service/config"
"github.com/apache/answer/internal/service/content"
"github.com/apache/answer/internal/service/dashboard"
"github.com/apache/answer/internal/service/eventqueue"
export2 "github.com/apache/answer/internal/service/export"
"github.com/apache/answer/internal/service/feature_toggle"
file_record2 "github.com/apache/answer/internal/service/file_record"
"github.com/apache/answer/internal/service/follow"
"github.com/apache/answer/internal/service/importer"
meta2 "github.com/apache/answer/internal/service/meta"
"github.com/apache/answer/internal/service/meta_common"
"github.com/apache/answer/internal/service/noticequeue"
"github.com/apache/answer/internal/service/notification"
"github.com/apache/answer/internal/service/notification_common"
"github.com/apache/answer/internal/service/object_info"
"github.com/apache/answer/internal/service/plugin_common"
"github.com/apache/answer/internal/service/question_common"
rank2 "github.com/apache/answer/internal/service/rank"
reason2 "github.com/apache/answer/internal/service/reason"
report2 "github.com/apache/answer/internal/service/report"
"github.com/apache/answer/internal/service/report_handle"
review2 "github.com/apache/answer/internal/service/review"
"github.com/apache/answer/internal/service/revision_common"
role2 "github.com/apache/answer/internal/service/role"
"github.com/apache/answer/internal/service/search_parser"
"github.com/apache/answer/internal/service/service_config"
"github.com/apache/answer/internal/service/siteinfo"
"github.com/apache/answer/internal/service/siteinfo_common"
tag2 "github.com/apache/answer/internal/service/tag"
tag_common2 "github.com/apache/answer/internal/service/tag_common"
"github.com/apache/answer/internal/service/uploader"
"github.com/apache/answer/internal/service/user_admin"
"github.com/apache/answer/internal/service/user_common"
user_external_login2 "github.com/apache/answer/internal/service/user_external_login"
user_notification_config2 "github.com/apache/answer/internal/service/user_notification_config"
"github.com/segmentfault/pacman"
"github.com/segmentfault/pacman/log"
)
// Injectors from wire.go:
// initApplication init application.
func initApplication(debug bool, serverConf *conf.Server, dbConf *data.Database, cacheConf *data.CacheConf, i18nConf *translator.I18n, swaggerConf *router.SwaggerConfig, serviceConf *service_config.ServiceConfig, uiConf *server.UI, logConf log.Logger) (*pacman.Application, func(), error) {
staticRouter := router.NewStaticRouter(serviceConf)
i18nTranslator, err := translator.NewTranslator(i18nConf)
if err != nil {
return nil, nil, err
}
engine, err := data.NewDB(debug, dbConf)
if err != nil {
return nil, nil, err
}
cache, cleanup, err := data.NewCache(cacheConf)
if err != nil {
return nil, nil, err
}
dataData, cleanup2, err := data.NewData(engine, cache)
if err != nil {
cleanup()
return nil, nil, err
}
siteInfoRepo := site_info.NewSiteInfo(dataData)
siteInfoCommonService := siteinfo_common.NewSiteInfoCommonService(siteInfoRepo)
langController := controller.NewLangController(i18nTranslator, siteInfoCommonService)
authRepo := auth.NewAuthRepo(dataData)
apiKeyRepo := api_key.NewAPIKeyRepo(dataData)
authService := auth2.NewAuthService(authRepo, apiKeyRepo)
userRepo := user.NewUserRepo(dataData)
uniqueIDRepo := unique.NewUniqueIDRepo(dataData)
configRepo := config.NewConfigRepo(dataData)
configService := config2.NewConfigService(configRepo)
activityRepo := activity_common.NewActivityRepo(dataData, uniqueIDRepo, configService)
userRankRepo := rank.NewUserRankRepo(dataData, configService)
userActiveActivityRepo := activity.NewUserActiveActivityRepo(dataData, activityRepo, userRankRepo, configService)
emailRepo := export.NewEmailRepo(dataData)
emailService := export2.NewEmailService(configService, emailRepo, siteInfoCommonService)
userRoleRelRepo := role.NewUserRoleRelRepo(dataData)
roleRepo := role.NewRoleRepo(dataData)
roleService := role2.NewRoleService(roleRepo)
userRoleRelService := role2.NewUserRoleRelService(userRoleRelRepo, roleService)
userCommon := usercommon.NewUserCommon(userRepo, userRoleRelService, authService, siteInfoCommonService)
userExternalLoginRepo := user_external_login.NewUserExternalLoginRepo(dataData)
userNotificationConfigRepo := user_notification_config.NewUserNotificationConfigRepo(dataData)
userNotificationConfigService := user_notification_config2.NewUserNotificationConfigService(userRepo, userNotificationConfigRepo)
userExternalLoginService := user_external_login2.NewUserExternalLoginService(userRepo, userCommon, userExternalLoginRepo, emailService, siteInfoCommonService, userActiveActivityRepo, userNotificationConfigService)
questionRepo := question.NewQuestionRepo(dataData, uniqueIDRepo)
answerRepo := answer.NewAnswerRepo(dataData, uniqueIDRepo, userRankRepo, activityRepo)
voteRepo := activity_common.NewVoteRepo(dataData, activityRepo)
followRepo := activity_common.NewFollowRepo(dataData, uniqueIDRepo, activityRepo)
tagCommonRepo := tag_common.NewTagCommonRepo(dataData, uniqueIDRepo)
tagRelRepo := tag.NewTagRelRepo(dataData, uniqueIDRepo)
tagRepo := tag.NewTagRepo(dataData, uniqueIDRepo)
revisionRepo := revision.NewRevisionRepo(dataData, uniqueIDRepo)
revisionService := revision_common.NewRevisionService(revisionRepo, userRepo)
service := activityqueue.NewService()
tagCommonService := tag_common2.NewTagCommonService(tagCommonRepo, tagRelRepo, tagRepo, revisionService, siteInfoCommonService, service)
collectionRepo := collection.NewCollectionRepo(dataData, uniqueIDRepo)
collectionCommon := collectioncommon.NewCollectionCommon(collectionRepo)
answerCommon := answercommon.NewAnswerCommon(answerRepo)
metaRepo := meta.NewMetaRepo(dataData)
metaCommonService := metacommon.NewMetaCommonService(metaRepo)
questionCommon := questioncommon.NewQuestionCommon(questionRepo, answerRepo, voteRepo, followRepo, tagCommonService, userCommon, collectionCommon, answerCommon, metaCommonService, configService, service, revisionRepo, siteInfoCommonService, dataData)
eventqueueService := eventqueue.NewService()
fileRecordRepo := file_record.NewFileRecordRepo(dataData)
fileRecordService := file_record2.NewFileRecordService(fileRecordRepo, revisionRepo, serviceConf, siteInfoCommonService, userCommon)
userService := content.NewUserService(userRepo, userActiveActivityRepo, activityRepo, emailService, authService, siteInfoCommonService, userRoleRelService, userCommon, userExternalLoginService, userNotificationConfigRepo, userNotificationConfigService, questionCommon, eventqueueService, fileRecordService)
captchaRepo := captcha.NewCaptchaRepo(dataData)
captchaService := action.NewCaptchaService(captchaRepo)
userController := controller.NewUserController(authService, userService, captchaService, emailService, siteInfoCommonService, userNotificationConfigService)
commentRepo := comment.NewCommentRepo(dataData, uniqueIDRepo)
commentCommonRepo := comment.NewCommentCommonRepo(dataData, uniqueIDRepo)
objService := object_info.NewObjService(answerRepo, questionRepo, commentCommonRepo, tagCommonRepo, tagCommonService)
noticequeueService := noticequeue.NewService()
externalService := noticequeue.NewExternalService()
reviewRepo := review.NewReviewRepo(dataData)
reviewService := review2.NewReviewService(reviewRepo, objService, userCommon, userRepo, questionRepo, answerRepo, userRoleRelService, externalService, tagCommonService, questionCommon, noticequeueService, siteInfoCommonService, commentCommonRepo)
commentService := comment2.NewCommentService(commentRepo, commentCommonRepo, userCommon, objService, voteRepo, emailService, userRepo, noticequeueService, externalService, service, eventqueueService, reviewService)
rolePowerRelRepo := role.NewRolePowerRelRepo(dataData)
rolePowerRelService := role2.NewRolePowerRelService(rolePowerRelRepo, userRoleRelService)
rankService := rank2.NewRankService(userCommon, userRankRepo, objService, userRoleRelService, rolePowerRelService, configService)
limitRepo := limit.NewRateLimitRepo(dataData)
rateLimitMiddleware := middleware.NewRateLimitMiddleware(limitRepo)
commentController := controller.NewCommentController(commentService, rankService, captchaService, rateLimitMiddleware)
reportRepo := report.NewReportRepo(dataData, uniqueIDRepo)
tagService := tag2.NewTagService(tagRepo, tagCommonService, revisionService, followRepo, siteInfoCommonService, service)
answerActivityRepo := activity.NewAnswerActivityRepo(dataData, activityRepo, userRankRepo, noticequeueService)
answerActivityService := activity2.NewAnswerActivityService(answerActivityRepo, configService)
externalNotificationService := notification.NewExternalNotificationService(dataData, userNotificationConfigRepo, followRepo, emailService, userRepo, externalService, userExternalLoginRepo, siteInfoCommonService)
questionService := content.NewQuestionService(activityRepo, questionRepo, answerRepo, tagCommonService, tagService, questionCommon, userCommon, userRepo, userRoleRelService, revisionService, metaCommonService, collectionCommon, answerActivityService, emailService, noticequeueService, externalService, service, siteInfoCommonService, externalNotificationService, reviewService, configService, eventqueueService, reviewRepo)
answerService := content.NewAnswerService(answerRepo, questionRepo, questionCommon, userCommon, collectionCommon, userRepo, revisionService, answerActivityService, answerCommon, voteRepo, emailService, userRoleRelService, noticequeueService, externalService, service, reviewService, eventqueueService)
reportHandle := report_handle.NewReportHandle(questionService, answerService, commentService)
reportService := report2.NewReportService(reportRepo, objService, userCommon, answerRepo, questionRepo, commentCommonRepo, reportHandle, configService, eventqueueService)
reportController := controller.NewReportController(reportService, rankService, captchaService)
contentVoteRepo := activity.NewVoteRepo(dataData, activityRepo, userRankRepo, noticequeueService)
voteService := content.NewVoteService(contentVoteRepo, configService, questionRepo, answerRepo, commentCommonRepo, objService, eventqueueService)
voteController := controller.NewVoteController(voteService, rankService, captchaService)
tagController := controller.NewTagController(tagService, tagCommonService, rankService)
followFollowRepo := activity.NewFollowRepo(dataData, uniqueIDRepo, activityRepo)
followService := follow.NewFollowService(followFollowRepo, followRepo, tagCommonRepo)
followController := controller.NewFollowController(followService)
collectionGroupRepo := collection.NewCollectionGroupRepo(dataData)
collectionService := collection2.NewCollectionService(collectionRepo, collectionGroupRepo, questionCommon)
collectionController := controller.NewCollectionController(collectionService)
questionController := controller.NewQuestionController(questionService, answerService, rankService, siteInfoCommonService, captchaService, rateLimitMiddleware)
answerController := controller.NewAnswerController(answerService, rankService, captchaService, siteInfoCommonService, rateLimitMiddleware)
searchParser := search_parser.NewSearchParser(tagCommonService, userCommon)
searchRepo := search_common.NewSearchRepo(dataData, uniqueIDRepo, userCommon, tagCommonService)
searchService := content.NewSearchService(searchParser, searchRepo)
searchController := controller.NewSearchController(searchService, captchaService)
reviewActivityRepo := activity.NewReviewActivityRepo(dataData, activityRepo, userRankRepo, configService)
contentRevisionService := content.NewRevisionService(revisionRepo, userCommon, questionCommon, answerService, objService, questionRepo, answerRepo, tagRepo, tagCommonService, noticequeueService, service, reportRepo, reviewService, reviewActivityRepo)
revisionController := controller.NewRevisionController(contentRevisionService, rankService)
rankController := controller.NewRankController(rankService)
userAdminRepo := user.NewUserAdminRepo(dataData, authRepo)
notificationRepo := notification2.NewNotificationRepo(dataData)
pluginUserConfigRepo := plugin_config.NewPluginUserConfigRepo(dataData)
badgeAwardRepo := badge_award.NewBadgeAwardRepo(dataData, uniqueIDRepo)
userAdminService := user_admin.NewUserAdminService(userAdminRepo, userRoleRelService, authService, userCommon, userActiveActivityRepo, siteInfoCommonService, emailService, questionRepo, answerRepo, commentCommonRepo, userExternalLoginRepo, notificationRepo, pluginUserConfigRepo, badgeAwardRepo)
userAdminController := controller_admin.NewUserAdminController(userAdminService)
reasonRepo := reason.NewReasonRepo(configService)
reasonService := reason2.NewReasonService(reasonRepo)
reasonController := controller.NewReasonController(reasonService)
themeController := controller_admin.NewThemeController()
siteInfoService := siteinfo.NewSiteInfoService(siteInfoRepo, siteInfoCommonService, emailService, tagCommonService, configService, questionCommon, fileRecordService)
siteInfoController := controller_admin.NewSiteInfoController(siteInfoService)
controllerSiteInfoController := controller.NewSiteInfoController(siteInfoCommonService)
notificationCommon := notificationcommon.NewNotificationCommon(dataData, notificationRepo, userCommon, activityRepo, followRepo, objService, noticequeueService, userExternalLoginRepo, siteInfoCommonService)
badgeRepo := badge.NewBadgeRepo(dataData, uniqueIDRepo)
notificationService := notification.NewNotificationService(dataData, notificationRepo, notificationCommon, revisionService, userRepo, reportRepo, reviewService, badgeRepo)
notificationController := controller.NewNotificationController(notificationService, rankService)
dashboardService := dashboard.NewDashboardService(questionRepo, answerRepo, commentCommonRepo, voteRepo, userRepo, reportRepo, configService, siteInfoCommonService, serviceConf, reviewService, revisionRepo, dataData)
dashboardController := controller.NewDashboardController(dashboardService)
uploaderService := uploader.NewUploaderService(serviceConf, siteInfoCommonService, fileRecordService)
uploadController := controller.NewUploadController(uploaderService)
activityActivityRepo := activity.NewActivityRepo(dataData, configService)
activityCommon := activity_common2.NewActivityCommon(activityRepo, service)
commentCommonService := comment_common.NewCommentCommonService(commentCommonRepo)
activityService := activity2.NewActivityService(activityActivityRepo, userCommon, activityCommon, tagCommonService, objService, commentCommonService, revisionService, metaCommonService, configService)
activityController := controller.NewActivityController(activityService)
roleController := controller_admin.NewRoleController(roleService)
pluginConfigRepo := plugin_config.NewPluginConfigRepo(dataData)
importerService := importer.NewImporterService(questionService, rankService, userCommon)
pluginCommonService := plugin_common.NewPluginCommonService(pluginConfigRepo, pluginUserConfigRepo, configService, dataData, importerService)
pluginController := controller_admin.NewPluginController(pluginCommonService)
permissionController := controller.NewPermissionController(rankService)
userPluginController := controller.NewUserPluginController(pluginCommonService)
reviewController := controller.NewReviewController(reviewService, rankService, captchaService)
metaService := meta2.NewMetaService(metaCommonService, userCommon, answerRepo, questionRepo, eventqueueService)
metaController := controller.NewMetaController(metaService)
badgeGroupRepo := badge_group.NewBadgeGroupRepo(dataData, uniqueIDRepo)
eventRuleRepo := badge.NewEventRuleRepo(dataData)
badgeAwardService := badge2.NewBadgeAwardService(badgeAwardRepo, badgeRepo, userCommon, objService, noticequeueService)
badgeEventService := badge2.NewBadgeEventService(dataData, eventqueueService, badgeRepo, eventRuleRepo, badgeAwardService)
badgeService := badge2.NewBadgeService(badgeRepo, badgeGroupRepo, badgeAwardRepo, badgeEventService, siteInfoCommonService)
badgeController := controller.NewBadgeController(badgeService, badgeAwardService)
controller_adminBadgeController := controller_admin.NewBadgeController(badgeService)
apiKeyService := apikey.NewAPIKeyService(apiKeyRepo)
adminAPIKeyController := controller_admin.NewAdminAPIKeyController(apiKeyService)
featureToggleService := feature_toggle.NewFeatureToggleService(siteInfoRepo)
mcpController := controller.NewMCPController(searchService, siteInfoCommonService, tagCommonService, questionCommon, commentRepo, userCommon, answerRepo, featureToggleService)
aiConversationRepo := ai_conversation.NewAIConversationRepo(dataData)
aiConversationService := ai_conversation2.NewAIConversationService(aiConversationRepo, userCommon)
aiController := controller.NewAIController(searchService, siteInfoCommonService, tagCommonService, questionCommon, commentRepo, userCommon, answerRepo, mcpController, aiConversationService, featureToggleService)
aiConversationController := controller.NewAIConversationController(aiConversationService, featureToggleService)
aiConversationAdminController := controller_admin.NewAIConversationAdminController(aiConversationService, featureToggleService)
answerAPIRouter := router.NewAnswerAPIRouter(langController, userController, commentController, reportController, voteController, tagController, followController, collectionController, questionController, answerController, searchController, revisionController, rankController, userAdminController, reasonController, themeController, siteInfoController, controllerSiteInfoController, notificationController, dashboardController, uploadController, activityController, roleController, pluginController, permissionController, userPluginController, reviewController, metaController, badgeController, controller_adminBadgeController, adminAPIKeyController, aiController, aiConversationController, aiConversationAdminController, mcpController)
swaggerRouter := router.NewSwaggerRouter(swaggerConf)
uiRouter := router.NewUIRouter(controllerSiteInfoController, siteInfoCommonService)
authUserMiddleware := middleware.NewAuthUserMiddleware(authService, siteInfoCommonService)
avatarMiddleware := middleware.NewAvatarMiddleware(serviceConf, uploaderService)
shortIDMiddleware := middleware.NewShortIDMiddleware(siteInfoCommonService)
templateRenderController := templaterender.NewTemplateRenderController(questionService, userService, tagService, answerService, commentService, siteInfoCommonService, questionRepo)
templateController := controller.NewTemplateController(templateRenderController, siteInfoCommonService, eventqueueService, userService, questionService)
templateRouter := router.NewTemplateRouter(templateController, templateRenderController, siteInfoController, authUserMiddleware)
connectorController := controller.NewConnectorController(siteInfoCommonService, emailService, userExternalLoginService)
userCenterLoginService := user_external_login2.NewUserCenterLoginService(userRepo, userCommon, userExternalLoginRepo, userActiveActivityRepo, siteInfoCommonService)
userCenterController := controller.NewUserCenterController(userCenterLoginService, siteInfoCommonService)
captchaController := controller.NewCaptchaController()
embedController := controller.NewEmbedController()
renderController := controller.NewRenderController()
sidebarController := controller.NewSidebarController()
pluginAPIRouter := router.NewPluginAPIRouter(connectorController, userCenterController, captchaController, embedController, renderController, sidebarController)
ginEngine := server.NewHTTPServer(debug, staticRouter, answerAPIRouter, swaggerRouter, uiRouter, authUserMiddleware, avatarMiddleware, shortIDMiddleware, templateRouter, pluginAPIRouter, uiConf)
scheduledTaskManager := cron.NewScheduledTaskManager(siteInfoCommonService, questionService, fileRecordService, userAdminService, serviceConf)
application := newApplication(serverConf, ginEngine, scheduledTaskManager)
return application, func() {
cleanup2()
cleanup()
}, nil
}
================================================
FILE: configs/config.go
================================================
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package configs
import _ "embed"
//go:embed config.yaml
var Config []byte
//go:embed path_ignore.yaml
var PathIgnore []byte
//go:embed reserved-usernames.json
var ReservedUsernames []byte
================================================
FILE: configs/config.yaml
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
server:
http:
addr: 0.0.0.0:80
data:
database:
driver: "sqlite3"
connection: "/data/sqlite3/answer.db"
cache:
file_path: "/data/cache/cache.db"
i18n:
bundle_dir: "/data/i18n"
swaggerui:
show: true
protocol: http
host: 127.0.0.1
address: ':80'
service_config:
upload_path: "/data/uploads"
clean_up_uploads: true
clean_orphan_uploads_period_hours: 48
purge_deleted_files_period_days: 30
ui:
public_url: '/'
api_url: '/'
base_url: ''
api_base_url: ''
================================================
FILE: configs/path_ignore.yaml
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# url path reserves the keywords list
questions:
- ask
tags:
- create
users:
- unsubscribe
- settings
- login
- register
- account-recovery
- change-email
- password-reset
- account-activation
- confirm-new-email
- account-suspended
- confirm-email
- auth-landing
================================================
FILE: configs/reserved-usernames.json
================================================
["0","100","101","102","1xx","200","201","202","203","204","205","206","207","226","2xx","300","301","302","303","304","305","307","308","3xx","400","401","402","403","404","405","406","407","408","409","410","411","412","413","414","415","416","417","418","422","423","424","426","428","429","431","451","4xx","500","501","502","503","504","505","506","507","511","5xx","7xx","about","abuse","access","account","account-activation","account-recovery","account-suspended","accounts","activate","activities","activity","ad","add","address","adm","admin","administration","administrator","ads","adult","advertising","affiliate","affiliates","ajax","all","alpha","analysis","analytics","android","anon","anonymous","api","app","apps","archive","archives","article","asct","asset","atom","auth","auth-landing","authentication","autoconfig","avatar","backup","balancer-manager","bank","banner","banners","beta","billing","bin","blog","blogs","board","book","bookmark","bot","bots","broadcasthost","bug","bugs","business","cache","cadastro","calendar","call","campaign","cancel","captcha","career","careers","cart","categories","category","cgi","cgi-bin","changelog","change-email","chat","check","checking","checkout","client","cliente","clients","code","codereview","comercial","comment","comments","communities","community","company","compare","compras","config","configuration","confirm-new-email","confirm-email","connect","contact","contact-us","contact_us","contactus","contest","contribute","corp","create","crypt","css","dashboard","data","db","default","delete","demo","design","designer","destroy","dev","devel","developer","developers","diagram","diary","dict","dictionary","die","dir","direct_messages","directory","dist","dns","doc","docker","docs","documentation","domain","download","downloads","ecommerce","edit","editor","edu","education","email","employment","empty","end","enterprise","entries","entry","error","errors","eval","event","everyone","exit","explore","export","facebook","faq","favorite","favorites","fbi","feature","features","feed","feedback","feeds","file","files","firewall","first","flash","fleet","fleets","flog","follow","followers","following","forgot","forgot-password","forgot_password","forgotpassword","form","forum","forums","founder","free","friend","friends","ftp","gadget","gadgets","game","games","get","ghost","gift","gifts","gist","git","github","graph","group","groups","guest","guests","help","home","homepage","hooks","host","hosting","hostmaster","hostname","howto","hpg","html","http","httpd","https","i","iamges","icon","icons","id","idea","ideas","image","images","imap","img","index","indice","info","information","inquiry","instagram","intranet","invitations","invite","ip","ipad","iphone","irc","is","isatap","issue","issues","it","item","items","java","javascript","job","jobs","join","js","json","jump","keys","keyserver","knowledgebase","language","languages","last","ldap-status","legal","license","link","links","linux","list","lists","local","localdomain","localhost","log","log-in","log-out","log_in","log_out","login","logout","logs","m","mac","mail","mail1","mail2","mail3","mail4","mail5","mailer","mailer-daemon","mailing","maintenance","manager","manual","map","maps","marketing","master","me","media","member","members","message","messages","messenger","microblog","microblogs","mine","mis","mob","mobile","movie","movies","mp3","msg","msn","music","musicas","mx","my","mysql","name","named","names","namespace","namespaces","nan","navi","navigation","net","network","new","news","newsletter","nick","nickname","no-reply","nobody","noc","noreply","notes","noticias","notification","notifications","notify","ns","ns1","ns10","ns2","ns3","ns4","ns5","ns6","ns7","ns8","ns9","null","oauth","oauth_clients","offer","offers","official","old","online","openid","operator","ops","order","orders","organization","organizations","orgs","overview","owner","owners","package","page","pager","pages","panel","passwd","password","password-reset","patch","payment","perl","phone","photo","photoalbum","photos","php","phpmyadmin","phppgadmin","phpredisadmin","pic","pics","ping","plan","plans","plugin","plugins","policy","pop","pop3","popular","portal","post","postfix","postmaster","posts","pr","premium","press","price","pricing","privacy","privacy-policy","privacy_policy","privacypolicy","private","product","products","profile","project","projects","promo","pub","public","purpose","put","pw","python","query","random","ranking","read","readme","recent","recruit","recruitment","register","registration","release","releases","remote","remove","replies","reply","report","reports","repositories","repository","req","request","requests","res","reset","reset-password","reset_password","resetpassword","resource","resources","roc","root","rss","ruby","rule","rules","sag","sale","sales","sample","samples","save","school","script","scripts","search","secure","security","self","send","server","server-info","server-status","service","services","session","sessions","setting","settings","setup","share","shop","show","sign-in","sign-up","sign_in","sign_up","signin","signout","signup","site","sitemap","sites","smartphone","smtp","soporte","source","spec","special","sql","src","ssh","ssl","ssladmin","ssladministrator","sslwebmaster","staff","stage","staging","start","stat","state","static","stats","status","store","stores","stories","style","styleguide","styles","stylesheet","stylesheets","subdomain","subscribe","subscriptions","suporte","support","svn","swf","sys","sysadmin","sysadministrator","system","tablet","tablets","tag","tags","talk","task","tasks","team","teams","tech","telnet","term","terms","terms-of-service","terms_of_service","termsofservice","test","test1","test2","test3","teste","testing","tests","theme","themes","thread","threads","tls","tmp","todo","token","tokenserver","tool","tools","top","topic","topics","tos","tour","translations","trends","tutorial","tux","tv","twitter","undef","unfollow","unsubscribe","update","upload","uploads","uptime","url","usage","usenet","user","username","users","usr","usuario","util","uucp","vendas","ver","version","video","videos","visitor","vpn","watch","weather","web","webhook","webhooks","webmail","webmaster","website","websites","welcome","widget","widgets","wiki","win","windows","word","work","works","workshop","wpad","ww","wws","www","www1","www2","www3","www4","www5","www6","www7","wwws","wwww","xfn","xml","xmpp","xpg","xxx","yaml","year","yml","you","yourdomain","yourname","yoursite","yourusername"]
================================================
FILE: crowdin.yml
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
files:
- source: /i18n/en_US.yaml
translation: /i18n/%locale_with_underscore%.yaml
================================================
FILE: docker-compose.yaml
================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
version: "3"
services:
answer:
image: apache/answer
ports:
- '9080:80'
restart: on-failure
volumes:
- answer-data:/data
volumes:
answer-data:
================================================
FILE: docs/docs.go
================================================
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
// Package docs Code generated by swaggo/swag. DO NOT EDIT
package docs
import "github.com/swaggo/swag"
const docTemplate = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
"description": "{{escape .Description}}",
"title": "{{.Title}}",
"contact": {},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/": {
"get": {
"description": "if config file not exist try to redirect to install page",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"installation"
],
"summary": "if config file not exist try to redirect to install page",
"responses": {}
}
},
"/answer/admin/api/ai-config": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get AI configuration",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "get AI configuration",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.SiteAIResp"
}
}
}
]
}
}
}
},
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "update AI configuration",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "update AI configuration",
"parameters": [
{
"description": "AI config",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.SiteAIReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/ai-models": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get AI models",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "get AI models",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/schema.GetAIModelResp"
}
}
}
}
]
}
}
}
}
},
"/answer/admin/api/ai-provider": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get AI provider configuration",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "get AI provider configuration",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/schema.GetAIProviderResp"
}
}
}
}
]
}
}
}
}
},
"/answer/admin/api/ai/conversation": {
"get": {
"description": "get conversation detail for admin",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ai-conversation-admin"
],
"summary": "get conversation detail for admin",
"parameters": [
{
"type": "string",
"description": "conversation id",
"name": "conversation_id",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.AIConversationAdminDetailResp"
}
}
}
]
}
}
}
},
"delete": {
"description": "delete conversation and its related records for admin",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ai-conversation-admin"
],
"summary": "delete conversation for admin",
"parameters": [
{
"description": "apikey",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.AIConversationAdminDeleteReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/ai/conversation/page": {
"get": {
"description": "get conversation list for admin",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ai-conversation-admin"
],
"summary": "get conversation list for admin",
"parameters": [
{
"type": "integer",
"description": "page",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "page size",
"name": "page_size",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"allOf": [
{
"$ref": "#/definitions/pager.PageModel"
},
{
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/schema.AIConversationAdminListItem"
}
}
}
}
]
}
}
}
]
}
}
}
}
},
"/answer/admin/api/answer/page": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Status:[available,deleted,pending]",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "AdminAnswerPage admin answer page",
"parameters": [
{
"type": "integer",
"description": "page size",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "page size",
"name": "page_size",
"in": "query"
},
{
"enum": [
"available",
"deleted",
"pending"
],
"type": "string",
"description": "user status",
"name": "status",
"in": "query"
},
{
"type": "string",
"description": "answer id or question title",
"name": "query",
"in": "query"
},
{
"type": "string",
"description": "question id",
"name": "question_id",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/answer/status": {
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "update answer status",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "update answer status",
"parameters": [
{
"description": "AdminUpdateAnswerStatusReq",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.AdminUpdateAnswerStatusReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/api-key": {
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "update apikey",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "update apikey",
"parameters": [
{
"description": "apikey",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.UpdateAPIKeyReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
},
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "add apikey",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "add apikey",
"parameters": [
{
"description": "apikey",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.AddAPIKeyReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.AddAPIKeyResp"
}
}
}
]
}
}
}
},
"delete": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "delete apikey",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "delete apikey",
"parameters": [
{
"description": "apikey",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.DeleteAPIKeyReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/api-key/all": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get all api keys",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "get all api keys",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/schema.GetAPIKeyResp"
}
}
}
}
]
}
}
}
}
},
"/answer/admin/api/badge/status": {
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "update badge status",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"AdminBadge"
],
"summary": "update badge status",
"parameters": [
{
"description": "UpdateBadgeStatusReq",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.UpdateBadgeStatusReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/badges": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "list all badges by page",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"AdminBadge"
],
"summary": "list all badges by page",
"parameters": [
{
"type": "integer",
"description": "page",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "page size",
"name": "page_size",
"in": "query"
},
{
"enum": [
"",
"active",
"inactive"
],
"type": "string",
"description": "badge status",
"name": "status",
"in": "query"
},
{
"type": "string",
"description": "search param",
"name": "q",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/schema.GetBadgeListPagedResp"
}
}
}
}
]
}
}
}
}
},
"/answer/admin/api/dashboard": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "DashboardInfo",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "DashboardInfo",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/delete/permanently": {
"delete": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "delete permanently",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "delete permanently",
"parameters": [
{
"description": "DeletePermanentlyReq",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.DeletePermanentlyReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/language/options": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Get language options",
"produces": [
"application/json"
],
"tags": [
"Lang"
],
"summary": "Get language options",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/mcp-config": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get MCP configuration",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "get MCP configuration",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.SiteMCPResp"
}
}
}
]
}
}
}
},
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "update MCP configuration",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "update MCP configuration",
"parameters": [
{
"description": "MCP config",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.SiteMCPReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/plugin/config": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get plugin config",
"produces": [
"application/json"
],
"tags": [
"AdminPlugin"
],
"summary": "get plugin config",
"parameters": [
{
"type": "string",
"description": "plugin_slug_name",
"name": "plugin_slug_name",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.GetPluginConfigResp"
}
}
}
]
}
}
}
},
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "update plugin config",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"AdminPlugin"
],
"summary": "update plugin config",
"parameters": [
{
"description": "UpdatePluginConfigReq",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.UpdatePluginConfigReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/plugin/status": {
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "update plugin status",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"AdminPlugin"
],
"summary": "update plugin status",
"parameters": [
{
"description": "UpdatePluginStatusReq",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.UpdatePluginStatusReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/plugins": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get plugin list",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"AdminPlugin"
],
"summary": "get plugin list",
"parameters": [
{
"type": "string",
"description": "status: active/inactive",
"name": "status",
"in": "query"
},
{
"type": "boolean",
"description": "have config",
"name": "have_config",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/schema.GetPluginListResp"
}
}
}
}
]
}
}
}
}
},
"/answer/admin/api/question/page": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Status:[available,closed,deleted,pending]",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "AdminQuestionPage admin question page",
"parameters": [
{
"type": "integer",
"description": "page size",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "page size",
"name": "page_size",
"in": "query"
},
{
"enum": [
"available",
"closed",
"deleted",
"pending"
],
"type": "string",
"description": "user status",
"name": "status",
"in": "query"
},
{
"type": "string",
"description": "question id or title",
"name": "query",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/question/status": {
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "update question status",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "update question status",
"parameters": [
{
"description": "AdminUpdateQuestionStatusReq",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.AdminUpdateQuestionStatusReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/reasons": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get reasons by object type and action",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"reason"
],
"summary": "get reasons by object type and action",
"parameters": [
{
"enum": [
"question",
"answer",
"comment",
"user"
],
"type": "string",
"description": "object_type",
"name": "object_type",
"in": "query",
"required": true
},
{
"enum": [
"status",
"close",
"flag",
"review"
],
"type": "string",
"description": "action",
"name": "action",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/roles": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get role list",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "get role list",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/schema.GetRoleResp"
}
}
}
}
]
}
}
}
}
},
"/answer/admin/api/setting/privileges": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "GetPrivilegesConfig get privileges config",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "GetPrivilegesConfig get privileges config",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.GetPrivilegesConfigResp"
}
}
}
]
}
}
}
},
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "update privileges config",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "update privileges config",
"parameters": [
{
"description": "config",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.UpdatePrivilegesConfigReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/setting/smtp": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "GetSMTPConfig get smtp config",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "GetSMTPConfig get smtp config",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.GetSMTPConfigResp"
}
}
}
]
}
}
}
},
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "update smtp config",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "update smtp config",
"parameters": [
{
"description": "smtp config",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.UpdateSMTPConfigReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/siteinfo/advanced": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get site advanced setting",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "get site advanced setting",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.SiteAdvancedResp"
}
}
}
]
}
}
}
},
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "update site advanced info",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "update site advanced info",
"parameters": [
{
"description": "advanced settings",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.SiteAdvancedReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/siteinfo/branding": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get site interface",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "get site interface",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.SiteBrandingResp"
}
}
}
]
}
}
}
},
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "update site info branding",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "update site info branding",
"parameters": [
{
"description": "branding info",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.SiteBrandingReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/siteinfo/custom-css-html": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get site info custom html css config",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "get site info custom html css config",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.SiteCustomCssHTMLResp"
}
}
}
]
}
}
}
},
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "update site custom css html config",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "update site custom css html config",
"parameters": [
{
"description": "login info",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.SiteCustomCssHTMLReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/siteinfo/general": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get site general information",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "get site general information",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.SiteGeneralResp"
}
}
}
]
}
}
}
},
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "update site general information",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "update site general information",
"parameters": [
{
"description": "general",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.SiteGeneralReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/siteinfo/interface": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get site interface",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "get site interface",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.SiteInterfaceSettingsResp"
}
}
}
]
}
}
}
},
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "update site info interface",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "update site info interface",
"parameters": [
{
"description": "general",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.SiteInterfaceReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/siteinfo/login": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get site info login config",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "get site info login config",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.SiteLoginResp"
}
}
}
]
}
}
}
},
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "update site login",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "update site login",
"parameters": [
{
"description": "login info",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.SiteLoginReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/siteinfo/polices": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Get the policies information for the site",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Get the policies information for the site",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.SitePoliciesResp"
}
}
}
]
}
}
}
},
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "update site policies configuration",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "update site policies configuration",
"parameters": [
{
"description": "write info",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.SitePoliciesReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/siteinfo/question": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get site questions setting",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "get site questions setting",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.SiteQuestionsResp"
}
}
}
]
}
}
}
},
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "update site question settings",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "update site question settings",
"parameters": [
{
"description": "questions settings",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.SiteQuestionsReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/siteinfo/security": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Get the security information for the site",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Get the security information for the site",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/handler.RespBody"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.SiteSecurityResp"
}
}
}
]
}
}
}
},
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "update site security configuration",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "update site security configuration",
"parameters": [
{
"description": "write info",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.SiteSecurityReq"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handler.RespBody"
}
}
}
}
},
"/answer/admin/api/siteinfo/seo": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
gitextract_8j8m3hg4/
├── .asf.yaml
├── .editorconfig
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ ├── config.yml
│ │ ├── enhancement_request.md
│ │ └── feature_request.md
│ ├── PULL_REQUEST_TEMPLATE/
│ │ └── pull_request_template.md
│ └── workflows/
│ ├── build-binary-for-release.yml
│ ├── build-image-for-latest-release.yml
│ ├── build-image-for-manual.yml
│ ├── build-image-for-release.yml
│ ├── build-image-for-test.yml
│ ├── check-asf-header.yml
│ └── lint.yml
├── .gitignore
├── .gitlab-ci.yml
├── .golangci.yaml
├── .goreleaser.yaml
├── .vaunt/
│ └── config.yaml
├── .vscode/
│ └── settings.json
├── Dockerfile
├── LICENSE
├── Makefile
├── NOTICE
├── README.md
├── build/
│ └── README.md
├── charts/
│ ├── .helmignore
│ ├── Chart.yaml
│ ├── README.md
│ ├── templates/
│ │ ├── _helpers.tpl
│ │ ├── deployment.yaml
│ │ ├── hpa.yaml
│ │ ├── ingress.yaml
│ │ ├── pvc.yaml
│ │ ├── service.yaml
│ │ └── serviceaccount.yaml
│ └── values.yaml
├── cmd/
│ ├── answer/
│ │ └── main.go
│ ├── command.go
│ ├── main.go
│ ├── wire.go
│ └── wire_gen.go
├── configs/
│ ├── config.go
│ ├── config.yaml
│ ├── path_ignore.yaml
│ └── reserved-usernames.json
├── crowdin.yml
├── docker-compose.yaml
├── docs/
│ ├── docs.go
│ ├── release/
│ │ ├── LICENSE
│ │ ├── NOTICE
│ │ └── licenses/
│ │ ├── LICENSE-JedWatson-classnames.txt
│ │ ├── LICENSE-Machiel-slugify.txt
│ │ ├── LICENSE-Masterminds-semver.txt
│ │ ├── LICENSE-Qix--color.txt
│ │ ├── LICENSE-anargu-gin-brotli.txt
│ │ ├── LICENSE-asaskevich-govalidator.txt
│ │ ├── LICENSE-axios-axios.txt
│ │ ├── LICENSE-bwmarrin-snowflake.txt
│ │ ├── LICENSE-codemirror-basic-setup.txt
│ │ ├── LICENSE-codemirror-lang-markdown.txt
│ │ ├── LICENSE-codemirror-language-data.txt
│ │ ├── LICENSE-codemirror-state.txt
│ │ ├── LICENSE-codemirror-view.txt
│ │ ├── LICENSE-cznic-sqlite.txt
│ │ ├── LICENSE-disintegration-imaging.txt
│ │ ├── LICENSE-emn178-js-sha256.txt
│ │ ├── LICENSE-facebook-react.txt
│ │ ├── LICENSE-gin-gonic-gin.txt
│ │ ├── LICENSE-go-gomail-gomail.txt
│ │ ├── LICENSE-go-playground-locales.txt
│ │ ├── LICENSE-go-playground-universal-translator.txt
│ │ ├── LICENSE-go-playground-validator.txt
│ │ ├── LICENSE-go-resty-resty.txt
│ │ ├── LICENSE-go-sql-driver-mysql.txt
│ │ ├── LICENSE-go-yaml-yaml.txt
│ │ ├── LICENSE-goccy-go-json.txt
│ │ ├── LICENSE-golang-org-x.txt
│ │ ├── LICENSE-google-uuid.txt
│ │ ├── LICENSE-google-wire.txt
│ │ ├── LICENSE-grokify-html-strip-tags-go.txt
│ │ ├── LICENSE-i18next-i18next.txt
│ │ ├── LICENSE-i18next-react-i18next.txt
│ │ ├── LICENSE-iamkun-dayjs.txt
│ │ ├── LICENSE-jinzhu-copier.txt
│ │ ├── LICENSE-jinzhu-now.txt
│ │ ├── LICENSE-joho-godotenv.txt
│ │ ├── LICENSE-jordan-wright-email.txt
│ │ ├── LICENSE-jxson-front-matter.txt
│ │ ├── LICENSE-kpdecker-jsdiff.txt
│ │ ├── LICENSE-lib-pq.txt
│ │ ├── LICENSE-ljharb-qs.txt
│ │ ├── LICENSE-lodash-lodash.txt
│ │ ├── LICENSE-mark3labs-mcp-go.txt
│ │ ├── LICENSE-markedjs-marked.txt
│ │ ├── LICENSE-mattn-go-sqlite3.txt
│ │ ├── LICENSE-microcosm-cc-bluemonday.txt
│ │ ├── LICENSE-mojocn-base64Captcha.txt
│ │ ├── LICENSE-mozillazg-go-pinyin.txt
│ │ ├── LICENSE-npm-node-semver.txt
│ │ ├── LICENSE-ory-dockertest.txt
│ │ ├── LICENSE-pmndrs-zustand.txt
│ │ ├── LICENSE-react-bootstrap-react-bootstrap.txt
│ │ ├── LICENSE-remix-run-react-router.txt
│ │ ├── LICENSE-robfig-cron.txt
│ │ ├── LICENSE-sashabaranov-go-openai.txt
│ │ ├── LICENSE-scottleedavis-go-exif-remove.txt
│ │ ├── LICENSE-segmentfault-pacman.txt
│ │ ├── LICENSE-soldair-qrcode.txt
│ │ ├── LICENSE-spf13-cobra.txt
│ │ ├── LICENSE-staylor-react-helmet-async.txt
│ │ ├── LICENSE-stretchr-testify.txt
│ │ ├── LICENSE-sudodoki-copy-to-clipboard.txt
│ │ ├── LICENSE-swaggo-files.txt
│ │ ├── LICENSE-swaggo-gin-swagger.txt
│ │ ├── LICENSE-swaggo-swag.txt
│ │ ├── LICENSE-tidwall-gjson.txt
│ │ ├── LICENSE-twbs-bootstrap.txt
│ │ ├── LICENSE-twbs-icons.txt
│ │ ├── LICENSE-uber-go-mock.txt
│ │ ├── LICENSE-vercel-swr.txt
│ │ ├── LICENSE-xorm.txt
│ │ ├── LICENSE-yuin-goldmark.txt
│ │ └── LIcENSE-Bunlong-next-share.txt
│ ├── swagger.json
│ └── swagger.yaml
├── go.mod
├── go.sum
├── i18n/
│ ├── af_ZA.yaml
│ ├── ar_SA.yaml
│ ├── az_AZ.yaml
│ ├── bal_BA.yaml
│ ├── ban_ID.yaml
│ ├── bn_BD.yaml
│ ├── bs_BA.yaml
│ ├── ca_ES.yaml
│ ├── cs_CZ.yaml
│ ├── cy_GB.yaml
│ ├── da_DK.yaml
│ ├── de_DE.yaml
│ ├── el_GR.yaml
│ ├── en_US.yaml
│ ├── es_ES.yaml
│ ├── fa_IR.yaml
│ ├── fi_FI.yaml
│ ├── fr_FR.yaml
│ ├── he_IL.yaml
│ ├── hi_IN.yaml
│ ├── hu_HU.yaml
│ ├── hy_AM.yaml
│ ├── i18n.go
│ ├── i18n.yaml
│ ├── id_ID.yaml
│ ├── it_IT.yaml
│ ├── ja_JP.yaml
│ ├── ko_KR.yaml
│ ├── ml_IN.yaml
│ ├── nl_NL.yaml
│ ├── no_NO.yaml
│ ├── pl_PL.yaml
│ ├── pt_BR.yaml
│ ├── pt_PT.yaml
│ ├── ro_RO.yaml
│ ├── ru_RU.yaml
│ ├── sk_SK.yaml
│ ├── sq_AL.yaml
│ ├── sr_SP.yaml
│ ├── sv_SE.yaml
│ ├── te_IN.yaml
│ ├── tr_TR.yaml
│ ├── uk_UA.yaml
│ ├── vi_VN.yaml
│ ├── zh_CN.yaml
│ └── zh_TW.yaml
├── internal/
│ ├── base/
│ │ ├── conf/
│ │ │ └── conf.go
│ │ ├── constant/
│ │ │ ├── acticity.go
│ │ │ ├── ai_config.go
│ │ │ ├── cache_key.go
│ │ │ ├── comment.go
│ │ │ ├── constant.go
│ │ │ ├── ctx_flag.go
│ │ │ ├── email_tpl_key.go
│ │ │ ├── event.go
│ │ │ ├── meta.go
│ │ │ ├── notification.go
│ │ │ ├── object_type.go
│ │ │ ├── plugin_config_key.go
│ │ │ ├── privilege.go
│ │ │ ├── question.go
│ │ │ ├── reason.go
│ │ │ ├── revision.go
│ │ │ ├── site_info.go
│ │ │ ├── site_type.go
│ │ │ ├── upload.go
│ │ │ └── user.go
│ │ ├── cron/
│ │ │ ├── cron.go
│ │ │ └── provider.go
│ │ ├── data/
│ │ │ ├── config.go
│ │ │ └── data.go
│ │ ├── handler/
│ │ │ ├── handler.go
│ │ │ ├── lang.go
│ │ │ ├── response.go
│ │ │ └── short_id.go
│ │ ├── middleware/
│ │ │ ├── accept_language.go
│ │ │ ├── api_key_auth.go
│ │ │ ├── auth.go
│ │ │ ├── avatar.go
│ │ │ ├── header.go
│ │ │ ├── mcp_auth.go
│ │ │ ├── provider.go
│ │ │ ├── rate_limit.go
│ │ │ ├── short_id.go
│ │ │ ├── user_center_plugin_auth.go
│ │ │ └── visit_img_auth.go
│ │ ├── pager/
│ │ │ ├── pager.go
│ │ │ └── pagination.go
│ │ ├── path/
│ │ │ └── path.go
│ │ ├── queue/
│ │ │ ├── queue.go
│ │ │ └── queue_test.go
│ │ ├── reason/
│ │ │ ├── privilege.go
│ │ │ └── reason.go
│ │ ├── server/
│ │ │ ├── config.go
│ │ │ ├── http.go
│ │ │ ├── http_funcmap.go
│ │ │ └── provider.go
│ │ ├── translator/
│ │ │ ├── config.go
│ │ │ └── provider.go
│ │ └── validator/
│ │ └── validator.go
│ ├── cli/
│ │ ├── build.go
│ │ ├── config.go
│ │ ├── dump.go
│ │ ├── i18n.go
│ │ ├── install.go
│ │ ├── install_check.go
│ │ └── reset_password.go
│ ├── controller/
│ │ ├── activity_controller.go
│ │ ├── ai_controller.go
│ │ ├── ai_conversation_controller.go
│ │ ├── answer_controller.go
│ │ ├── badge_controller.go
│ │ ├── collection_controller.go
│ │ ├── comment_controller.go
│ │ ├── connector_controller.go
│ │ ├── controller.go
│ │ ├── dashboard_controller.go
│ │ ├── embed_controller.go
│ │ ├── follow_controller.go
│ │ ├── lang_controller.go
│ │ ├── mcp_controller.go
│ │ ├── meta_controller.go
│ │ ├── notification_controller.go
│ │ ├── permission_controller.go
│ │ ├── plugin_captcha_controller.go
│ │ ├── plugin_sidebar_controller.go
│ │ ├── plugin_user_center_controller.go
│ │ ├── question_controller.go
│ │ ├── rank_controller.go
│ │ ├── reason_controller.go
│ │ ├── render_controller.go
│ │ ├── report_controller.go
│ │ ├── review_controller.go
│ │ ├── revision_controller.go
│ │ ├── search_controller.go
│ │ ├── siteinfo_controller.go
│ │ ├── tag_controller.go
│ │ ├── template_controller.go
│ │ ├── template_render/
│ │ │ ├── answer.go
│ │ │ ├── comment.go
│ │ │ ├── controller.go
│ │ │ ├── question.go
│ │ │ ├── tags.go
│ │ │ └── userinfo.go
│ │ ├── upload_controller.go
│ │ ├── user_controller.go
│ │ ├── user_plugin_controller.go
│ │ └── vote_controller.go
│ ├── controller_admin/
│ │ ├── ai_conversation_admin_controller.go
│ │ ├── badge_controller.go
│ │ ├── controller.go
│ │ ├── e_api_key_controller.go
│ │ ├── plugin_controller.go
│ │ ├── role_controller.go
│ │ ├── siteinfo_controller.go
│ │ ├── theme_controller.go
│ │ └── user_backyard_controller.go
│ ├── entity/
│ │ ├── activity_entity.go
│ │ ├── ai_conversation.go
│ │ ├── ai_conversation_record.go
│ │ ├── answer_entity.go
│ │ ├── api_key_entity.go
│ │ ├── auth_user_entity.go
│ │ ├── badge_award_entity.go
│ │ ├── badge_entity.go
│ │ ├── badge_group_entity.go
│ │ ├── captcha_entity.go
│ │ ├── collection_entity.go
│ │ ├── collection_group_entity.go
│ │ ├── comment_entity.go
│ │ ├── config_entity.go
│ │ ├── file_record_entity.go
│ │ ├── meta_entity.go
│ │ ├── notification_entity.go
│ │ ├── plugin_config_entity.go
│ │ ├── plugin_kv_storage_entity.go
│ │ ├── plugin_user_config_entity.go
│ │ ├── power_entity.go
│ │ ├── question_entity.go
│ │ ├── question_link_entity.go
│ │ ├── report_entity.go
│ │ ├── review_entity.go
│ │ ├── revision_entity.go
│ │ ├── role_entity.go
│ │ ├── role_power_rel_entity.go
│ │ ├── site_info.go
│ │ ├── tag_entity.go
│ │ ├── tag_rel_entity.go
│ │ ├── uniqid_entity.go
│ │ ├── user_entity.go
│ │ ├── user_external_login_entity.go
│ │ ├── user_notification_config_entity.go
│ │ ├── user_role_rel_entity.go
│ │ └── version_entity.go
│ ├── install/
│ │ ├── install_controller.go
│ │ ├── install_from_env.go
│ │ ├── install_main.go
│ │ ├── install_req.go
│ │ └── install_server.go
│ ├── migrations/
│ │ ├── init.go
│ │ ├── init_data.go
│ │ ├── migrations.go
│ │ ├── v1.go
│ │ ├── v10.go
│ │ ├── v11.go
│ │ ├── v12.go
│ │ ├── v13.go
│ │ ├── v14.go
│ │ ├── v15.go
│ │ ├── v16.go
│ │ ├── v17.go
│ │ ├── v18.go
│ │ ├── v19.go
│ │ ├── v2.go
│ │ ├── v20.go
│ │ ├── v21.go
│ │ ├── v22.go
│ │ ├── v23.go
│ │ ├── v24.go
│ │ ├── v25.go
│ │ ├── v26.go
│ │ ├── v27.go
│ │ ├── v28.go
│ │ ├── v29.go
│ │ ├── v3.go
│ │ ├── v30.go
│ │ ├── v31.go
│ │ ├── v4.go
│ │ ├── v5.go
│ │ ├── v6.go
│ │ ├── v7.go
│ │ ├── v8.go
│ │ └── v9.go
│ ├── repo/
│ │ ├── activity/
│ │ │ ├── activity_repo.go
│ │ │ ├── answer_repo.go
│ │ │ ├── follow_repo.go
│ │ │ ├── review_repo.go
│ │ │ ├── user_active_repo.go
│ │ │ └── vote_repo.go
│ │ ├── activity_common/
│ │ │ ├── activity_repo.go
│ │ │ ├── follow.go
│ │ │ └── vote.go
│ │ ├── ai_conversation/
│ │ │ └── ai_conversation_repo.go
│ │ ├── answer/
│ │ │ └── answer_repo.go
│ │ ├── api_key/
│ │ │ └── api_key_repo.go
│ │ ├── auth/
│ │ │ └── auth.go
│ │ ├── badge/
│ │ │ ├── badge_event_rule.go
│ │ │ └── badge_repo.go
│ │ ├── badge_award/
│ │ │ └── badge_award_repo.go
│ │ ├── badge_group/
│ │ │ └── badge_group_repo.go
│ │ ├── captcha/
│ │ │ └── captcha.go
│ │ ├── collection/
│ │ │ ├── collection_group_repo.go
│ │ │ └── collection_repo.go
│ │ ├── comment/
│ │ │ └── comment_repo.go
│ │ ├── config/
│ │ │ └── config_repo.go
│ │ ├── export/
│ │ │ └── email_repo.go
│ │ ├── file_record/
│ │ │ └── file_record_repo.go
│ │ ├── limit/
│ │ │ └── limit.go
│ │ ├── meta/
│ │ │ └── meta_repo.go
│ │ ├── notification/
│ │ │ └── notification_repo.go
│ │ ├── plugin_config/
│ │ │ ├── plugin_config_repo.go
│ │ │ └── plugin_user_config_repo.go
│ │ ├── provider.go
│ │ ├── question/
│ │ │ └── question_repo.go
│ │ ├── rank/
│ │ │ └── user_rank_repo.go
│ │ ├── reason/
│ │ │ └── reason_repo.go
│ │ ├── repo_test/
│ │ │ ├── auth_test.go
│ │ │ ├── captcha_test.go
│ │ │ ├── comment_repo_test.go
│ │ │ ├── email_repo_test.go
│ │ │ ├── meta_repo_test.go
│ │ │ ├── notification_repo_test.go
│ │ │ ├── reason_repo_test.go
│ │ │ ├── recommend_test.go
│ │ │ ├── repo_main_test.go
│ │ │ ├── revision_repo_test.go
│ │ │ ├── siteinfo_repo_test.go
│ │ │ ├── tag_rel_repo_test.go
│ │ │ ├── tag_repo_test.go
│ │ │ ├── user_backyard_repo_test.go
│ │ │ └── user_repo_test.go
│ │ ├── report/
│ │ │ └── report_repo.go
│ │ ├── review/
│ │ │ └── review_repo.go
│ │ ├── revision/
│ │ │ └── revision_repo.go
│ │ ├── role/
│ │ │ ├── power_repo.go
│ │ │ ├── role_power_rel_repo.go
│ │ │ ├── role_repo.go
│ │ │ └── user_role_rel_repo.go
│ │ ├── search_common/
│ │ │ └── search_repo.go
│ │ ├── search_sync/
│ │ │ └── search_sync.go
│ │ ├── site_info/
│ │ │ └── siteinfo_repo.go
│ │ ├── tag/
│ │ │ ├── tag_rel_repo.go
│ │ │ └── tag_repo.go
│ │ ├── tag_common/
│ │ │ └── tag_common_repo.go
│ │ ├── unique/
│ │ │ └── uniqid_repo.go
│ │ ├── user/
│ │ │ ├── user_backyard_repo.go
│ │ │ └── user_repo.go
│ │ ├── user_external_login/
│ │ │ └── user_external_login_repo.go
│ │ └── user_notification_config/
│ │ └── user_notification_config_repo.go
│ ├── router/
│ │ ├── answer_api_router.go
│ │ ├── config.go
│ │ ├── mcp_router.go
│ │ ├── plugin_api_router.go
│ │ ├── provider.go
│ │ ├── static_router.go
│ │ ├── swagger_router.go
│ │ ├── template_router.go
│ │ ├── ui.go
│ │ └── ui_test.go
│ ├── schema/
│ │ ├── activity.go
│ │ ├── ai_config_schema.go
│ │ ├── ai_conversation_schema.go
│ │ ├── answer_activity_schema.go
│ │ ├── answer_schema.go
│ │ ├── api_key_schema.go
│ │ ├── backyard_user_schema.go
│ │ ├── badge_schema.go
│ │ ├── collection_group_schema.go
│ │ ├── comment_schema.go
│ │ ├── config_schema.go
│ │ ├── connector_schema.go
│ │ ├── dashboard_schema.go
│ │ ├── email_template.go
│ │ ├── err_schema.go
│ │ ├── event_schema.go
│ │ ├── follow_schema.go
│ │ ├── forbidden_schema.go
│ │ ├── mcp_schema.go
│ │ ├── mcp_tools/
│ │ │ └── mcp_tools.go
│ │ ├── meta_schema.go
│ │ ├── new_question_queue_schema.go
│ │ ├── notification_schema.go
│ │ ├── permission.go
│ │ ├── plugin_admin_schema.go
│ │ ├── plugin_user_center.go
│ │ ├── plugin_user_schema.go
│ │ ├── question_schema.go
│ │ ├── rank_schema.go
│ │ ├── reason_schema.go
│ │ ├── render_schema.go
│ │ ├── report_schema.go
│ │ ├── review_schema.go
│ │ ├── revision_schema.go
│ │ ├── role_schema.go
│ │ ├── search_schema.go
│ │ ├── search_schema_test.go
│ │ ├── simple_obj_info_schema.go
│ │ ├── siteinfo_schema.go
│ │ ├── sitemap_schema.go
│ │ ├── tag_list_schema.go
│ │ ├── tag_schema.go
│ │ ├── template_schema.go
│ │ ├── theme_schema.go
│ │ ├── user_external_login_schema.go
│ │ ├── user_notification_schema.go
│ │ ├── user_schema.go
│ │ └── vote_schema.go
│ └── service/
│ ├── action/
│ │ ├── captcha_service.go
│ │ └── captcha_strategy.go
│ ├── activity/
│ │ ├── activity.go
│ │ ├── answer_activity_service.go
│ │ ├── review_active.go
│ │ └── user_active.go
│ ├── activity_common/
│ │ ├── activity.go
│ │ ├── follow.go
│ │ └── vote.go
│ ├── activity_type/
│ │ └── activity_type.go
│ ├── activityqueue/
│ │ └── activity_queue.go
│ ├── ai_conversation/
│ │ └── ai_conversation_service.go
│ ├── answer_common/
│ │ └── answer.go
│ ├── apikey/
│ │ └── apikey_service.go
│ ├── auth/
│ │ └── auth.go
│ ├── badge/
│ │ ├── badge_award_service.go
│ │ ├── badge_event_handler.go
│ │ ├── badge_group_service.go
│ │ └── badge_service.go
│ ├── collection/
│ │ ├── collection_group_service.go
│ │ └── collection_service.go
│ ├── collection_common/
│ │ └── collection.go
│ ├── comment/
│ │ └── comment_service.go
│ ├── comment_common/
│ │ └── comment_service.go
│ ├── config/
│ │ └── config_service.go
│ ├── content/
│ │ ├── answer_service.go
│ │ ├── question_hottest_service.go
│ │ ├── question_service.go
│ │ ├── revision_service.go
│ │ ├── search_service.go
│ │ ├── user_service.go
│ │ └── vote_service.go
│ ├── dashboard/
│ │ ├── dashboard_service.go
│ │ └── dashboard_test.go
│ ├── eventqueue/
│ │ └── event_queue.go
│ ├── export/
│ │ └── email_service.go
│ ├── feature_toggle/
│ │ └── feature_toggle_service.go
│ ├── file_record/
│ │ └── file_record_service.go
│ ├── follow/
│ │ └── follow_service.go
│ ├── importer/
│ │ └── importer_service.go
│ ├── meta/
│ │ └── meta_service.go
│ ├── meta_common/
│ │ └── meta_common_service.go
│ ├── mock/
│ │ └── siteinfo_repo_mock.go
│ ├── noticequeue/
│ │ └── notice_queue.go
│ ├── notification/
│ │ ├── external_notification.go
│ │ ├── invite_answer_notification.go
│ │ ├── new_answer_notification.go
│ │ ├── new_comment_notification.go
│ │ ├── new_question_notification.go
│ │ └── notification_service.go
│ ├── notification_common/
│ │ └── notification.go
│ ├── object_info/
│ │ └── object_info.go
│ ├── permission/
│ │ ├── answer_permission.go
│ │ ├── comment_permission.go
│ │ ├── permission_name.go
│ │ ├── question_permission.go
│ │ └── tag_permission.go
│ ├── plugin_common/
│ │ └── plugin_common_service.go
│ ├── provider.go
│ ├── question_common/
│ │ └── question.go
│ ├── rank/
│ │ └── rank_service.go
│ ├── reason/
│ │ └── reason_service.go
│ ├── reason_common/
│ │ └── reason.go
│ ├── report/
│ │ └── report_service.go
│ ├── report_common/
│ │ └── report_common.go
│ ├── report_handle/
│ │ └── report_handle.go
│ ├── review/
│ │ └── review_service.go
│ ├── revision/
│ │ └── revision.go
│ ├── revision_common/
│ │ └── revision_service.go
│ ├── role/
│ │ ├── power_service.go
│ │ ├── role_power_rel_service.go
│ │ ├── role_service.go
│ │ └── user_role_rel_service.go
│ ├── search_common/
│ │ └── search.go
│ ├── search_parser/
│ │ └── search_parser.go
│ ├── service_config/
│ │ └── service_config.go
│ ├── siteinfo/
│ │ └── siteinfo_service.go
│ ├── siteinfo_common/
│ │ ├── siteinfo_service.go
│ │ └── siteinfo_service_test.go
│ ├── tag/
│ │ └── tag_service.go
│ ├── tag_common/
│ │ └── tag_common.go
│ ├── unique/
│ │ └── uniqid_service.go
│ ├── uploader/
│ │ └── upload.go
│ ├── user_admin/
│ │ └── user_backyard.go
│ ├── user_common/
│ │ └── user.go
│ ├── user_external_login/
│ │ ├── user_center_login_service.go
│ │ └── user_external_login_service.go
│ └── user_notification_config/
│ └── user_notification_config_service.go
├── licenserc.toml
├── pkg/
│ ├── checker/
│ │ ├── chinese.go
│ │ ├── email.go
│ │ ├── file_type.go
│ │ ├── password.go
│ │ ├── path_ignore.go
│ │ ├── question_link.go
│ │ ├── question_link_test.go
│ │ ├── reserved_username.go
│ │ ├── url.go
│ │ ├── username.go
│ │ └── zero_string.go
│ ├── converter/
│ │ ├── array.go
│ │ ├── markdown.go
│ │ ├── str.go
│ │ └── user.go
│ ├── day/
│ │ ├── day.go
│ │ └── day_test.go
│ ├── dir/
│ │ └── dir.go
│ ├── display/
│ │ └── url.go
│ ├── encryption/
│ │ └── md5.go
│ ├── gravatar/
│ │ ├── gravatar.go
│ │ └── gravatar_test.go
│ ├── htmltext/
│ │ ├── htmltext.go
│ │ └── htmltext_test.go
│ ├── obj/
│ │ └── obj.go
│ ├── random/
│ │ └── random_username.go
│ ├── token/
│ │ └── token.go
│ ├── uid/
│ │ ├── id.go
│ │ └── sid.go
│ └── writer/
│ └── writer.go
├── plugin/
│ ├── agent.go
│ ├── base.go
│ ├── cache.go
│ ├── captcha.go
│ ├── cdn.go
│ ├── config.go
│ ├── connector.go
│ ├── embed.go
│ ├── filter.go
│ ├── importer.go
│ ├── kv_storage.go
│ ├── notification.go
│ ├── parser.go
│ ├── plugin.go
│ ├── plugin_test/
│ │ ├── kv_storage_test.go
│ │ └── plugin_main_test.go
│ ├── render.go
│ ├── reviewer.go
│ ├── search.go
│ ├── sidebar.go
│ ├── storage.go
│ ├── user_center.go
│ └── user_config.go
├── script/
│ ├── build_plugin.sh
│ ├── check-asf-header.sh
│ ├── entrypoint.sh
│ ├── gen-api.sh
│ └── plugin_list
└── ui/
├── .browserslistrc
├── .editorconfig
├── .eslintignore
├── .eslintrc.js
├── .gitignore
├── .lintstagedrc.json
├── .npmrc
├── .prettierrc.json
├── commitlint.config.js
├── config-overrides.js
├── package.json
├── pnpm-workspace.yaml
├── public/
│ ├── index.html
│ ├── manifest.json
│ └── robots.txt
├── scripts/
│ ├── env.js
│ ├── importPlugins.js
│ ├── loadPlugins.js
│ ├── preinstall.js
│ └── setup-eslint.js
├── src/
│ ├── App.test.tsx
│ ├── App.tsx
│ ├── behaviour/
│ │ └── useLegalClick.tsx
│ ├── common/
│ │ ├── _variable.scss
│ │ ├── color.scss
│ │ ├── constants.ts
│ │ ├── interface.ts
│ │ ├── pattern.ts
│ │ └── sideNavLayout.scss
│ ├── components/
│ │ ├── AccordionNav/
│ │ │ ├── index.css
│ │ │ └── index.tsx
│ │ ├── Actions/
│ │ │ └── index.tsx
│ │ ├── AdminSideNav/
│ │ │ └── index.tsx
│ │ ├── Avatar/
│ │ │ └── index.tsx
│ │ ├── BaseUserCard/
│ │ │ └── index.tsx
│ │ ├── BrandUpload/
│ │ │ └── index.tsx
│ │ ├── BubbleAi/
│ │ │ └── index.tsx
│ │ ├── BubbleUser/
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── CardBadge/
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── Comment/
│ │ │ ├── components/
│ │ │ │ ├── ActionBar/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Form/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Reply/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── Counts/
│ │ │ └── index.tsx
│ │ ├── CustomSidebar/
│ │ │ └── index.tsx
│ │ ├── Customize/
│ │ │ └── index.tsx
│ │ ├── CustomizeTheme/
│ │ │ └── index.tsx
│ │ ├── DiffContent/
│ │ │ └── index.tsx
│ │ ├── Editor/
│ │ │ ├── EditorContext.ts
│ │ │ ├── MarkdownEditor.tsx
│ │ │ ├── Select/
│ │ │ │ └── index.tsx
│ │ │ ├── ToolBars/
│ │ │ │ ├── blockquote.tsx
│ │ │ │ ├── bold.tsx
│ │ │ │ ├── code.tsx
│ │ │ │ ├── file.tsx
│ │ │ │ ├── heading.tsx
│ │ │ │ ├── help.tsx
│ │ │ │ ├── hr.tsx
│ │ │ │ ├── image.tsx
│ │ │ │ ├── indent.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── italic.tsx
│ │ │ │ ├── link.tsx
│ │ │ │ ├── ol.tsx
│ │ │ │ ├── outdent.tsx
│ │ │ │ ├── table.tsx
│ │ │ │ └── ul.tsx
│ │ │ ├── Viewer.tsx
│ │ │ ├── hooks/
│ │ │ │ └── useImageUpload.ts
│ │ │ ├── index.scss
│ │ │ ├── index.tsx
│ │ │ ├── toolItem.tsx
│ │ │ ├── types.ts
│ │ │ └── utils/
│ │ │ ├── codemirror/
│ │ │ │ ├── adapter.ts
│ │ │ │ ├── base.ts
│ │ │ │ ├── commands.ts
│ │ │ │ └── events.ts
│ │ │ └── index.ts
│ │ ├── Empty/
│ │ │ └── index.tsx
│ │ ├── FollowingTags/
│ │ │ └── index.tsx
│ │ ├── Footer/
│ │ │ └── index.tsx
│ │ ├── FormatTime/
│ │ │ └── index.tsx
│ │ ├── Header/
│ │ │ ├── components/
│ │ │ │ ├── NavItems/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── SearchInput/
│ │ │ │ └── index.tsx
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── HighlightText/
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── HotQuestions/
│ │ │ └── index.tsx
│ │ ├── HttpErrorContent/
│ │ │ └── index.tsx
│ │ ├── Icon/
│ │ │ ├── index.tsx
│ │ │ └── svg.tsx
│ │ ├── ImgViewer/
│ │ │ ├── index.css
│ │ │ └── index.tsx
│ │ ├── InitialLoadingPlaceholder/
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── Mentions/
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── MobileSideNav/
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── Modal/
│ │ │ ├── BadgeModal.tsx
│ │ │ ├── Confirm.tsx
│ │ │ ├── LoginToContinueModal.tsx
│ │ │ ├── Modal.tsx
│ │ │ ├── index.tsx
│ │ │ └── login.scss
│ │ ├── Operate/
│ │ │ └── index.tsx
│ │ ├── PageTags/
│ │ │ └── index.tsx
│ │ ├── Pagination/
│ │ │ └── index.tsx
│ │ ├── PinList/
│ │ │ └── index.tsx
│ │ ├── PluginRender/
│ │ │ └── index.tsx
│ │ ├── QueryGroup/
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── QuestionList/
│ │ │ └── index.tsx
│ │ ├── QuestionListLoader/
│ │ │ └── index.tsx
│ │ ├── SchemaForm/
│ │ │ ├── README.md
│ │ │ ├── components/
│ │ │ │ ├── Button.tsx
│ │ │ │ ├── Check.tsx
│ │ │ │ ├── Input.tsx
│ │ │ │ ├── InputGroup.tsx
│ │ │ │ ├── Legend.tsx
│ │ │ │ ├── Select.tsx
│ │ │ │ ├── Switch.tsx
│ │ │ │ ├── TagSelector.tsx
│ │ │ │ ├── Textarea.tsx
│ │ │ │ ├── Timezone.tsx
│ │ │ │ ├── Upload.tsx
│ │ │ │ └── index.ts
│ │ │ ├── index.tsx
│ │ │ └── types.ts
│ │ ├── Sender/
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── Share/
│ │ │ └── index.tsx
│ │ ├── SideNav/
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── TabNav/
│ │ │ └── index.tsx
│ │ ├── Tag/
│ │ │ └── index.tsx
│ │ ├── TagSelector/
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── TagsLoader/
│ │ │ └── index.tsx
│ │ ├── TextArea/
│ │ │ └── index.tsx
│ │ ├── TimeZonePicker/
│ │ │ └── index.tsx
│ │ ├── Toast/
│ │ │ └── index.tsx
│ │ ├── Unactivate/
│ │ │ └── index.tsx
│ │ ├── UploadImg/
│ │ │ └── index.tsx
│ │ ├── UserCard/
│ │ │ └── index.tsx
│ │ ├── WelcomeTitle/
│ │ │ └── index.tsx
│ │ └── index.ts
│ ├── hooks/
│ │ ├── index.ts
│ │ ├── useActivationEmailModal/
│ │ │ └── index.tsx
│ │ ├── useCaptchaModal/
│ │ │ └── index.tsx
│ │ ├── useChangePasswordModal/
│ │ │ └── index.tsx
│ │ ├── useChangeProfileModal/
│ │ │ └── index.tsx
│ │ ├── useChangeUserRoleModal/
│ │ │ └── index.tsx
│ │ ├── useExternalToast/
│ │ │ └── index.tsx
│ │ ├── useLoginRedirect/
│ │ │ └── index.tsx
│ │ ├── usePageTags/
│ │ │ └── index.tsx
│ │ ├── usePageUsers/
│ │ │ └── index.tsx
│ │ ├── usePrompt/
│ │ │ └── index.tsx
│ │ ├── useReportModal/
│ │ │ └── index.tsx
│ │ ├── useSkeletonControl/
│ │ │ └── index.tsx
│ │ ├── useTagModal/
│ │ │ └── index.tsx
│ │ ├── useToast/
│ │ │ └── index.tsx
│ │ └── useUserModal/
│ │ └── index.tsx
│ ├── i18n/
│ │ └── init.ts
│ ├── index.scss
│ ├── index.tsx
│ ├── pages/
│ │ ├── 404/
│ │ │ ├── 403/
│ │ │ │ └── index.tsx
│ │ │ └── index.tsx
│ │ ├── 50X/
│ │ │ └── index.tsx
│ │ ├── Admin/
│ │ │ ├── AiAssistant/
│ │ │ │ ├── components/
│ │ │ │ │ ├── Action/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ └── DetailModal/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── AiSettings/
│ │ │ │ └── index.tsx
│ │ │ ├── Answers/
│ │ │ │ ├── components/
│ │ │ │ │ └── Action/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Apikeys/
│ │ │ │ ├── components/
│ │ │ │ │ ├── Action/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── AddOrEditModal/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── CreatedModal/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ └── index.tsx
│ │ │ ├── Badges/
│ │ │ │ ├── components/
│ │ │ │ │ └── Action/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Branding/
│ │ │ │ └── index.tsx
│ │ │ ├── CssAndHtml/
│ │ │ │ └── index.tsx
│ │ │ ├── Dashboard/
│ │ │ │ ├── components/
│ │ │ │ │ ├── AnswerLinks/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── HealthStatus/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── Statistics/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── SystemInfo/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ └── index.tsx
│ │ │ ├── Files/
│ │ │ │ └── index.tsx
│ │ │ ├── General/
│ │ │ │ └── index.tsx
│ │ │ ├── Interface/
│ │ │ │ └── index.tsx
│ │ │ ├── Login/
│ │ │ │ └── index.tsx
│ │ │ ├── Mcp/
│ │ │ │ └── index.tsx
│ │ │ ├── Plugins/
│ │ │ │ ├── Config/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── Installed/
│ │ │ │ └── index.tsx
│ │ │ ├── Policies/
│ │ │ │ └── index.tsx
│ │ │ ├── Privileges/
│ │ │ │ └── index.tsx
│ │ │ ├── QaSettings/
│ │ │ │ └── index.tsx
│ │ │ ├── Questions/
│ │ │ │ ├── components/
│ │ │ │ │ └── Action/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Security/
│ │ │ │ └── index.tsx
│ │ │ ├── Seo/
│ │ │ │ └── index.tsx
│ │ │ ├── Smtp/
│ │ │ │ └── index.tsx
│ │ │ ├── TagsSettings/
│ │ │ │ └── index.tsx
│ │ │ ├── Themes/
│ │ │ │ └── index.tsx
│ │ │ ├── Users/
│ │ │ │ ├── components/
│ │ │ │ │ ├── Action/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── DeleteUserModal/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ └── SuspenseUserModal/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── UsersSettings/
│ │ │ │ └── index.tsx
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── AiAssistant/
│ │ │ ├── components/
│ │ │ │ └── ConversationList/
│ │ │ │ └── index.tsx
│ │ │ └── index.tsx
│ │ ├── Badges/
│ │ │ ├── Detail/
│ │ │ │ ├── components/
│ │ │ │ │ ├── Badge/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── HeaderLoader/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── Loader/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ └── UserCard/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ └── index.tsx
│ │ ├── Install/
│ │ │ ├── components/
│ │ │ │ ├── FifthStep/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── FirstStep/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── FourthStep/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Progress/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── SecondStep/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── ThirdStep/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.ts
│ │ │ └── index.tsx
│ │ ├── Layout/
│ │ │ └── index.tsx
│ │ ├── Legal/
│ │ │ ├── Privacy/
│ │ │ │ └── index.tsx
│ │ │ ├── Tos/
│ │ │ │ └── index.tsx
│ │ │ └── index.tsx
│ │ ├── Maintenance/
│ │ │ └── index.tsx
│ │ ├── Questions/
│ │ │ ├── Ask/
│ │ │ │ ├── components/
│ │ │ │ │ └── SearchQuestion/
│ │ │ │ │ ├── index.scss
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Detail/
│ │ │ │ ├── components/
│ │ │ │ │ ├── Alert/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── Answer/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── AnswerHead/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── ContentLoader/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── InviteToAnswer/
│ │ │ │ │ │ ├── PeopleDropdown.scss
│ │ │ │ │ │ ├── PeopleDropdown.tsx
│ │ │ │ │ │ ├── index.scss
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── LinkedQuestions/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── Question/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── Reactions/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── RelatedQuestions/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── WriteAnswer/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── index.scss
│ │ │ │ └── index.tsx
│ │ │ ├── EditAnswer/
│ │ │ │ ├── index.scss
│ │ │ │ └── index.tsx
│ │ │ ├── Linked/
│ │ │ │ └── index.tsx
│ │ │ └── index.tsx
│ │ ├── Review/
│ │ │ ├── components/
│ │ │ │ ├── ApproveDropdown/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── EditPostModal/
│ │ │ │ │ ├── index.scss
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── FlagContent/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── QueuedContent/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── ReviewType/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── SuggestContent/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.ts
│ │ │ ├── index.tsx
│ │ │ └── utils/
│ │ │ └── generateData.ts
│ │ ├── Search/
│ │ │ ├── components/
│ │ │ │ ├── AiCard/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Empty/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Head/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── ListLoader/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── SearchHead/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── SearchItem/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Tips/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.ts
│ │ │ └── index.tsx
│ │ ├── SideNavLayout/
│ │ │ └── index.tsx
│ │ ├── SideNavLayoutWithoutFooter/
│ │ │ └── index.tsx
│ │ ├── Tags/
│ │ │ ├── Create/
│ │ │ │ └── index.tsx
│ │ │ ├── Detail/
│ │ │ │ └── index.tsx
│ │ │ ├── Edit/
│ │ │ │ └── index.tsx
│ │ │ ├── Info/
│ │ │ │ ├── components/
│ │ │ │ │ └── MergeTagModal/
│ │ │ │ │ ├── index.scss
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ └── index.tsx
│ │ ├── Timeline/
│ │ │ ├── components/
│ │ │ │ └── Item/
│ │ │ │ └── index.tsx
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── UserCenter/
│ │ │ ├── Auth/
│ │ │ │ ├── components/
│ │ │ │ │ └── WeCom/
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ └── service.ts
│ │ │ │ └── index.tsx
│ │ │ └── AuthFailed/
│ │ │ ├── components/
│ │ │ │ └── WeCom.tsx
│ │ │ └── index.tsx
│ │ └── Users/
│ │ ├── AccountForgot/
│ │ │ ├── components/
│ │ │ │ └── sendEmail.tsx
│ │ │ └── index.tsx
│ │ ├── ActivationResult/
│ │ │ └── index.tsx
│ │ ├── ActiveEmail/
│ │ │ └── index.tsx
│ │ ├── AuthCallback/
│ │ │ └── index.tsx
│ │ ├── ChangeEmail/
│ │ │ ├── components/
│ │ │ │ └── sendEmail.tsx
│ │ │ └── index.tsx
│ │ ├── ConfirmNewEmail/
│ │ │ └── index.tsx
│ │ ├── Login/
│ │ │ └── index.tsx
│ │ ├── Logout/
│ │ │ └── index.tsx
│ │ ├── Notifications/
│ │ │ ├── components/
│ │ │ │ ├── Achievements/
│ │ │ │ │ ├── index.scss
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Inbox/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.ts
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── OauthBindEmail/
│ │ │ └── index.tsx
│ │ ├── PasswordReset/
│ │ │ └── index.tsx
│ │ ├── Personal/
│ │ │ ├── components/
│ │ │ │ ├── Alert/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Answers/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Badges/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Comments/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── DefaultList/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── ListHead/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── NavBar/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Overview/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Reputation/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── TopList/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── UserInfo/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Votes/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.ts
│ │ │ └── index.tsx
│ │ ├── Register/
│ │ │ ├── components/
│ │ │ │ └── SignUpForm/
│ │ │ │ └── index.tsx
│ │ │ └── index.tsx
│ │ ├── Settings/
│ │ │ ├── Account/
│ │ │ │ ├── components/
│ │ │ │ │ ├── ModifyEmail/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── ModifyPass/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── MyLogins/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ └── index.tsx
│ │ │ ├── Interface/
│ │ │ │ └── index.tsx
│ │ │ ├── Notification/
│ │ │ │ └── index.tsx
│ │ │ ├── Plugins/
│ │ │ │ └── index.tsx
│ │ │ ├── Profile/
│ │ │ │ └── index.tsx
│ │ │ ├── components/
│ │ │ │ └── Nav/
│ │ │ │ └── index.tsx
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── Suspended/
│ │ │ └── index.tsx
│ │ ├── Unsubscribe/
│ │ │ └── index.tsx
│ │ └── index.tsx
│ ├── plugins/
│ │ ├── builtin/
│ │ │ ├── HostingConnector/
│ │ │ │ ├── i18n/
│ │ │ │ │ ├── en_US.yaml
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── zh_CN.yaml
│ │ │ │ ├── index.tsx
│ │ │ │ └── info.yaml
│ │ │ ├── SearchInfo/
│ │ │ │ ├── i18n/
│ │ │ │ │ ├── en_US.yaml
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── zh_CN.yaml
│ │ │ │ ├── index.tsx
│ │ │ │ ├── info.yaml
│ │ │ │ └── services.ts
│ │ │ ├── ThirdPartyConnector/
│ │ │ │ ├── i18n/
│ │ │ │ │ ├── en_US.yaml
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── zh_CN.yaml
│ │ │ │ ├── index.tsx
│ │ │ │ ├── info.yaml
│ │ │ │ └── services.ts
│ │ │ └── index.ts
│ │ └── index.ts
│ ├── react-app-env.d.ts
│ ├── router/
│ │ ├── RouteErrorBoundary.tsx
│ │ ├── RouteGuard.tsx
│ │ ├── alias.ts
│ │ ├── index.tsx
│ │ ├── pathFactory.ts
│ │ └── routes.ts
│ ├── services/
│ │ ├── admin/
│ │ │ ├── ai.ts
│ │ │ ├── answer.ts
│ │ │ ├── apikeys.ts
│ │ │ ├── badges.ts
│ │ │ ├── dashboard.ts
│ │ │ ├── flag.ts
│ │ │ ├── index.ts
│ │ │ ├── mcp.ts
│ │ │ ├── plugins.ts
│ │ │ ├── question.ts
│ │ │ ├── settings.ts
│ │ │ ├── tags.ts
│ │ │ └── users.ts
│ │ ├── client/
│ │ │ ├── Oauth.ts
│ │ │ ├── activity.ts
│ │ │ ├── ai.ts
│ │ │ ├── badges.ts
│ │ │ ├── index.ts
│ │ │ ├── legal.ts
│ │ │ ├── notification.ts
│ │ │ ├── personal.ts
│ │ │ ├── question.ts
│ │ │ ├── review.ts
│ │ │ ├── revision.ts
│ │ │ ├── search.ts
│ │ │ ├── settings.ts
│ │ │ ├── tag.ts
│ │ │ ├── timeline.ts
│ │ │ └── user.ts
│ │ ├── common.ts
│ │ ├── index.ts
│ │ ├── install/
│ │ │ └── index.ts
│ │ └── user-center/
│ │ └── index.ts
│ ├── stores/
│ │ ├── aiControl.ts
│ │ ├── branding.ts
│ │ ├── commentReply.ts
│ │ ├── customize.ts
│ │ ├── errorCode.ts
│ │ ├── index.ts
│ │ ├── interface.ts
│ │ ├── loggedUserInfo.ts
│ │ ├── loginSetting.ts
│ │ ├── loginToContinue.ts
│ │ ├── pageTags.ts
│ │ ├── seoSetting.ts
│ │ ├── sideNav.ts
│ │ ├── siteInfo.ts
│ │ ├── siteSecurity.ts
│ │ ├── themeSetting.ts
│ │ ├── toast.ts
│ │ ├── userCenter.ts
│ │ └── writeSetting.ts
│ └── utils/
│ ├── animateGift.ts
│ ├── color.ts
│ ├── common.ts
│ ├── floppyNavigation.ts
│ ├── guard.ts
│ ├── index.ts
│ ├── localize.ts
│ ├── pluginKit/
│ │ ├── index.ts
│ │ ├── interface.ts
│ │ └── utils.ts
│ ├── progress.ts
│ ├── request.ts
│ ├── requestAi.ts
│ ├── saveDraft.ts
│ ├── storage.ts
│ ├── storageWithExpires.ts
│ └── userCenter.ts
├── static.go
├── template/
│ ├── 404.html
│ ├── comment.html
│ ├── footer.html
│ ├── header.html
│ ├── homepage.html
│ ├── hot-question.html
│ ├── opensearch.xml
│ ├── page.html
│ ├── question-detail.html
│ ├── question.html
│ ├── related-question.html
│ ├── sidenav.html
│ ├── sitemap-list.xml
│ ├── sitemap.xml
│ ├── sort-btns.html
│ ├── tag-detail.html
│ └── tags.html
└── tsconfig.json
Showing preview only (393K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (4070 symbols across 639 files)
FILE: cmd/answer/main.go
function main (line 35) | func main() {
FILE: cmd/command.go
function init (line 64) | func init() {
function Execute (line 339) | func Execute() {
FILE: cmd/main.go
function init (line 41) | func init() {
function Main (line 69) | func Main() {
function runApp (line 75) | func runApp() {
function newApplication (line 97) | func newApplication(serverConf *conf.Server, server *gin.Engine, manager...
FILE: cmd/wire.go
function initApplication (line 46) | func initApplication(
FILE: cmd/wire_gen.go
function initApplication (line 129) | func initApplication(debug bool, serverConf *conf.Server, dbConf *data.D...
FILE: docs/docs.go
constant docTemplate (line 25) | docTemplate = `{
function init (line 13502) | func init() {
FILE: internal/base/conf/conf.go
type AllConfig (line 39) | type AllConfig struct
method SetDefault (line 79) | func (c *AllConfig) SetDefault() {
method SetEnvironmentOverrides (line 85) | func (c *AllConfig) SetEnvironmentOverrides() {
type envConfigOverrides (line 49) | type envConfigOverrides struct
function loadEnvs (line 55) | func loadEnvs() (envOverrides *envConfigOverrides) {
type PathIgnore (line 63) | type PathIgnore struct
type Server (line 68) | type Server struct
type Data (line 73) | type Data struct
function ReadConfig (line 99) | func ReadConfig(configFilePath string) (c *AllConfig, err error) {
function RewriteConfig (line 117) | func RewriteConfig(configFilePath string, allConfig *AllConfig) error {
FILE: internal/base/constant/acticity.go
type ActivityTypeKey (line 22) | type ActivityTypeKey
constant ActEdited (line 25) | ActEdited = "edited"
constant ActClosed (line 26) | ActClosed = "closed"
constant ActVotedDown (line 27) | ActVotedDown = "voted_down"
constant ActVotedUp (line 28) | ActVotedUp = "voted_up"
constant ActVoteDown (line 29) | ActVoteDown = "vote_down"
constant ActVoteUp (line 30) | ActVoteUp = "vote_up"
constant ActUpVote (line 31) | ActUpVote = "upvote"
constant ActDownVote (line 32) | ActDownVote = "downvote"
constant ActFollow (line 33) | ActFollow = "follow"
constant ActAccepted (line 34) | ActAccepted = "accepted"
constant ActAccept (line 35) | ActAccept = "accept"
constant ActPin (line 36) | ActPin = "pin"
constant ActUnPin (line 37) | ActUnPin = "unpin"
constant ActShow (line 38) | ActShow = "show"
constant ActHide (line 39) | ActHide = "hide"
constant ActQuestionAsked (line 43) | ActQuestionAsked ActivityTypeKey = "question.asked"
constant ActQuestionClosed (line 44) | ActQuestionClosed ActivityTypeKey = "question.closed"
constant ActQuestionReopened (line 45) | ActQuestionReopened ActivityTypeKey = "question.reopened"
constant ActQuestionAnswered (line 46) | ActQuestionAnswered ActivityTypeKey = "question.answered"
constant ActQuestionCommented (line 47) | ActQuestionCommented ActivityTypeKey = "question.commented"
constant ActQuestionAccept (line 48) | ActQuestionAccept ActivityTypeKey = "question.accept"
constant ActQuestionUpvote (line 49) | ActQuestionUpvote ActivityTypeKey = "question.upvote"
constant ActQuestionDownVote (line 50) | ActQuestionDownVote ActivityTypeKey = "question.downvote"
constant ActQuestionEdited (line 51) | ActQuestionEdited ActivityTypeKey = "question.edited"
constant ActQuestionRollback (line 52) | ActQuestionRollback ActivityTypeKey = "question.rollback"
constant ActQuestionDeleted (line 53) | ActQuestionDeleted ActivityTypeKey = "question.deleted"
constant ActQuestionUndeleted (line 54) | ActQuestionUndeleted ActivityTypeKey = "question.undeleted"
constant ActQuestionPin (line 55) | ActQuestionPin ActivityTypeKey = "question.pin"
constant ActQuestionUnPin (line 56) | ActQuestionUnPin ActivityTypeKey = "question.unpin"
constant ActQuestionHide (line 57) | ActQuestionHide ActivityTypeKey = "question.hide"
constant ActQuestionShow (line 58) | ActQuestionShow ActivityTypeKey = "question.show"
constant ActAnswerAnswered (line 62) | ActAnswerAnswered ActivityTypeKey = "answer.answered"
constant ActAnswerCommented (line 63) | ActAnswerCommented ActivityTypeKey = "answer.commented"
constant ActAnswerAccept (line 64) | ActAnswerAccept ActivityTypeKey = "answer.accept"
constant ActAnswerUpvote (line 65) | ActAnswerUpvote ActivityTypeKey = "answer.upvote"
constant ActAnswerDownVote (line 66) | ActAnswerDownVote ActivityTypeKey = "answer.downvote"
constant ActAnswerEdited (line 67) | ActAnswerEdited ActivityTypeKey = "answer.edited"
constant ActAnswerRollback (line 68) | ActAnswerRollback ActivityTypeKey = "answer.rollback"
constant ActAnswerDeleted (line 69) | ActAnswerDeleted ActivityTypeKey = "answer.deleted"
constant ActAnswerUndeleted (line 70) | ActAnswerUndeleted ActivityTypeKey = "answer.undeleted"
constant ActTagCreated (line 74) | ActTagCreated ActivityTypeKey = "tag.created"
constant ActTagEdited (line 75) | ActTagEdited ActivityTypeKey = "tag.edited"
constant ActTagRollback (line 76) | ActTagRollback ActivityTypeKey = "tag.rollback"
constant ActTagDeleted (line 77) | ActTagDeleted ActivityTypeKey = "tag.deleted"
constant ActTagUndeleted (line 78) | ActTagUndeleted ActivityTypeKey = "tag.undeleted"
FILE: internal/base/constant/ai_config.go
constant AIConfigProvider (line 23) | AIConfigProvider = "ai_config.provider"
constant DefaultAIPromptConfigZhCN (line 27) | DefaultAIPromptConfigZhCN = `你是一个智能助手,可以帮助用户查询系统中的信息。用户问题:%s
constant DefaultAIPromptConfigEnUS (line 38) | DefaultAIPromptConfigEnUS = `You are an intelligent assistant that can h...
FILE: internal/base/constant/cache_key.go
constant UserStatusChangedCacheKey (line 25) | UserStatusChangedCacheKey = "answer:user:status:"
constant UserStatusChangedCacheTime (line 26) | UserStatusChangedCacheTime = 7 * 24 * time.Hour
constant UserTokenCacheKey (line 27) | UserTokenCacheKey = "answer:user:token:"
constant UserTokenCacheTime (line 28) | UserTokenCacheTime = 7 * 24 * time.Hour
constant UserVisitTokenCacheKey (line 29) | UserVisitTokenCacheKey = "answer:user:visit:"
constant UserVisitCacheTime (line 30) | UserVisitCacheTime = 7 * 24 * 60 * 60
constant UserVisitCookiesCacheKey (line 31) | UserVisitCookiesCacheKey = "visit"
constant AdminTokenCacheKey (line 32) | AdminTokenCacheKey = "answer:admin:token:"
constant AdminTokenCacheTime (line 33) | AdminTokenCacheTime = 7 * 24 * time.Hour
constant UserTokenMappingCacheKey (line 34) | UserTokenMappingCacheKey = "answer:user-token:mapping:"
constant UserEmailCodeCacheKey (line 35) | UserEmailCodeCacheKey = "answer:user:email-code:"
constant UserEmailCodeCacheTime (line 36) | UserEmailCodeCacheTime = 10 * time.Minute
constant UserLatestEmailCodeCacheKey (line 37) | UserLatestEmailCodeCacheKey = "answer:user-id:email-code:"
constant SiteInfoCacheKey (line 38) | SiteInfoCacheKey = "answer:site-info:"
constant SiteInfoCacheTime (line 39) | SiteInfoCacheTime = 1 * time.Hour
constant ConfigID2KEYCacheKeyPrefix (line 40) | ConfigID2KEYCacheKeyPrefix = "answer:config:id:"
constant ConfigKEY2ContentCacheKeyPrefix (line 41) | ConfigKEY2ContentCacheKeyPrefix = "answer:config:key:"
constant ConfigCacheTime (line 42) | ConfigCacheTime = 1 * time.Hour
constant ConnectorUserExternalInfoCacheKey (line 43) | ConnectorUserExternalInfoCacheKey = "answer:connector:"
constant ConnectorUserExternalInfoCacheTime (line 44) | ConnectorUserExternalInfoCacheTime = 10 * time.Minute
constant SiteMapQuestionCacheKeyPrefix (line 45) | SiteMapQuestionCacheKeyPrefix = "answer:sitemap:question:%d"
constant SiteMapQuestionCacheTime (line 46) | SiteMapQuestionCacheTime = time.Hour
constant SitemapMaxSize (line 47) | SitemapMaxSize = 50000
constant NewQuestionNotificationLimitCacheKeyPrefix (line 48) | NewQuestionNotificationLimitCacheKeyPrefix = "answer:new-question-notifi...
constant NewQuestionNotificationLimitCacheTime (line 49) | NewQuestionNotificationLimitCacheTime = 7 * 24 * time.Hour
constant NewQuestionNotificationLimitMax (line 50) | NewQuestionNotificationLimitMax = 50
constant RateLimitCacheKeyPrefix (line 51) | RateLimitCacheKeyPrefix = "answer:rate-limit:"
constant RateLimitCacheTime (line 52) | RateLimitCacheTime = 5 * time.Minute
constant RedDotCacheKey (line 53) | RedDotCacheKey = "answer:red-dot:%s:%s"
constant RedDotCacheTime (line 54) | RedDotCacheTime = 30 * 24 * time.Hour
FILE: internal/base/constant/comment.go
constant CommentEditDeadline (line 25) | CommentEditDeadline = time.Minute * 5
FILE: internal/base/constant/constant.go
constant DefaultPageSize (line 23) | DefaultPageSize = 20
constant DefaultBulkUser (line 24) | DefaultBulkUser = 5000
FILE: internal/base/constant/ctx_flag.go
constant AcceptLanguageFlag (line 23) | AcceptLanguageFlag = "Accept-Language"
constant ShortIDFlag (line 24) | ShortIDFlag = "Short-ID-Enabled"
type ContextKey (line 27) | type ContextKey
constant AcceptLanguageContextKey (line 30) | AcceptLanguageContextKey ContextKey = ContextKey(AcceptLanguageFlag)
constant ShortIDContextKey (line 31) | ShortIDContextKey ContextKey = ContextKey(ShortIDFlag)
FILE: internal/base/constant/email_tpl_key.go
constant EmailTplKeyChangeEmailTitle (line 23) | EmailTplKeyChangeEmailTitle = "email_tpl.change_email.title"
constant EmailTplKeyChangeEmailBody (line 24) | EmailTplKeyChangeEmailBody = "email_tpl.change_email.body"
constant EmailTplKeyNewAnswerTitle (line 26) | EmailTplKeyNewAnswerTitle = "email_tpl.new_answer.title"
constant EmailTplKeyNewAnswerBody (line 27) | EmailTplKeyNewAnswerBody = "email_tpl.new_answer.body"
constant EmailTplKeyNewCommentTitle (line 29) | EmailTplKeyNewCommentTitle = "email_tpl.new_comment.title"
constant EmailTplKeyNewCommentBody (line 30) | EmailTplKeyNewCommentBody = "email_tpl.new_comment.body"
constant EmailTplKeyPassResetTitle (line 32) | EmailTplKeyPassResetTitle = "email_tpl.pass_reset.title"
constant EmailTplKeyPassResetBody (line 33) | EmailTplKeyPassResetBody = "email_tpl.pass_reset.body"
constant EmailTplKeyRegisterTitle (line 35) | EmailTplKeyRegisterTitle = "email_tpl.register.title"
constant EmailTplKeyRegisterBody (line 36) | EmailTplKeyRegisterBody = "email_tpl.register.body"
constant EmailTplKeyTestTitle (line 38) | EmailTplKeyTestTitle = "email_tpl.test.title"
constant EmailTplKeyTestBody (line 39) | EmailTplKeyTestBody = "email_tpl.test.body"
constant EmailTplKeyInvitedAnswerTitle (line 41) | EmailTplKeyInvitedAnswerTitle = "email_tpl.invited_you_to_answer.title"
constant EmailTplKeyInvitedAnswerBody (line 42) | EmailTplKeyInvitedAnswerBody = "email_tpl.invited_you_to_answer.body"
constant EmailTplKeyNewQuestionTitle (line 44) | EmailTplKeyNewQuestionTitle = "email_tpl.new_question.title"
constant EmailTplKeyNewQuestionBody (line 45) | EmailTplKeyNewQuestionBody = "email_tpl.new_question.body"
FILE: internal/base/constant/event.go
type EventType (line 23) | type EventType
constant eventQuestion (line 27) | eventQuestion = "question"
constant eventAnswer (line 28) | eventAnswer = "answer"
constant eventComment (line 29) | eventComment = "comment"
constant eventUser (line 30) | eventUser = "user"
constant eventCreate (line 35) | eventCreate = "create"
constant eventUpdate (line 36) | eventUpdate = "update"
constant eventDelete (line 37) | eventDelete = "delete"
constant eventVote (line 38) | eventVote = "vote"
constant eventAccept (line 39) | eventAccept = "accept"
constant eventShare (line 40) | eventShare = "share"
constant eventFlag (line 41) | eventFlag = "flag"
constant eventReact (line 42) | eventReact = "react"
constant EventUserUpdate (line 46) | EventUserUpdate EventType = eventUser + "." + eventUpdate
constant EventUserShare (line 47) | EventUserShare EventType = eventUser + "." + eventShare
constant EventQuestionCreate (line 51) | EventQuestionCreate EventType = eventQuestion + "." + eventCreate
constant EventQuestionUpdate (line 52) | EventQuestionUpdate EventType = eventQuestion + "." + eventUpdate
constant EventQuestionDelete (line 53) | EventQuestionDelete EventType = eventQuestion + "." + eventDelete
constant EventQuestionVote (line 54) | EventQuestionVote EventType = eventQuestion + "." + eventVote
constant EventQuestionAccept (line 55) | EventQuestionAccept EventType = eventQuestion + "." + eventAccept
constant EventQuestionFlag (line 56) | EventQuestionFlag EventType = eventQuestion + "." + eventFlag
constant EventQuestionReact (line 57) | EventQuestionReact EventType = eventQuestion + "." + eventReact
constant EventAnswerCreate (line 61) | EventAnswerCreate EventType = eventAnswer + "." + eventCreate
constant EventAnswerUpdate (line 62) | EventAnswerUpdate EventType = eventAnswer + "." + eventUpdate
constant EventAnswerDelete (line 63) | EventAnswerDelete EventType = eventAnswer + "." + eventDelete
constant EventAnswerVote (line 64) | EventAnswerVote EventType = eventAnswer + "." + eventVote
constant EventAnswerFlag (line 65) | EventAnswerFlag EventType = eventAnswer + "." + eventFlag
constant EventAnswerReact (line 66) | EventAnswerReact EventType = eventAnswer + "." + eventReact
constant EventCommentCreate (line 70) | EventCommentCreate EventType = eventComment + "." + eventCreate
constant EventCommentUpdate (line 71) | EventCommentUpdate EventType = eventComment + "." + eventUpdate
constant EventCommentDelete (line 72) | EventCommentDelete EventType = eventComment + "." + eventDelete
constant EventCommentVote (line 73) | EventCommentVote EventType = eventComment + "." + eventVote
constant EventCommentFlag (line 74) | EventCommentFlag EventType = eventComment + "." + eventFlag
FILE: internal/base/constant/meta.go
constant ReactionTooltipLabel (line 23) | ReactionTooltipLabel = "reaction.tooltip"
FILE: internal/base/constant/notification.go
constant NotificationUpdateQuestion (line 24) | NotificationUpdateQuestion = "notification.action.update_question"
constant NotificationAnswerTheQuestion (line 26) | NotificationAnswerTheQuestion = "notification.action.answer_the_question"
constant NotificationUpVotedTheQuestion (line 28) | NotificationUpVotedTheQuestion = "notification.action.up_voted_question"
constant NotificationDownVotedTheQuestion (line 30) | NotificationDownVotedTheQuestion = "notification.action.down_voted_quest...
constant NotificationUpdateAnswer (line 32) | NotificationUpdateAnswer = "notification.action.update_answer"
constant NotificationAcceptAnswer (line 34) | NotificationAcceptAnswer = "notification.action.accept_answer"
constant NotificationUpVotedTheAnswer (line 36) | NotificationUpVotedTheAnswer = "notification.action.up_voted_answer"
constant NotificationDownVotedTheAnswer (line 38) | NotificationDownVotedTheAnswer = "notification.action.down_voted_answer"
constant NotificationCommentQuestion (line 40) | NotificationCommentQuestion = "notification.action.comment_question"
constant NotificationCommentAnswer (line 42) | NotificationCommentAnswer = "notification.action.comment_answer"
constant NotificationUpVotedTheComment (line 44) | NotificationUpVotedTheComment = "notification.action.up_voted_comment"
constant NotificationReplyToYou (line 46) | NotificationReplyToYou = "notification.action.reply_to_you"
constant NotificationMentionYou (line 48) | NotificationMentionYou = "notification.action.mention_you"
constant NotificationYourQuestionIsClosed (line 50) | NotificationYourQuestionIsClosed = "notification.action.your_question_is...
constant NotificationYourQuestionWasDeleted (line 52) | NotificationYourQuestionWasDeleted = "notification.action.your_question_...
constant NotificationYourAnswerWasDeleted (line 54) | NotificationYourAnswerWasDeleted = "notification.action.your_answer_was_...
constant NotificationYourCommentWasDeleted (line 56) | NotificationYourCommentWasDeleted = "notification.action.your_comment_wa...
constant NotificationInvitedYouToAnswer (line 58) | NotificationInvitedYouToAnswer = "notification.action.invited_you_to_ans...
constant NotificationEarnedBadge (line 60) | NotificationEarnedBadge = "notification.action.earned_badge"
type NotificationChannelKey (line 63) | type NotificationChannelKey
type NotificationSource (line 64) | type NotificationSource
constant InboxSource (line 67) | InboxSource NotificationSource = "inbox"
constant AllNewQuestionSource (line 68) | AllNewQuestionSource NotificationSource = "all_new_quest...
constant AllNewQuestionForFollowingTagsSource (line 69) | AllNewQuestionForFollowingTagsSource NotificationSource = "all_new_quest...
constant EmailChannel (line 73) | EmailChannel NotificationChannelKey = "email"
constant NotificationTypeInbox (line 77) | NotificationTypeInbox = "inbox"
constant NotificationTypeAchievement (line 78) | NotificationTypeAchievement = "achievement"
constant NotificationTypeBadgeAchievement (line 79) | NotificationTypeBadgeAchievement = "badge"
FILE: internal/base/constant/object_type.go
constant QuestionObjectType (line 23) | QuestionObjectType = "question"
constant AnswerObjectType (line 24) | AnswerObjectType = "answer"
constant TagObjectType (line 25) | TagObjectType = "tag"
constant UserObjectType (line 26) | UserObjectType = "user"
constant CollectionObjectType (line 27) | CollectionObjectType = "collection"
constant CommentObjectType (line 28) | CommentObjectType = "comment"
constant ReportObjectType (line 29) | ReportObjectType = "report"
constant BadgeObjectType (line 30) | BadgeObjectType = "badge"
constant BadgeAwardObjectType (line 31) | BadgeAwardObjectType = "badge_award"
FILE: internal/base/constant/plugin_config_key.go
constant PluginStatus (line 23) | PluginStatus = "plugin.status"
FILE: internal/base/constant/privilege.go
type Privilege (line 24) | type Privilege struct
constant RankQuestionAddKey (line 31) | RankQuestionAddKey = "rank.question.add"
constant RankQuestionEditKey (line 32) | RankQuestionEditKey = "rank.question.edit"
constant RankQuestionDeleteKey (line 33) | RankQuestionDeleteKey = "rank.question.delete"
constant RankQuestionVoteUpKey (line 34) | RankQuestionVoteUpKey = "rank.question.vote_up"
constant RankQuestionVoteDownKey (line 35) | RankQuestionVoteDownKey = "rank.question.vote_down"
constant RankAnswerAddKey (line 36) | RankAnswerAddKey = "rank.answer.add"
constant RankAnswerEditKey (line 37) | RankAnswerEditKey = "rank.answer.edit"
constant RankAnswerDeleteKey (line 38) | RankAnswerDeleteKey = "rank.answer.delete"
constant RankAnswerAcceptKey (line 39) | RankAnswerAcceptKey = "rank.answer.accept"
constant RankAnswerVoteUpKey (line 40) | RankAnswerVoteUpKey = "rank.answer.vote_up"
constant RankAnswerVoteDownKey (line 41) | RankAnswerVoteDownKey = "rank.answer.vote_down"
constant RankInviteSomeoneToAnswerKey (line 42) | RankInviteSomeoneToAnswerKey = "rank.answer.invite_someone_to_answer"
constant RankCommentAddKey (line 43) | RankCommentAddKey = "rank.comment.add"
constant RankCommentEditKey (line 44) | RankCommentEditKey = "rank.comment.edit"
constant RankCommentDeleteKey (line 45) | RankCommentDeleteKey = "rank.comment.delete"
constant RankReportAddKey (line 46) | RankReportAddKey = "rank.report.add"
constant RankTagAddKey (line 47) | RankTagAddKey = "rank.tag.add"
constant RankTagEditKey (line 48) | RankTagEditKey = "rank.tag.edit"
constant RankTagDeleteKey (line 49) | RankTagDeleteKey = "rank.tag.delete"
constant RankTagSynonymKey (line 50) | RankTagSynonymKey = "rank.tag.synonym"
constant RankLinkUrlLimitKey (line 51) | RankLinkUrlLimitKey = "rank.link.url_limit"
constant RankVoteDetailKey (line 52) | RankVoteDetailKey = "rank.vote.detail"
constant RankCommentVoteUpKey (line 53) | RankCommentVoteUpKey = "rank.comment.vote_up"
constant RankCommentVoteDownKey (line 54) | RankCommentVoteDownKey = "rank.comment.vote_down"
constant RankQuestionEditWithoutReviewKey (line 55) | RankQuestionEditWithoutReviewKey = "rank.question.edit_without_review"
constant RankAnswerEditWithoutReviewKey (line 56) | RankAnswerEditWithoutReviewKey = "rank.answer.edit_without_review"
constant RankTagEditWithoutReviewKey (line 57) | RankTagEditWithoutReviewKey = "rank.tag.edit_without_review"
constant RankAnswerAuditKey (line 58) | RankAnswerAuditKey = "rank.answer.audit"
constant RankQuestionAuditKey (line 59) | RankQuestionAuditKey = "rank.question.audit"
constant RankTagAuditKey (line 60) | RankTagAuditKey = "rank.tag.audit"
constant RankQuestionCloseKey (line 61) | RankQuestionCloseKey = "rank.question.close"
constant RankQuestionReopenKey (line 62) | RankQuestionReopenKey = "rank.question.reopen"
constant RankTagUseReservedTagKey (line 63) | RankTagUseReservedTagKey = "rank.tag.use_reserved_tag"
FILE: internal/base/constant/question.go
constant DeletedQuestionTitleTrKey (line 23) | DeletedQuestionTitleTrKey = "question.deleted_title"
constant QuestionsTitleTrKey (line 24) | QuestionsTitleTrKey = "question.questions_title"
constant TagsListTitleTrKey (line 25) | TagsListTitleTrKey = "tag.tags_title"
constant TagHasNoDescription (line 26) | TagHasNoDescription = "tag.no_description"
FILE: internal/base/constant/reason.go
constant ReasonSpam (line 23) | ReasonSpam = "reason.spam"
constant ReasonRudeOrAbusive (line 24) | ReasonRudeOrAbusive = "reason.rude_or_abusive"
constant ReasonSomething (line 25) | ReasonSomething = "reason.something"
constant ReasonADuplicate (line 26) | ReasonADuplicate = "reason.a_duplicate"
constant ReasonNotAAnswer (line 27) | ReasonNotAAnswer = "reason.not_a_answer"
constant ReasonNoLongerNeeded (line 28) | ReasonNoLongerNeeded = "reason.no_longer_needed"
constant ReasonCommunitySpecific (line 29) | ReasonCommunitySpecific = "reason.community_specific"
constant ReasonNotClarity (line 30) | ReasonNotClarity = "reason.not_clarity"
constant ReasonNormal (line 31) | ReasonNormal = "reason.normal"
constant ReasonNormalUser (line 32) | ReasonNormalUser = "reason.normal.user"
constant ReasonClosed (line 33) | ReasonClosed = "reason.closed"
constant ReasonDeleted (line 34) | ReasonDeleted = "reason.deleted"
constant ReasonDeletedUser (line 35) | ReasonDeletedUser = "reason.deleted.user"
constant ReasonSuspended (line 36) | ReasonSuspended = "reason.suspended"
constant ReasonInactive (line 37) | ReasonInactive = "reason.inactive"
constant ReasonLooksOk (line 38) | ReasonLooksOk = "reason.looks_ok"
constant ReasonNeedsEdit (line 39) | ReasonNeedsEdit = "reason.needs_edit"
constant ReasonNeedsClose (line 40) | ReasonNeedsClose = "reason.needs_close"
constant ReasonNeedsDelete (line 41) | ReasonNeedsDelete = "reason.needs_delete"
FILE: internal/base/constant/revision.go
type ReviewingType (line 22) | type ReviewingType
constant QueuedPost (line 25) | QueuedPost ReviewingType = "queued_post"
constant QueuedUser (line 26) | QueuedUser ReviewingType = "queued_user"
constant FlaggedPost (line 27) | FlaggedPost ReviewingType = "flagged_post"
constant FlaggedUser (line 28) | FlaggedUser ReviewingType = "flagged_user"
constant SuggestedPostEdit (line 29) | SuggestedPostEdit ReviewingType = "suggested_post_edit"
constant ReportOperationEditPost (line 33) | ReportOperationEditPost = "edit_post"
constant ReportOperationClosePost (line 34) | ReportOperationClosePost = "close_post"
constant ReportOperationDeletePost (line 35) | ReportOperationDeletePost = "delete_post"
constant ReportOperationUnlistPost (line 36) | ReportOperationUnlistPost = "unlist_post"
constant ReportOperationIgnoreReport (line 37) | ReportOperationIgnoreReport = "ignore_report"
constant ReviewQueuedPostLabel (line 41) | ReviewQueuedPostLabel = "review.queued_post"
constant ReviewFlaggedPostLabel (line 42) | ReviewFlaggedPostLabel = "review.flagged_post"
constant ReviewSuggestedPostEditLabel (line 43) | ReviewSuggestedPostEditLabel = "review.suggested_post_edit"
FILE: internal/base/constant/site_info.go
constant DefaultGravatarBaseURL (line 23) | DefaultGravatarBaseURL = "https://www.gravatar.com/avatar/"
constant DefaultAvatar (line 24) | DefaultAvatar = "system"
constant AvatarTypeDefault (line 25) | AvatarTypeDefault = "default"
constant AvatarTypeGravatar (line 26) | AvatarTypeGravatar = "gravatar"
constant AvatarTypeCustom (line 27) | AvatarTypeCustom = "custom"
constant PermalinkQuestionIDAndTitle (line 32) | PermalinkQuestionIDAndTitle = iota + 1
constant PermalinkQuestionID (line 34) | PermalinkQuestionID
constant PermalinkQuestionIDAndTitleByShortID (line 36) | PermalinkQuestionIDAndTitleByShortID
constant PermalinkQuestionIDByShortID (line 38) | PermalinkQuestionIDByShortID
constant ColorSchemeDefault (line 42) | ColorSchemeDefault = "default"
constant ColorSchemeLight (line 43) | ColorSchemeLight = "light"
constant ColorSchemeDark (line 44) | ColorSchemeDark = "dark"
constant ColorSchemeSystem (line 45) | ColorSchemeSystem = "system"
constant ThemeLayoutFullWidth (line 47) | ThemeLayoutFullWidth = "Full-width"
constant ThemeLayoutFixedWidth (line 48) | ThemeLayoutFixedWidth = "Fixed-width"
constant EmailConfigKey (line 52) | EmailConfigKey = "email.config"
constant DefaultMaxImageMegapixel (line 56) | DefaultMaxImageMegapixel = 40 * 1000 * 1000
constant DefaultMaxImageSize (line 57) | DefaultMaxImageSize = 4 * 1024 * 1024
constant DefaultMaxAttachmentSize (line 58) | DefaultMaxAttachmentSize = 8 * 1024 * 1024
FILE: internal/base/constant/site_type.go
constant SiteTypeLegal (line 24) | SiteTypeLegal = "legal"
constant SiteTypeInterface (line 25) | SiteTypeInterface = "interface"
constant SiteTypeWrite (line 26) | SiteTypeWrite = "write"
constant SiteTypeGeneral (line 28) | SiteTypeGeneral = "general"
constant SiteTypeBranding (line 29) | SiteTypeBranding = "branding"
constant SiteTypeSeo (line 30) | SiteTypeSeo = "seo"
constant SiteTypeLogin (line 31) | SiteTypeLogin = "login"
constant SiteTypeCustomCssHTML (line 32) | SiteTypeCustomCssHTML = "css-html"
constant SiteTypeTheme (line 33) | SiteTypeTheme = "theme"
constant SiteTypePrivileges (line 34) | SiteTypePrivileges = "privileges"
constant SiteTypeUsers (line 35) | SiteTypeUsers = "users"
constant SiteTypeAdvanced (line 37) | SiteTypeAdvanced = "advanced"
constant SiteTypeQuestions (line 38) | SiteTypeQuestions = "questions"
constant SiteTypeTags (line 39) | SiteTypeTags = "tags"
constant SiteTypeUsersSettings (line 41) | SiteTypeUsersSettings = "users_settings"
constant SiteTypeInterfaceSettings (line 42) | SiteTypeInterfaceSettings = "interface_settings"
constant SiteTypePolicies (line 44) | SiteTypePolicies = "policies"
constant SiteTypeSecurity (line 45) | SiteTypeSecurity = "security"
constant SiteTypeAI (line 46) | SiteTypeAI = "ai"
constant SiteTypeFeatureToggle (line 47) | SiteTypeFeatureToggle = "feature-toggle"
constant SiteTypeMCP (line 48) | SiteTypeMCP = "mcp"
FILE: internal/base/constant/upload.go
constant AvatarSubPath (line 23) | AvatarSubPath = "avatar"
constant AvatarThumbSubPath (line 24) | AvatarThumbSubPath = "avatar_thumb"
constant PostSubPath (line 25) | PostSubPath = "post"
constant BrandingSubPath (line 26) | BrandingSubPath = "branding"
constant FilesPostSubPath (line 27) | FilesPostSubPath = "files/post"
constant DeletedSubPath (line 28) | DeletedSubPath = "deleted"
FILE: internal/base/constant/user.go
constant UserNormal (line 23) | UserNormal = "normal"
constant UserSuspended (line 24) | UserSuspended = "suspended"
constant UserDeleted (line 25) | UserDeleted = "deleted"
constant UserInactive (line 26) | UserInactive = "inactive"
constant EmailStatusAvailable (line 29) | EmailStatusAvailable = 1
constant EmailStatusToBeVerified (line 30) | EmailStatusToBeVerified = 2
constant DeletePermanentlyUsers (line 34) | DeletePermanentlyUsers = "users"
constant DeletePermanentlyQuestions (line 35) | DeletePermanentlyQuestions = "questions"
constant DeletePermanentlyAnswers (line 36) | DeletePermanentlyAnswers = "answers"
function ConvertUserStatus (line 39) | func ConvertUserStatus(status, mailStatus int) string {
FILE: internal/base/cron/cron.go
type ScheduledTaskManager (line 36) | type ScheduledTaskManager struct
method Run (line 62) | func (s *ScheduledTaskManager) Run() {
function NewScheduledTaskManager (line 45) | func NewScheduledTaskManager(
FILE: internal/base/data/config.go
type Database (line 23) | type Database struct
type CacheConf (line 32) | type CacheConf struct
FILE: internal/base/data/data.go
type Data (line 41) | type Data struct
function NewData (line 47) | func NewData(db *xorm.Engine, cache cache.Cache) (*Data, func(), error) {
function NewDB (line 56) | func NewDB(debug bool, dataConf *Database) (*xorm.Engine, error) {
function NewCache (line 98) | func NewCache(c *CacheConf) (cache.Cache, func(), error) {
FILE: internal/base/handler/handler.go
function HandleResponse (line 34) | func HandleResponse(ctx *gin.Context, err error, data any) {
function BindAndCheck (line 64) | func BindAndCheck(ctx *gin.Context, data any) bool {
function BindAndCheckReturnErr (line 81) | func BindAndCheckReturnErr(ctx *gin.Context, data any) (errFields []*val...
FILE: internal/base/handler/lang.go
function GetLangByCtx (line 31) | func GetLangByCtx(ctx context.Context) i18n.Language {
FILE: internal/base/handler/response.go
type RespBody (line 29) | type RespBody struct
method TrMsg (line 41) | func (r *RespBody) TrMsg(lang i18n.Language) *RespBody {
function NewRespBody (line 49) | func NewRespBody(code int, reason string) *RespBody {
function NewRespBodyFromError (line 57) | func NewRespBodyFromError(e *errors.Error) *RespBody {
function NewRespBodyData (line 66) | func NewRespBodyData(code int, reason string, data any) *RespBody {
FILE: internal/base/handler/short_id.go
function GetEnableShortID (line 29) | func GetEnableShortID(ctx context.Context) bool {
FILE: internal/base/middleware/accept_language.go
function ExtractAndSetAcceptLanguage (line 33) | func ExtractAndSetAcceptLanguage(ctx *gin.Context) {
FILE: internal/base/middleware/api_key_auth.go
method AuthAPIKey (line 30) | func (am *AuthUserMiddleware) AuthAPIKey() gin.HandlerFunc {
FILE: internal/base/middleware/auth.go
type AuthUserMiddleware (line 44) | type AuthUserMiddleware struct
method Auth (line 60) | func (am *AuthUserMiddleware) Auth() gin.HandlerFunc {
method EjectUserBySiteInfo (line 80) | func (am *AuthUserMiddleware) EjectUserBySiteInfo() gin.HandlerFunc {
method MustAuthWithoutAccountAvailable (line 111) | func (am *AuthUserMiddleware) MustAuthWithoutAccountAvailable() gin.Ha...
method MustAuthAndAccountAvailable (line 136) | func (am *AuthUserMiddleware) MustAuthAndAccountAvailable() gin.Handle...
method AdminAuth (line 172) | func (am *AuthUserMiddleware) AdminAuth() gin.HandlerFunc {
method CheckPrivateMode (line 198) | func (am *AuthUserMiddleware) CheckPrivateMode() gin.HandlerFunc {
function NewAuthUserMiddleware (line 50) | func NewAuthUserMiddleware(
function ShowIndexPage (line 214) | func ShowIndexPage(ctx *gin.Context) {
function GetLoginUserIDFromContext (line 227) | func GetLoginUserIDFromContext(ctx *gin.Context) (userID string) {
function GetIsAdminFromContext (line 236) | func GetIsAdminFromContext(ctx *gin.Context) (isAdmin bool) {
function GetUserInfoFromContext (line 245) | func GetUserInfoFromContext(ctx *gin.Context) (u *entity.UserCacheInfo) {
function GetUserIsAdminModerator (line 257) | func GetUserIsAdminModerator(ctx *gin.Context) (isAdminModerator bool) {
function GetLoginUserIDInt64FromContext (line 272) | func GetLoginUserIDInt64FromContext(ctx *gin.Context) (userID int64) {
function ExtractToken (line 278) | func ExtractToken(ctx *gin.Context) (token string) {
FILE: internal/base/middleware/avatar.go
type AvatarMiddleware (line 38) | type AvatarMiddleware struct
method AvatarThumb (line 53) | func (am *AvatarMiddleware) AvatarThumb() gin.HandlerFunc {
function NewAvatarMiddleware (line 44) | func NewAvatarMiddleware(serviceConfig *service_config.ServiceConfig,
FILE: internal/base/middleware/header.go
function HeadersByRequestURI (line 28) | func HeadersByRequestURI() gin.HandlerFunc {
FILE: internal/base/middleware/mcp_auth.go
method AuthMcpEnable (line 31) | func (am *AuthUserMiddleware) AuthMcpEnable() gin.HandlerFunc {
FILE: internal/base/middleware/rate_limit.go
type RateLimitMiddleware (line 35) | type RateLimitMiddleware struct
method DuplicateRequestRejection (line 48) | func (rm *RateLimitMiddleware) DuplicateRequestRejection(ctx *gin.Cont...
method DuplicateRequestClear (line 68) | func (rm *RateLimitMiddleware) DuplicateRequestClear(ctx *gin.Context,...
function NewRateLimitMiddleware (line 40) | func NewRateLimitMiddleware(limitRepo *limit.LimitRepo) *RateLimitMiddle...
FILE: internal/base/middleware/short_id.go
type ShortIDMiddleware (line 29) | type ShortIDMiddleware struct
method SetShortIDFlag (line 39) | func (sm *ShortIDMiddleware) SetShortIDFlag() gin.HandlerFunc {
function NewShortIDMiddleware (line 33) | func NewShortIDMiddleware(siteInfoService siteinfo_common.SiteInfoCommon...
FILE: internal/base/middleware/user_center_plugin_auth.go
function BanAPIForUserCenter (line 31) | func BanAPIForUserCenter(ctx *gin.Context) {
FILE: internal/base/middleware/visit_img_auth.go
method VisitAuth (line 32) | func (am *AuthUserMiddleware) VisitAuth() gin.HandlerFunc {
FILE: internal/base/pager/pager.go
function Help (line 30) | func Help(page, pageSize int, rowsSlicePtr any, rowElement any, session ...
FILE: internal/base/pager/pagination.go
type PageModel (line 27) | type PageModel struct
type PageCond (line 33) | type PageCond struct
function NewPageModel (line 39) | func NewPageModel(totalRecords int64, records any) *PageModel {
function ValPageAndPageSize (line 56) | func ValPageAndPageSize(page, pageSize int) (int, int) {
function ValPageOutOfRange (line 67) | func ValPageOutOfRange(total int64, page, pageSize int) bool {
FILE: internal/base/path/path.go
constant DefaultConfigFileName (line 28) | DefaultConfigFileName = "config.yaml"
constant DefaultCacheFileName (line 29) | DefaultCacheFileName = "cache.db"
constant DefaultReservedUsernamesConfigFileName (line 30) | DefaultReservedUsernamesConfigFileName = "reserved-usernames.json"
function FormatAllPath (line 41) | func FormatAllPath(dataDirPath string) {
function GetConfigFilePath (line 51) | func GetConfigFilePath() string {
FILE: internal/base/queue/queue.go
type Service (line 29) | type Service interface
type Queue (line 42) | type Queue struct
function New (line 52) | func New[T any](name string, bufferSize int) *Queue[T] {
method Send (line 63) | func (q *Queue[T]) Send(ctx context.Context, msg T) {
method RegisterHandler (line 82) | func (q *Queue[T]) RegisterHandler(handler func(ctx context.Context, msg...
method Close (line 89) | func (q *Queue[T]) Close() {
method startWorker (line 104) | func (q *Queue[T]) startWorker() {
method processMessage (line 115) | func (q *Queue[T]) processMessage(msg T) {
FILE: internal/base/queue/queue_test.go
type testMessage (line 31) | type testMessage struct
function TestQueue_SendAndReceive (line 36) | func TestQueue_SendAndReceive(t *testing.T) {
function TestQueue_MultipleMessages (line 59) | func TestQueue_MultipleMessages(t *testing.T) {
function TestQueue_NoHandlerDropsMessage (line 94) | func TestQueue_NoHandlerDropsMessage(t *testing.T) {
function TestQueue_RegisterHandlerAfterSend (line 105) | func TestQueue_RegisterHandlerAfterSend(t *testing.T) {
function TestQueue_Close (line 135) | func TestQueue_Close(t *testing.T) {
function TestQueue_ConcurrentSend (line 161) | func TestQueue_ConcurrentSend(t *testing.T) {
function TestQueue_ConcurrentRegisterHandler (line 196) | func TestQueue_ConcurrentRegisterHandler(t *testing.T) {
function TestQueue_SendCloseRace (line 218) | func TestQueue_SendCloseRace(t *testing.T) {
FILE: internal/base/reason/privilege.go
constant PrivilegeLevel1Desc (line 23) | PrivilegeLevel1Desc = "privilege.level_1.description"
constant PrivilegeLevel2Desc (line 24) | PrivilegeLevel2Desc = "privilege.level_2.description"
constant PrivilegeLevel3Desc (line 25) | PrivilegeLevel3Desc = "privilege.level_3.description"
constant PrivilegeLevelCustomDesc (line 26) | PrivilegeLevelCustomDesc = "privilege.level_custom.description"
constant RankQuestionAddLabel (line 28) | RankQuestionAddLabel = "privilege.rank_question_add_label"
constant RankAnswerAddLabel (line 29) | RankAnswerAddLabel = "privilege.rank_answer_add_label"
constant RankCommentAddLabel (line 30) | RankCommentAddLabel = "privilege.rank_comment_add_label"
constant RankReportAddLabel (line 31) | RankReportAddLabel = "privilege.rank_report_add_label"
constant RankCommentVoteUpLabel (line 32) | RankCommentVoteUpLabel = "privilege.rank_comment_vote_up_label"
constant RankLinkUrlLimitLabel (line 33) | RankLinkUrlLimitLabel = "privilege.rank_link_url_limit_label"
constant RankQuestionVoteUpLabel (line 34) | RankQuestionVoteUpLabel = "privilege.rank_question_vote_up_la...
constant RankAnswerVoteUpLabel (line 35) | RankAnswerVoteUpLabel = "privilege.rank_answer_vote_up_label"
constant RankQuestionVoteDownLabel (line 36) | RankQuestionVoteDownLabel = "privilege.rank_question_vote_down_...
constant RankAnswerVoteDownLabel (line 37) | RankAnswerVoteDownLabel = "privilege.rank_answer_vote_down_la...
constant RankInviteSomeoneToAnswerLabel (line 38) | RankInviteSomeoneToAnswerLabel = "privilege.rank_invite_someone_to_a...
constant RankTagAddLabel (line 39) | RankTagAddLabel = "privilege.rank_tag_add_label"
constant RankTagEditLabel (line 40) | RankTagEditLabel = "privilege.rank_tag_edit_label"
constant RankQuestionEditLabel (line 41) | RankQuestionEditLabel = "privilege.rank_question_edit_label"
constant RankAnswerEditLabel (line 42) | RankAnswerEditLabel = "privilege.rank_answer_edit_label"
constant RankQuestionEditWithoutReviewLabel (line 43) | RankQuestionEditWithoutReviewLabel = "privilege.rank_question_edit_witho...
constant RankAnswerEditWithoutReviewLabel (line 44) | RankAnswerEditWithoutReviewLabel = "privilege.rank_answer_edit_without...
constant RankQuestionAuditLabel (line 45) | RankQuestionAuditLabel = "privilege.rank_question_audit_label"
constant RankAnswerAuditLabel (line 46) | RankAnswerAuditLabel = "privilege.rank_answer_audit_label"
constant RankTagAuditLabel (line 47) | RankTagAuditLabel = "privilege.rank_tag_audit_label"
constant RankTagEditWithoutReviewLabel (line 48) | RankTagEditWithoutReviewLabel = "privilege.rank_tag_edit_without_re...
constant RankTagSynonymLabel (line 49) | RankTagSynonymLabel = "privilege.rank_tag_synonym_label"
FILE: internal/base/reason/reason.go
constant Success (line 24) | Success = "base.success"
constant UnknownError (line 26) | UnknownError = "base.unknown"
constant RequestFormatError (line 28) | RequestFormatError = "base.request_format_error"
constant UnauthorizedError (line 30) | UnauthorizedError = "base.unauthorized_error"
constant DatabaseError (line 32) | DatabaseError = "base.database_error"
constant ForbiddenError (line 34) | ForbiddenError = "base.forbidden_error"
constant DuplicateRequestError (line 36) | DuplicateRequestError = "base.duplicate_request_error"
constant EmailOrPasswordWrong (line 40) | EmailOrPasswordWrong = "error.object.email_or_password_incor...
constant CommentNotFound (line 41) | CommentNotFound = "error.comment.not_found"
constant CommentCannotEditAfterDeadline (line 42) | CommentCannotEditAfterDeadline = "error.comment.cannot_edit_after_dead...
constant QuestionNotFound (line 43) | QuestionNotFound = "error.question.not_found"
constant QuestionCannotDeleted (line 44) | QuestionCannotDeleted = "error.question.cannot_deleted"
constant QuestionCannotClose (line 45) | QuestionCannotClose = "error.question.cannot_close"
constant QuestionCannotUpdate (line 46) | QuestionCannotUpdate = "error.question.cannot_update"
constant QuestionAlreadyDeleted (line 47) | QuestionAlreadyDeleted = "error.question.already_deleted"
constant QuestionUnderReview (line 48) | QuestionUnderReview = "error.question.under_review"
constant QuestionContentCannotEmpty (line 49) | QuestionContentCannotEmpty = "error.question.content_cannot_empty"
constant QuestionContentLessThanMinimum (line 50) | QuestionContentLessThanMinimum = "error.question.content_less_than_min...
constant AnswerNotFound (line 51) | AnswerNotFound = "error.answer.not_found"
constant AnswerCannotDeleted (line 52) | AnswerCannotDeleted = "error.answer.cannot_deleted"
constant AnswerCannotUpdate (line 53) | AnswerCannotUpdate = "error.answer.cannot_update"
constant AnswerCannotAddByClosedQuestion (line 54) | AnswerCannotAddByClosedQuestion = "error.answer.question_closed_cannot_...
constant AnswerRestrictAnswer (line 55) | AnswerRestrictAnswer = "error.answer.restrict_answer"
constant AnswerContentCannotEmpty (line 56) | AnswerContentCannotEmpty = "error.answer.content_cannot_empty"
constant CommentEditWithoutPermission (line 57) | CommentEditWithoutPermission = "error.comment.edit_without_permission"
constant CommentContentCannotEmpty (line 58) | CommentContentCannotEmpty = "error.comment.content_cannot_empty"
constant DisallowVote (line 59) | DisallowVote = "error.object.disallow_vote"
constant DisallowFollow (line 60) | DisallowFollow = "error.object.disallow_follow"
constant DisallowVoteYourSelf (line 61) | DisallowVoteYourSelf = "error.object.disallow_vote_your_self"
constant CaptchaVerificationFailed (line 62) | CaptchaVerificationFailed = "error.object.captcha_verification_fa...
constant OldPasswordVerificationFailed (line 63) | OldPasswordVerificationFailed = "error.object.old_password_verificati...
constant NewPasswordSameAsPreviousSetting (line 64) | NewPasswordSameAsPreviousSetting = "error.object.new_password_same_as_pr...
constant NewObjectAlreadyDeleted (line 65) | NewObjectAlreadyDeleted = "error.object.already_deleted"
constant UserNotFound (line 66) | UserNotFound = "error.user.not_found"
constant UsernameInvalid (line 67) | UsernameInvalid = "error.user.username_invalid"
constant UsernameDuplicate (line 68) | UsernameDuplicate = "error.user.username_duplicate"
constant UserSetAvatar (line 69) | UserSetAvatar = "error.user.set_avatar"
constant EmailDuplicate (line 70) | EmailDuplicate = "error.email.duplicate"
constant EmailVerifyURLExpired (line 71) | EmailVerifyURLExpired = "error.email.verify_url_expired"
constant EmailNeedToBeVerified (line 72) | EmailNeedToBeVerified = "error.email.need_to_be_verified"
constant EmailIllegalDomainError (line 73) | EmailIllegalDomainError = "error.email.illegal_email_domain_error"
constant UserSuspended (line 74) | UserSuspended = "error.user.suspended"
constant ObjectNotFound (line 75) | ObjectNotFound = "error.object.not_found"
constant TagNotFound (line 76) | TagNotFound = "error.tag.not_found"
constant TagNotContainSynonym (line 77) | TagNotContainSynonym = "error.tag.not_contain_synonym_tags"
constant TagCannotUpdate (line 78) | TagCannotUpdate = "error.tag.cannot_update"
constant TagIsUsedCannotDelete (line 79) | TagIsUsedCannotDelete = "error.tag.is_used_cannot_delete"
constant TagAlreadyExist (line 80) | TagAlreadyExist = "error.tag.already_exist"
constant TagMinCount (line 81) | TagMinCount = "error.tag.minimum_count"
constant RankFailToMeetTheCondition (line 82) | RankFailToMeetTheCondition = "error.rank.fail_to_meet_the_condition"
constant VoteRankFailToMeetTheCondition (line 83) | VoteRankFailToMeetTheCondition = "error.rank.vote_fail_to_meet_the_con...
constant NoEnoughRankToOperate (line 84) | NoEnoughRankToOperate = "error.rank.no_enough_rank_to_operate"
constant ThemeNotFound (line 85) | ThemeNotFound = "error.theme.not_found"
constant LangNotFound (line 86) | LangNotFound = "error.lang.not_found"
constant ReportHandleFailed (line 87) | ReportHandleFailed = "error.report.handle_failed"
constant ReportNotFound (line 88) | ReportNotFound = "error.report.not_found"
constant ReadConfigFailed (line 89) | ReadConfigFailed = "error.config.read_config_failed"
constant DatabaseConnectionFailed (line 90) | DatabaseConnectionFailed = "error.database.connection_failed"
constant InstallCreateTableFailed (line 91) | InstallCreateTableFailed = "error.database.create_table_failed"
constant InstallConfigFailed (line 92) | InstallConfigFailed = "error.install.create_config_failed"
constant SiteInfoConfigNotFound (line 93) | SiteInfoConfigNotFound = "error.site_info.config_not_found"
constant UploadFileSourceUnsupported (line 94) | UploadFileSourceUnsupported = "error.upload.source_unsupported"
constant UploadFileUnsupportedFileFormat (line 95) | UploadFileUnsupportedFileFormat = "error.upload.unsupported_file_format"
constant RecommendTagNotExist (line 96) | RecommendTagNotExist = "error.tag.recommend_tag_not_found"
constant RecommendTagEnter (line 97) | RecommendTagEnter = "error.tag.recommend_tag_enter"
constant RevisionReviewUnderway (line 98) | RevisionReviewUnderway = "error.revision.review_underway"
constant RevisionNoPermission (line 99) | RevisionNoPermission = "error.revision.no_permission"
constant UserCannotUpdateYourRole (line 100) | UserCannotUpdateYourRole = "error.user.cannot_update_your_role"
constant TagCannotSetSynonymAsItself (line 101) | TagCannotSetSynonymAsItself = "error.tag.cannot_set_synonym_as_itself"
constant NotAllowedRegistration (line 102) | NotAllowedRegistration = "error.user.not_allowed_registration"
constant NotAllowedLoginViaPassword (line 103) | NotAllowedLoginViaPassword = "error.user.not_allowed_login_via_pas...
constant SMTPConfigFromNameCannotBeEmail (line 104) | SMTPConfigFromNameCannotBeEmail = "error.smtp.config_from_name_cannot_b...
constant AdminCannotUpdateTheirPassword (line 105) | AdminCannotUpdateTheirPassword = "error.admin.cannot_update_their_pass...
constant AdminCannotEditTheirProfile (line 106) | AdminCannotEditTheirProfile = "error.admin.cannot_edit_their_profile"
constant AdminCannotModifySelfStatus (line 107) | AdminCannotModifySelfStatus = "error.admin.cannot_modify_self_status"
constant UserAccessDenied (line 108) | UserAccessDenied = "error.user.access_denied"
constant UserPageAccessDenied (line 109) | UserPageAccessDenied = "error.user.page_access_denied"
constant AddBulkUsersFormatError (line 110) | AddBulkUsersFormatError = "error.user.add_bulk_users_format_error"
constant AddBulkUsersAmountError (line 111) | AddBulkUsersAmountError = "error.user.add_bulk_users_amount_error"
constant InvalidURLError (line 112) | InvalidURLError = "error.common.invalid_url"
constant MetaObjectNotFound (line 113) | MetaObjectNotFound = "error.meta.object_not_found"
constant BadgeObjectNotFound (line 114) | BadgeObjectNotFound = "error.badge.object_not_found"
constant StatusInvalid (line 115) | StatusInvalid = "error.common.status_invalid"
constant UserStatusInactive (line 116) | UserStatusInactive = "error.user.status_inactive"
constant UserStatusSuspendedForever (line 117) | UserStatusSuspendedForever = "error.user.status_suspended_forever"
constant UserStatusSuspendedUntil (line 118) | UserStatusSuspendedUntil = "error.user.status_suspended_until"
constant UserStatusDeleted (line 119) | UserStatusDeleted = "error.user.status_deleted"
constant ErrFeatureDisabled (line 120) | ErrFeatureDisabled = "error.feature.disabled"
constant UserExternalLoginUnbindingForbidden (line 125) | UserExternalLoginUnbindingForbidden = "error.user.external_login_unbindi...
constant UserExternalLoginMissingUserID (line 126) | UserExternalLoginMissingUserID = "error.user.external_login_missing...
FILE: internal/base/server/config.go
type HTTP (line 23) | type HTTP struct
type UI (line 28) | type UI struct
FILE: internal/base/server/http.go
function NewHTTPServer (line 37) | func NewHTTPServer(debug bool,
FILE: internal/base/server/http_funcmap.go
function FormatLinkNofollow (line 140) | func FormatLinkNofollow(html string) string {
FILE: internal/base/translator/config.go
type I18n (line 23) | type I18n struct
FILE: internal/base/translator/provider.go
type LangOption (line 41) | type LangOption struct
constant DefaultLangOption (line 49) | DefaultLangOption = "Default"
function NewTranslator (line 57) | func NewTranslator(c *I18n) (tr i18n.Translator, err error) {
function CheckLanguageIsValid (line 131) | func CheckLanguageIsValid(lang string) bool {
function Tr (line 144) | func Tr(lang i18n.Language, data string) string {
function TrWithData (line 156) | func TrWithData(lang i18n.Language, key string, templateData any) string {
function reportTranslatorFormatError (line 169) | func reportTranslatorFormatError(fileName string, content []byte) {
function inspectTranslatorNode (line 180) | func inspectTranslatorNode(node any, path []string, isRoot bool) error {
function isMessageMap (line 270) | func isMessageMap(data any) bool {
function formatTranslationPath (line 306) | func formatTranslationPath(path []string) string {
FILE: internal/base/validator/validator.go
type TranslatorLocal (line 62) | type TranslatorLocal struct
type MyValidator (line 86) | type MyValidator struct
method Check (line 190) | func (m *MyValidator) Check(value any) (errFields []*FormErrorField, e...
type FormErrorField (line 93) | type FormErrorField struct
function init (line 101) | func init() {
function getTran (line 113) | func getTran(lo locales.Translator) ut.Translator {
function NotBlank (line 121) | func NotBlank(fl validator.FieldLevel) (res bool) {
function Sanitizer (line 140) | func Sanitizer(fl validator.FieldLevel) (res bool) {
function createDefaultValidator (line 157) | func createDefaultValidator(la i18n.Language) *validator.Validate {
function GetValidatorByLang (line 182) | func GetValidatorByLang(lang i18n.Language) *MyValidator {
type Checker (line 260) | type Checker interface
function getObjectTagByFieldName (line 264) | func getObjectTagByFieldName(obj any, fieldName string) (tag string) {
FILE: internal/cli/build.go
constant mainGoTpl (line 42) | mainGoTpl = `package main
constant goModTpl (line 62) | goModTpl = `module answer
type answerBuilder (line 68) | type answerBuilder struct
method DoTask (line 115) | func (a *answerBuilder) DoTask(task func(b *buildingMaterial) error) {
type buildingMaterial (line 73) | type buildingMaterial struct
method newExecCmd (line 513) | func (b *buildingMaterial) newExecCmd(command string, args ...string) ...
type OriginalAnswerInfo (line 81) | type OriginalAnswerInfo struct
type pluginInfo (line 87) | type pluginInfo struct
function newAnswerBuilder (line 96) | func newAnswerBuilder(buildDir, outputPath string, plugins []string, ori...
function BuildNewAnswer (line 123) | func BuildNewAnswer(buildDir, outputPath string, plugins []string, origi...
function formatPlugins (line 136) | func formatPlugins(plugins []string) (formatted []*pluginInfo) {
function createMainGoFile (line 149) | func createMainGoFile(b *buildingMaterial) (err error) {
function downloadGoModFile (line 202) | func downloadGoModFile(b *buildingMaterial) (err error) {
function movePluginToVendor (line 226) | func movePluginToVendor(b *buildingMaterial) (err error) {
function copyUIFiles (line 243) | func copyUIFiles(b *buildingMaterial) (err error) {
function buildUI (line 303) | func buildUI(b *buildingMaterial) (err error) {
function mergeI18nFiles (line 321) | func mergeI18nFiles(b *buildingMaterial) (err error) {
function copyDirEntries (line 408) | func copyDirEntries(sourceFs fs.FS, sourceDir, targetDir string, ignoreD...
function formatUIPluginsDirName (line 475) | func formatUIPluginsDirName(dirPath string) {
function buildBinary (line 495) | func buildBinary(b *buildingMaterial) (err error) {
function cleanByproduct (line 509) | func cleanByproduct(b *buildingMaterial) (err error) {
function versionedModulePath (line 522) | func versionedModulePath(modulePath, moduleVersion string) string {
FILE: internal/cli/config.go
type ConfigField (line 33) | type ConfigField struct
function SetDefaultConfig (line 40) | func SetDefaultConfig(dbConf *data.Database, cacheConf *data.CacheConf, ...
function defaultLoginConfig (line 70) | func defaultLoginConfig(x *xorm.Engine) (err error) {
function deactivatePlugin (line 94) | func deactivatePlugin(x *xorm.Engine, pluginSlugName string) (err error) {
FILE: internal/cli/dump.go
function DumpAllData (line 32) | func DumpAllData(dataConf *data.Database, dumpDataPath string) error {
FILE: internal/cli/i18n.go
type YamlPluginContent (line 34) | type YamlPluginContent struct
function ReplaceI18nFilesLocal (line 39) | func ReplaceI18nFilesLocal(i18nDir string) error {
function MergeI18nFilesLocal (line 71) | func MergeI18nFilesLocal(originalI18nDir, targetI18nDir string) (err err...
function findI18nFileInDir (line 118) | func findI18nFileInDir(pluginAllTranslations map[string]*YamlPluginConte...
FILE: internal/cli/install.go
function InstallAllInitialEnvironment (line 35) | func InstallAllInitialEnvironment(dataDirPath string) {
function InstallConfigFile (line 42) | func InstallConfigFile(configFilePath string) error {
function installUploadDir (line 68) | func installUploadDir() {
function InstallI18nBundle (line 77) | func InstallI18nBundle(replace bool) {
FILE: internal/cli/install_check.go
function CheckConfigFile (line 31) | func CheckConfigFile(configPath string) bool {
function CheckUploadDir (line 35) | func CheckUploadDir() bool {
function CheckDBConnection (line 40) | func CheckDBConnection(dataConf *data.Database) bool {
function CheckDBTableExist (line 58) | func CheckDBTableExist(dataConf *data.Database) bool {
FILE: internal/cli/reset_password.go
constant charsetLower (line 49) | charsetLower = "abcdefghijklmnopqrstuvwxyz"
constant charsetUpper (line 50) | charsetUpper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
constant charsetDigits (line 51) | charsetDigits = "0123456789"
constant charsetSpecial (line 52) | charsetSpecial = "!@#$%^&*~?_-"
constant maxRetries (line 53) | maxRetries = 10
constant defaultRandomPasswordLength (line 54) | defaultRandomPasswordLength = 12
type ResetPasswordOptions (line 64) | type ResetPasswordOptions struct
function ResetPassword (line 69) | func ResetPassword(ctx context.Context, dataDirPath string, opts *ResetP...
function promptForPassword (line 160) | func promptForPassword() (string, error) {
function generateRandomPasswordWithRetry (line 197) | func generateRandomPasswordWithRetry() (string, error) {
function getPasswordInput (line 217) | func getPasswordInput(prompt string) (string, error) {
function generateRandomPassword (line 227) | func generateRandomPassword(length int) (string, error) {
function initDatabase (line 261) | func initDatabase(driver, connection string) (*xorm.Engine, error) {
function printWarning (line 275) | func printWarning(msg string) {
function confirmAction (line 283) | func confirmAction(prompt string) bool {
FILE: internal/controller/activity_controller.go
type ActivityController (line 32) | type ActivityController struct
method GetObjectTimeline (line 53) | func (ac *ActivityController) GetObjectTimeline(ctx *gin.Context) {
method GetObjectTimelineDetail (line 77) | func (ac *ActivityController) GetObjectTimelineDetail(ctx *gin.Context) {
function NewActivityController (line 37) | func NewActivityController(
FILE: internal/controller/ai_controller.go
type AIController (line 54) | type AIController struct
method ensureAIChatEnabled (line 94) | func (c *AIController) ensureAIChatEnabled(ctx *gin.Context) bool {
method ChatCompletions (line 189) | func (c *AIController) ChatCompletions(ctx *gin.Context) {
method redirectRequestToAI (line 271) | func (c *AIController) redirectRequestToAI(ctx *gin.Context, w http.Re...
method createOpenAIClient (line 278) | func (c *AIController) createOpenAIClient() *openai.Client {
method getPromptByLanguage (line 304) | func (c *AIController) getPromptByLanguage(language i18n.Language, que...
method getDefaultPrompt (line 330) | func (c *AIController) getDefaultPrompt(language i18n.Language, questi...
method initializeConversationContext (line 342) | func (c *AIController) initializeConversationContext(ctx *gin.Context,...
method buildInitialMessages (line 384) | func (c *AIController) buildInitialMessages(ctx *gin.Context, req *Cha...
method saveConversationRecord (line 407) | func (c *AIController) saveConversationRecord(ctx context.Context, cha...
method handleAIConversation (line 432) | func (c *AIController) handleAIConversation(ctx *gin.Context, w http.R...
method processAIStream (line 471) | func (c *AIController) processAIStream(
method executeToolCalls (line 587) | func (c *AIController) executeToolCalls(ctx *gin.Context, _ http.Respo...
method sendErrorResponse (line 648) | func (c *AIController) sendErrorResponse(w http.ResponseWriter, id, mo...
method getMCPTools (line 668) | func (c *AIController) getMCPTools() []openai.Tool {
method convertMCPToolToOpenAI (line 679) | func (c *AIController) convertMCPToolToOpenAI(mcpTool mcp.Tool) openai...
method callMCPTool (line 707) | func (c *AIController) callMCPTool(ctx context.Context, toolName strin...
function NewAIController (line 68) | func NewAIController(
type ChatCompletionsRequest (line 105) | type ChatCompletionsRequest struct
type Message (line 111) | type Message struct
type ChatCompletionsResponse (line 116) | type ChatCompletionsResponse struct
type StreamResponse (line 125) | type StreamResponse struct
type Choice (line 133) | type Choice struct
type StreamChoice (line 139) | type StreamChoice struct
type Delta (line 145) | type Delta struct
type Usage (line 150) | type Usage struct
type ConversationContext (line 156) | type ConversationContext struct
method GetOpenAIMessages (line 165) | func (c *ConversationContext) GetOpenAIMessages() []openai.ChatComplet...
function sendStreamData (line 177) | func sendStreamData(w http.ResponseWriter, data StreamResponse) {
FILE: internal/controller/ai_conversation_controller.go
type AIConversationController (line 32) | type AIConversationController struct
method ensureEnabled (line 48) | func (ctrl *AIConversationController) ensureEnabled(ctx *gin.Context) ...
method GetConversationList (line 69) | func (ctrl *AIConversationController) GetConversationList(ctx *gin.Con...
method GetConversationDetail (line 93) | func (ctrl *AIConversationController) GetConversationDetail(ctx *gin.C...
method VoteRecord (line 117) | func (ctrl *AIConversationController) VoteRecord(ctx *gin.Context) {
function NewAIConversationController (line 38) | func NewAIConversationController(
FILE: internal/controller/answer_controller.go
type AnswerController (line 44) | type AnswerController struct
method RemoveAnswer (line 79) | func (ac *AnswerController) RemoveAnswer(ctx *gin.Context) {
method RecoverAnswer (line 130) | func (ac *AnswerController) RecoverAnswer(ctx *gin.Context) {
method GetAnswerInfo (line 163) | func (ac *AnswerController) GetAnswerInfo(ctx *gin.Context) {
method AddAnswer (line 193) | func (ac *AnswerController) AddAnswer(ctx *gin.Context) {
method UpdateAnswer (line 305) | func (ac *AnswerController) UpdateAnswer(ctx *gin.Context) {
method AnswerList (line 371) | func (ac *AnswerController) AnswerList(ctx *gin.Context) {
method AcceptAnswer (line 414) | func (ac *AnswerController) AcceptAnswer(ctx *gin.Context) {
method AdminUpdateAnswerStatus (line 447) | func (ac *AnswerController) AdminUpdateAnswerStatus(ctx *gin.Context) {
function NewAnswerController (line 53) | func NewAnswerController(
FILE: internal/controller/badge_controller.go
type BadgeController (line 32) | type BadgeController struct
method GetBadgeList (line 54) | func (b *BadgeController) GetBadgeList(ctx *gin.Context) {
method GetBadgeInfo (line 69) | func (b *BadgeController) GetBadgeInfo(ctx *gin.Context) {
method GetBadgeAwardList (line 90) | func (b *BadgeController) GetBadgeAwardList(ctx *gin.Context) {
method GetAllBadgeAwardListByUsername (line 114) | func (b *BadgeController) GetAllBadgeAwardListByUsername(ctx *gin.Cont...
method GetRecentBadgeAwardListByUsername (line 138) | func (b *BadgeController) GetRecentBadgeAwardListByUsername(ctx *gin.C...
function NewBadgeController (line 37) | func NewBadgeController(
FILE: internal/controller/collection_controller.go
type CollectionController (line 32) | type CollectionController struct
method CollectionSwitch (line 51) | func (cc *CollectionController) CollectionSwitch(ctx *gin.Context) {
function NewCollectionController (line 37) | func NewCollectionController(collectionService *collection.CollectionSer...
FILE: internal/controller/comment_controller.go
type CommentController (line 42) | type CommentController struct
method AddComment (line 74) | func (cc *CommentController) AddComment(ctx *gin.Context) {
method RemoveComment (line 144) | func (cc *CommentController) RemoveComment(ctx *gin.Context) {
method UpdateComment (line 190) | func (cc *CommentController) UpdateComment(ctx *gin.Context) {
method GetCommentWithPage (line 243) | func (cc *CommentController) GetCommentWithPage(ctx *gin.Context) {
method GetCommentPersonalWithPage (line 276) | func (cc *CommentController) GetCommentPersonalWithPage(ctx *gin.Conte...
method GetComment (line 296) | func (cc *CommentController) GetComment(ctx *gin.Context) {
function NewCommentController (line 50) | func NewCommentController(
FILE: internal/controller/connector_controller.go
constant commonRouterPrefix (line 38) | commonRouterPrefix = "/answer/api/v1"
constant ConnectorLoginRouterPrefix (line 39) | ConnectorLoginRouterPrefix = "/connector/login/"
constant ConnectorRedirectRouterPrefix (line 40) | ConnectorRedirectRouterPrefix = "/connector/redirect/"
type ConnectorController (line 44) | type ConnectorController struct
method ConnectorLoginDispatcher (line 66) | func (cc *ConnectorController) ConnectorLoginDispatcher(ctx *gin.Conte...
method ConnectorRedirectDispatcher (line 83) | func (cc *ConnectorController) ConnectorRedirectDispatcher(ctx *gin.Co...
method ConnectorLogin (line 100) | func (cc *ConnectorController) ConnectorLogin(connector plugin.Connect...
method ConnectorRedirect (line 118) | func (cc *ConnectorController) ConnectorRedirect(connector plugin.Conn...
method ConnectorsInfo (line 172) | func (cc *ConnectorController) ConnectorsInfo(ctx *gin.Context) {
method ExternalLoginBindingUserSendEmail (line 202) | func (cc *ConnectorController) ExternalLoginBindingUserSendEmail(ctx *...
method ConnectorsUserInfo (line 220) | func (cc *ConnectorController) ConnectorsUserInfo(ctx *gin.Context) {
method ExternalLoginUnbinding (line 266) | func (cc *ConnectorController) ExternalLoginUnbinding(ctx *gin.Context) {
function NewConnectorController (line 51) | func NewConnectorController(
FILE: internal/controller/dashboard_controller.go
type DashboardController (line 28) | type DashboardController struct
method DashboardInfo (line 50) | func (ac *DashboardController) DashboardInfo(ctx *gin.Context) {
function NewDashboardController (line 33) | func NewDashboardController(
FILE: internal/controller/embed_controller.go
type EmbedController (line 28) | type EmbedController struct
method GetEmbedConfig (line 43) | func (c *EmbedController) GetEmbedConfig(ctx *gin.Context) {
function NewEmbedController (line 31) | func NewEmbedController() *EmbedController {
FILE: internal/controller/follow_controller.go
type FollowController (line 33) | type FollowController struct
method Follow (line 52) | func (fc *FollowController) Follow(ctx *gin.Context) {
method UpdateFollowTags (line 80) | func (fc *FollowController) UpdateFollowTags(ctx *gin.Context) {
function NewFollowController (line 38) | func NewFollowController(followService *follow.FollowService) *FollowCon...
FILE: internal/controller/lang_controller.go
type LangController (line 32) | type LangController struct
method GetLangMapping (line 50) | func (u *LangController) GetLangMapping(ctx *gin.Context) {
method GetAdminLangOptions (line 65) | func (u *LangController) GetAdminLangOptions(ctx *gin.Context) {
method GetUserLangOptions (line 76) | func (u *LangController) GetUserLangOptions(ctx *gin.Context) {
function NewLangController (line 38) | func NewLangController(tr i18n.Translator, siteInfoService siteinfo_comm...
FILE: internal/controller/mcp_controller.go
type MCPController (line 43) | type MCPController struct
method ensureMCPEnabled (line 77) | func (c *MCPController) ensureMCPEnabled(ctx context.Context) error {
method MCPQuestionsHandler (line 84) | func (c *MCPController) MCPQuestionsHandler() func(ctx context.Context...
method MCPQuestionDetailHandler (line 123) | func (c *MCPController) MCPQuestionDetailHandler() func(ctx context.Co...
method MCPAnswersHandler (line 153) | func (c *MCPController) MCPAnswersHandler() func(ctx context.Context, ...
method MCPCommentsHandler (line 206) | func (c *MCPController) MCPCommentsHandler() func(ctx context.Context,...
method MCPTagsHandler (line 247) | func (c *MCPController) MCPTagsHandler() func(ctx context.Context, req...
method MCPTagDetailsHandler (line 287) | func (c *MCPController) MCPTagDetailsHandler() func(ctx context.Contex...
method MCPUserDetailsHandler (line 320) | func (c *MCPController) MCPUserDetailsHandler() func(ctx context.Conte...
function NewMCPController (line 55) | func NewMCPController(
FILE: internal/controller/meta_controller.go
type MetaController (line 31) | type MetaController struct
method AddOrUpdateReaction (line 53) | func (mc *MetaController) AddOrUpdateReaction(ctx *gin.Context) {
method GetReaction (line 74) | func (mc *MetaController) GetReaction(ctx *gin.Context) {
function NewMetaController (line 35) | func NewMetaController(
FILE: internal/controller/notification_controller.go
type NotificationController (line 33) | type NotificationController struct
method GetRedDot (line 58) | func (nc *NotificationController) GetRedDot(ctx *gin.Context) {
method ClearRedDot (line 89) | func (nc *NotificationController) ClearRedDot(ctx *gin.Context) {
method ClearUnRead (line 122) | func (nc *NotificationController) ClearUnRead(ctx *gin.Context) {
method ClearIDUnRead (line 142) | func (nc *NotificationController) ClearIDUnRead(ctx *gin.Context) {
method GetList (line 165) | func (nc *NotificationController) GetList(ctx *gin.Context) {
function NewNotificationController (line 39) | func NewNotificationController(
FILE: internal/controller/permission_controller.go
type PermissionController (line 30) | type PermissionController struct
method GetPermission (line 49) | func (u *PermissionController) GetPermission(ctx *gin.Context) {
function NewPermissionController (line 35) | func NewPermissionController(rankService *rank.RankService) *PermissionC...
FILE: internal/controller/plugin_captcha_controller.go
type CaptchaController (line 31) | type CaptchaController struct
method GetCaptchaConfig (line 45) | func (uc *CaptchaController) GetCaptchaConfig(ctx *gin.Context) {
function NewCaptchaController (line 35) | func NewCaptchaController() *CaptchaController {
type GetCaptchaConfigResp (line 39) | type GetCaptchaConfigResp struct
FILE: internal/controller/plugin_sidebar_controller.go
type SidebarController (line 29) | type SidebarController struct
method GetSidebarConfig (line 37) | func (uc *SidebarController) GetSidebarConfig(ctx *gin.Context) {
function NewSidebarController (line 32) | func NewSidebarController() *SidebarController {
FILE: internal/controller/plugin_user_center_controller.go
constant UserCenterLoginRouter (line 37) | UserCenterLoginRouter = "/user-center/login/redirect"
constant UserCenterSignUpRedirectRouter (line 38) | UserCenterSignUpRedirectRouter = "/user-center/sign-up/redirect"
type UserCenterController (line 42) | type UserCenterController struct
method UserCenterAgent (line 59) | func (uc *UserCenterController) UserCenterAgent(ctx *gin.Context) {
method UserCenterPersonalBranding (line 102) | func (uc *UserCenterController) UserCenterPersonalBranding(ctx *gin.Co...
method UserCenterLoginRedirect (line 112) | func (uc *UserCenterController) UserCenterLoginRedirect(ctx *gin.Conte...
method UserCenterSignUpRedirect (line 122) | func (uc *UserCenterController) UserCenterSignUpRedirect(ctx *gin.Cont...
method UserCenterLoginCallback (line 132) | func (uc *UserCenterController) UserCenterLoginCallback(ctx *gin.Conte...
method UserCenterSignUpCallback (line 169) | func (uc *UserCenterController) UserCenterSignUpCallback(ctx *gin.Cont...
method UserCenterUserSettings (line 205) | func (uc *UserCenterController) UserCenterUserSettings(ctx *gin.Contex...
method UserCenterAdminFunctionAgent (line 212) | func (uc *UserCenterController) UserCenterAdminFunctionAgent(ctx *gin....
function NewUserCenterController (line 48) | func NewUserCenterController(
FILE: internal/controller/question_controller.go
type QuestionController (line 45) | type QuestionController struct
method RemoveQuestion (line 83) | func (qc *QuestionController) RemoveQuestion(ctx *gin.Context) {
method OperationQuestion (line 130) | func (qc *QuestionController) OperationQuestion(ctx *gin.Context) {
method CloseQuestion (line 171) | func (qc *QuestionController) CloseQuestion(ctx *gin.Context) {
method ReopenQuestion (line 202) | func (qc *QuestionController) ReopenQuestion(ctx *gin.Context) {
method GetQuestion (line 232) | func (qc *QuestionController) GetQuestion(ctx *gin.Context) {
method GetQuestionInviteUserInfo (line 286) | func (qc *QuestionController) GetQuestionInviteUserInfo(ctx *gin.Conte...
method SimilarQuestion (line 301) | func (qc *QuestionController) SimilarQuestion(ctx *gin.Context) {
method QuestionPage (line 325) | func (qc *QuestionController) QuestionPage(ctx *gin.Context) {
method QuestionRecommendPage (line 353) | func (qc *QuestionController) QuestionRecommendPage(ctx *gin.Context) {
method AddQuestion (line 383) | func (qc *QuestionController) AddQuestion(ctx *gin.Context) {
method AddQuestionByAnswer (line 498) | func (qc *QuestionController) AddQuestionByAnswer(ctx *gin.Context) {
method UpdateQuestion (line 622) | func (qc *QuestionController) UpdateQuestion(ctx *gin.Context) {
method QuestionRecover (line 716) | func (qc *QuestionController) QuestionRecover(ctx *gin.Context) {
method UpdateQuestionInviteUser (line 750) | func (qc *QuestionController) UpdateQuestionInviteUser(ctx *gin.Contex...
method GetSimilarQuestions (line 809) | func (qc *QuestionController) GetSimilarQuestions(ctx *gin.Context) {
method UserTop (line 824) | func (qc *QuestionController) UserTop(ctx *gin.Context) {
method PersonalQuestionPage (line 847) | func (qc *QuestionController) PersonalQuestionPage(ctx *gin.Context) {
method PersonalAnswerPage (line 872) | func (qc *QuestionController) PersonalAnswerPage(ctx *gin.Context) {
method PersonalCollectionPage (line 895) | func (qc *QuestionController) PersonalCollectionPage(ctx *gin.Context) {
method AdminQuestionPage (line 920) | func (qc *QuestionController) AdminQuestionPage(ctx *gin.Context) {
method AdminAnswerPage (line 945) | func (qc *QuestionController) AdminAnswerPage(ctx *gin.Context) {
method AdminUpdateQuestionStatus (line 966) | func (qc *QuestionController) AdminUpdateQuestionStatus(ctx *gin.Conte...
method GetQuestionLink (line 985) | func (qc *QuestionController) GetQuestionLink(ctx *gin.Context) {
function NewQuestionController (line 55) | func NewQuestionController(
FILE: internal/controller/rank_controller.go
type RankController (line 31) | type RankController struct
method GetRankPersonalWithPage (line 51) | func (cc *RankController) GetRankPersonalWithPage(ctx *gin.Context) {
function NewRankController (line 36) | func NewRankController(
FILE: internal/controller/reason_controller.go
type ReasonController (line 30) | type ReasonController struct
method Reasons (line 51) | func (rc *ReasonController) Reasons(ctx *gin.Context) {
function NewReasonController (line 35) | func NewReasonController(answerService *reason.ReasonService) *ReasonCon...
FILE: internal/controller/render_controller.go
type RenderController (line 28) | type RenderController struct
method GetRenderConfig (line 43) | func (c *RenderController) GetRenderConfig(ctx *gin.Context) {
function NewRenderController (line 31) | func NewRenderController() *RenderController {
FILE: internal/controller/report_controller.go
type ReportController (line 40) | type ReportController struct
method AddReport (line 69) | func (rc *ReportController) AddReport(ctx *gin.Context) {
method GetUnreviewedReportPostPage (line 116) | func (rc *ReportController) GetUnreviewedReportPostPage(ctx *gin.Conte...
method ReviewReport (line 139) | func (rc *ReportController) ReviewReport(ctx *gin.Context) {
function NewReportController (line 47) | func NewReportController(
FILE: internal/controller/review_controller.go
type ReviewController (line 36) | type ReviewController struct
method GetUnreviewedPostPage (line 66) | func (rc *ReviewController) GetUnreviewedPostPage(ctx *gin.Context) {
method UpdateReview (line 96) | func (rc *ReviewController) UpdateReview(ctx *gin.Context) {
function NewReviewController (line 43) | func NewReviewController(
FILE: internal/controller/revision_controller.go
type RevisionController (line 39) | type RevisionController struct
method GetRevisionList (line 63) | func (rc *RevisionController) GetRevisionList(ctx *gin.Context) {
method GetUnreviewedRevisionList (line 95) | func (rc *RevisionController) GetUnreviewedRevisionList(ctx *gin.Conte...
method RevisionAudit (line 128) | func (rc *RevisionController) RevisionAudit(ctx *gin.Context) {
method CheckCanUpdateRevision (line 161) | func (rc *RevisionController) CheckCanUpdateRevision(ctx *gin.Context) {
method GetReviewingType (line 205) | func (rc *RevisionController) GetReviewingType(ctx *gin.Context) {
function NewRevisionController (line 45) | func NewRevisionController(
FILE: internal/controller/search_controller.go
type SearchController (line 38) | type SearchController struct
method Search (line 64) | func (sc *SearchController) Search(ctx *gin.Context) {
method SearchDesc (line 102) | func (sc *SearchController) SearchDesc(ctx *gin.Context) {
function NewSearchController (line 44) | func NewSearchController(
FILE: internal/controller/siteinfo_controller.go
type SiteInfoController (line 33) | type SiteInfoController struct
method GetSiteInfo (line 51) | func (sc *SiteInfoController) GetSiteInfo(ctx *gin.Context) {
method GetSiteLegalInfo (line 132) | func (sc *SiteInfoController) GetSiteLegalInfo(ctx *gin.Context) {
method GetManifestJson (line 154) | func (sc *SiteInfoController) GetManifestJson(ctx *gin.Context) {
function NewSiteInfoController (line 38) | func NewSiteInfoController(siteInfoService siteinfo_common.SiteInfoCommo...
FILE: internal/controller/tag_controller.go
type TagController (line 37) | type TagController struct
method SearchTagLike (line 61) | func (tc *TagController) SearchTagLike(ctx *gin.Context) {
method GetTagsBySlugName (line 78) | func (tc *TagController) GetTagsBySlugName(ctx *gin.Context) {
method RemoveTag (line 98) | func (tc *TagController) RemoveTag(ctx *gin.Context) {
method AddTag (line 128) | func (tc *TagController) AddTag(ctx *gin.Context) {
method UpdateTag (line 161) | func (tc *TagController) UpdateTag(ctx *gin.Context) {
method RecoverTag (line 200) | func (tc *TagController) RecoverTag(ctx *gin.Context) {
method GetTagInfo (line 233) | func (tc *TagController) GetTagInfo(ctx *gin.Context) {
method GetTagWithPage (line 269) | func (tc *TagController) GetTagWithPage(ctx *gin.Context) {
method GetFollowingTags (line 297) | func (tc *TagController) GetFollowingTags(ctx *gin.Context) {
method GetTagSynonyms (line 311) | func (tc *TagController) GetTagSynonyms(ctx *gin.Context) {
method UpdateTagSynonym (line 339) | func (tc *TagController) UpdateTagSynonym(ctx *gin.Context) {
method MergeTag (line 370) | func (tc *TagController) MergeTag(ctx *gin.Context) {
function NewTagController (line 44) | func NewTagController(
FILE: internal/controller/template_controller.go
type TemplateController (line 57) | type TemplateController struct
method SiteInfo (line 106) | func (tc *TemplateController) SiteInfo(ctx *gin.Context) *schema.Templ...
method Index (line 138) | func (tc *TemplateController) Index(ctx *gin.Context) {
method QuestionList (line 178) | func (tc *TemplateController) QuestionList(ctx *gin.Context) {
method QuestionInfoRedirect (line 218) | func (tc *TemplateController) QuestionInfoRedirect(ctx *gin.Context, s...
method QuestionInfo (line 298) | func (tc *TemplateController) QuestionInfo(ctx *gin.Context) {
method TagList (line 444) | func (tc *TemplateController) TagList(ctx *gin.Context) {
method TagInfo (line 472) | func (tc *TemplateController) TagInfo(ctx *gin.Context) {
method UserInfo (line 513) | func (tc *TemplateController) UserInfo(ctx *gin.Context) {
method Page404 (line 557) | func (tc *TemplateController) Page404(ctx *gin.Context) {
method html (line 561) | func (tc *TemplateController) html(ctx *gin.Context, code int, tpl str...
method OpenSearch (line 617) | func (tc *TemplateController) OpenSearch(ctx *gin.Context) {
method Sitemap (line 625) | func (tc *TemplateController) Sitemap(ctx *gin.Context) {
method SitemapPage (line 633) | func (tc *TemplateController) SitemapPage(ctx *gin.Context) {
method checkPrivateMode (line 658) | func (tc *TemplateController) checkPrivateMode(ctx *gin.Context) bool {
function NewTemplateController (line 68) | func NewTemplateController(
function GetStyle (line 86) | func GetStyle() (script []string, css string) {
FILE: internal/controller/template_render/answer.go
method AnswerList (line 28) | func (t *TemplateRenderController) AnswerList(ctx context.Context, req *...
method AnswerDetail (line 32) | func (t *TemplateRenderController) AnswerDetail(ctx context.Context, id ...
FILE: internal/controller/template_render/comment.go
method CommentList (line 29) | func (t *TemplateRenderController) CommentList(
FILE: internal/controller/template_render/controller.go
type TemplateRenderController (line 41) | type TemplateRenderController struct
function NewTemplateRenderController (line 51) | func NewTemplateRenderController(
function Paginator (line 76) | func Paginator(page, pageSize int, nums int64) *schema.Paginator {
FILE: internal/controller/template_render/question.go
method Index (line 33) | func (t *TemplateRenderController) Index(ctx *gin.Context, req *schema.Q...
method QuestionDetail (line 37) | func (t *TemplateRenderController) QuestionDetail(ctx *gin.Context, id s...
method Sitemap (line 41) | func (t *TemplateRenderController) Sitemap(ctx *gin.Context) {
method OpenSearch (line 92) | func (t *TemplateRenderController) OpenSearch(ctx *gin.Context) {
method SitemapPage (line 114) | func (t *TemplateRenderController) SitemapPage(ctx *gin.Context, page in...
FILE: internal/controller/template_render/tags.go
method TagList (line 29) | func (q *TemplateRenderController) TagList(ctx context.Context, req *sch...
method TagInfo (line 37) | func (q *TemplateRenderController) TagInfo(ctx context.Context, req *sch...
FILE: internal/controller/template_render/userinfo.go
method UserInfo (line 27) | func (q *TemplateRenderController) UserInfo(ctx context.Context, req *sc...
FILE: internal/controller/upload_controller.go
constant fileFromPost (line 35) | fileFromPost = "post"
constant fileFromPostAttachment (line 37) | fileFromPostAttachment = "post_attachment"
constant fileFromAvatar (line 39) | fileFromAvatar = "avatar"
constant fileFromBranding (line 41) | fileFromBranding = "branding"
type UploadController (line 45) | type UploadController struct
method UploadFile (line 66) | func (uc *UploadController) UploadFile(ctx *gin.Context) {
method PostRender (line 108) | func (uc *UploadController) PostRender(ctx *gin.Context) {
function NewUploadController (line 50) | func NewUploadController(uploaderService uploader.UploaderService) *Uplo...
FILE: internal/controller/user_controller.go
type UserController (line 46) | type UserController struct
method GetUserInfoByUserID (line 83) | func (uc *UserController) GetUserInfoByUserID(ctx *gin.Context) {
method GetOtherUserInfoByUsername (line 112) | func (uc *UserController) GetOtherUserInfoByUsername(ctx *gin.Context) {
method UserEmailLogin (line 134) | func (uc *UserController) UserEmailLogin(ctx *gin.Context) {
method RetrievePassWord (line 183) | func (uc *UserController) RetrievePassWord(ctx *gin.Context) {
method UseRePassWord (line 213) | func (uc *UserController) UseRePassWord(ctx *gin.Context) {
method UserLogout (line 240) | func (uc *UserController) UserLogout(ctx *gin.Context) {
method UserRegisterByEmail (line 262) | func (uc *UserController) UserRegisterByEmail(ctx *gin.Context) {
method UserVerifyEmail (line 317) | func (uc *UserController) UserVerifyEmail(ctx *gin.Context) {
method UserVerifyEmailSend (line 351) | func (uc *UserController) UserVerifyEmailSend(ctx *gin.Context) {
method UserModifyPassWord (line 388) | func (uc *UserController) UserModifyPassWord(ctx *gin.Context) {
method UserUpdateInfo (line 450) | func (uc *UserController) UserUpdateInfo(ctx *gin.Context) {
method UserUpdateInterface (line 475) | func (uc *UserController) UserUpdateInterface(ctx *gin.Context) {
method ActionRecord (line 493) | func (uc *UserController) ActionRecord(ctx *gin.Context) {
method GetUserNotificationConfig (line 523) | func (uc *UserController) GetUserNotificationConfig(ctx *gin.Context) {
method UpdateUserNotificationConfig (line 539) | func (uc *UserController) UpdateUserNotificationConfig(ctx *gin.Contex...
method UserChangeEmailSendCode (line 560) | func (uc *UserController) UserChangeEmailSendCode(ctx *gin.Context) {
method UserChangeEmailVerify (line 619) | func (uc *UserController) UserChangeEmailVerify(ctx *gin.Context) {
method UserRanking (line 644) | func (uc *UserController) UserRanking(ctx *gin.Context) {
method UserStaff (line 659) | func (uc *UserController) UserStaff(ctx *gin.Context) {
method UserUnsubscribeNotification (line 678) | func (uc *UserController) UserUnsubscribeNotification(ctx *gin.Context) {
method SearchUserListByName (line 705) | func (uc *UserController) SearchUserListByName(ctx *gin.Context) {
method setVisitCookies (line 715) | func (uc *UserController) setVisitCookies(ctx *gin.Context, visitToken...
function NewUserController (line 56) | func NewUserController(
FILE: internal/controller/user_plugin_controller.go
type UserPluginController (line 38) | type UserPluginController struct
method GetUserPluginList (line 56) | func (pc *UserPluginController) GetUserPluginList(ctx *gin.Context) {
method GetUserPluginConfig (line 80) | func (pc *UserPluginController) GetUserPluginConfig(ctx *gin.Context) {
method UpdatePluginUserConfig (line 128) | func (pc *UserPluginController) UpdatePluginUserConfig(ctx *gin.Contex...
function NewUserPluginController (line 43) | func NewUserPluginController(pluginCommonService *plugin_common.PluginCo...
FILE: internal/controller/vote_controller.go
type VoteController (line 39) | type VoteController struct
method VoteUp (line 68) | func (vc *VoteController) VoteUp(ctx *gin.Context) {
method VoteDown (line 122) | func (vc *VoteController) VoteDown(ctx *gin.Context) {
method UserVotes (line 176) | func (vc *VoteController) UserVotes(ctx *gin.Context) {
function NewVoteController (line 46) | func NewVoteController(
FILE: internal/controller_admin/ai_conversation_admin_controller.go
type AIConversationAdminController (line 31) | type AIConversationAdminController struct
method ensureEnabled (line 47) | func (ctrl *AIConversationAdminController) ensureEnabled(ctx *gin.Cont...
method GetConversationList (line 68) | func (ctrl *AIConversationAdminController) GetConversationList(ctx *gi...
method GetConversationDetail (line 90) | func (ctrl *AIConversationAdminController) GetConversationDetail(ctx *...
method DeleteConversation (line 112) | func (ctrl *AIConversationAdminController) DeleteConversation(ctx *gin...
function NewAIConversationAdminController (line 37) | func NewAIConversationAdminController(
FILE: internal/controller_admin/badge_controller.go
type BadgeController (line 30) | type BadgeController struct
method GetBadgeList (line 53) | func (b *BadgeController) GetBadgeList(ctx *gin.Context) {
method UpdateBadgeStatus (line 78) | func (b *BadgeController) UpdateBadgeStatus(ctx *gin.Context) {
function NewBadgeController (line 34) | func NewBadgeController(badgeService *badge.BadgeService) *BadgeControll...
FILE: internal/controller_admin/e_api_key_controller.go
type AdminAPIKeyController (line 31) | type AdminAPIKeyController struct
method GetAllAPIKeys (line 50) | func (sc *AdminAPIKeyController) GetAllAPIKeys(ctx *gin.Context) {
method AddAPIKey (line 64) | func (sc *AdminAPIKeyController) AddAPIKey(ctx *gin.Context) {
method UpdateAPIKey (line 85) | func (sc *AdminAPIKeyController) UpdateAPIKey(ctx *gin.Context) {
method DeleteAPIKey (line 106) | func (sc *AdminAPIKeyController) DeleteAPIKey(ctx *gin.Context) {
function NewAdminAPIKeyController (line 36) | func NewAdminAPIKeyController(apiKeyService *apikey.APIKeyService) *Admi...
FILE: internal/controller_admin/plugin_controller.go
type PluginController (line 33) | type PluginController struct
method GetAllPluginStatus (line 50) | func (pc *PluginController) GetAllPluginStatus(ctx *gin.Context) {
method GetPluginList (line 74) | func (pc *PluginController) GetPluginList(ctx *gin.Context) {
method filterNoConfigPlugin (line 112) | func (pc *PluginController) filterNoConfigPlugin(list []*schema.GetPlu...
method filterPluginByStatus (line 122) | func (pc *PluginController) filterPluginByStatus(list []*schema.GetPlu...
method UpdatePluginStatus (line 145) | func (pc *PluginController) UpdatePluginStatus(ctx *gin.Context) {
method GetPluginConfig (line 165) | func (pc *PluginController) GetPluginConfig(ctx *gin.Context) {
method UpdatePluginConfig (line 204) | func (pc *PluginController) UpdatePluginConfig(ctx *gin.Context) {
function NewPluginController (line 38) | func NewPluginController(pluginCommonService *plugin_common.PluginCommon...
FILE: internal/controller_admin/role_controller.go
type RoleController (line 30) | type RoleController struct
method GetRoleList (line 47) | func (rc *RoleController) GetRoleList(ctx *gin.Context) {
function NewRoleController (line 35) | func NewRoleController(roleService *service.RoleService) *RoleController {
FILE: internal/controller_admin/siteinfo_controller.go
type SiteInfoController (line 35) | type SiteInfoController struct
method GetGeneral (line 54) | func (sc *SiteInfoController) GetGeneral(ctx *gin.Context) {
method GetInterface (line 67) | func (sc *SiteInfoController) GetInterface(ctx *gin.Context) {
method GetUsersSettings (line 80) | func (sc *SiteInfoController) GetUsersSettings(ctx *gin.Context) {
method GetSiteBranding (line 93) | func (sc *SiteInfoController) GetSiteBranding(ctx *gin.Context) {
method GetSiteTag (line 106) | func (sc *SiteInfoController) GetSiteTag(ctx *gin.Context) {
method GetSiteQuestion (line 119) | func (sc *SiteInfoController) GetSiteQuestion(ctx *gin.Context) {
method GetSiteAdvanced (line 132) | func (sc *SiteInfoController) GetSiteAdvanced(ctx *gin.Context) {
method GetSitePolicies (line 145) | func (sc *SiteInfoController) GetSitePolicies(ctx *gin.Context) {
method GetSiteSecurity (line 158) | func (sc *SiteInfoController) GetSiteSecurity(ctx *gin.Context) {
method GetSeo (line 171) | func (sc *SiteInfoController) GetSeo(ctx *gin.Context) {
method GetSiteLogin (line 184) | func (sc *SiteInfoController) GetSiteLogin(ctx *gin.Context) {
method GetSiteCustomCssHTML (line 197) | func (sc *SiteInfoController) GetSiteCustomCssHTML(ctx *gin.Context) {
method GetSiteTheme (line 210) | func (sc *SiteInfoController) GetSiteTheme(ctx *gin.Context) {
method GetSiteUsers (line 223) | func (sc *SiteInfoController) GetSiteUsers(ctx *gin.Context) {
method GetRobots (line 235) | func (sc *SiteInfoController) GetRobots(ctx *gin.Context) {
method GetCss (line 251) | func (sc *SiteInfoController) GetCss(ctx *gin.Context) {
method UpdateSeo (line 270) | func (sc *SiteInfoController) UpdateSeo(ctx *gin.Context) {
method UpdateGeneral (line 288) | func (sc *SiteInfoController) UpdateGeneral(ctx *gin.Context) {
method UpdateInterface (line 307) | func (sc *SiteInfoController) UpdateInterface(ctx *gin.Context) {
method UpdateUsersSettings (line 325) | func (sc *SiteInfoController) UpdateUsersSettings(ctx *gin.Context) {
method UpdateBranding (line 343) | func (sc *SiteInfoController) UpdateBranding(ctx *gin.Context) {
method UpdateSiteQuestion (line 370) | func (sc *SiteInfoController) UpdateSiteQuestion(ctx *gin.Context) {
method UpdateSiteTag (line 389) | func (sc *SiteInfoController) UpdateSiteTag(ctx *gin.Context) {
method UpdateSiteAdvanced (line 409) | func (sc *SiteInfoController) UpdateSiteAdvanced(ctx *gin.Context) {
method UpdateSitePolices (line 428) | func (sc *SiteInfoController) UpdateSitePolices(ctx *gin.Context) {
method UpdateSiteSecurity (line 446) | func (sc *SiteInfoController) UpdateSiteSecurity(ctx *gin.Context) {
method UpdateSiteLogin (line 464) | func (sc *SiteInfoController) UpdateSiteLogin(ctx *gin.Context) {
method UpdateSiteCustomCssHTML (line 482) | func (sc *SiteInfoController) UpdateSiteCustomCssHTML(ctx *gin.Context) {
method SaveSiteTheme (line 500) | func (sc *SiteInfoController) SaveSiteTheme(ctx *gin.Context) {
method UpdateSiteUsers (line 518) | func (sc *SiteInfoController) UpdateSiteUsers(ctx *gin.Context) {
method GetSMTPConfig (line 535) | func (sc *SiteInfoController) GetSMTPConfig(ctx *gin.Context) {
method UpdateSMTPConfig (line 549) | func (sc *SiteInfoController) UpdateSMTPConfig(ctx *gin.Context) {
method GetPrivilegesConfig (line 566) | func (sc *SiteInfoController) GetPrivilegesConfig(ctx *gin.Context) {
method UpdatePrivilegesConfig (line 580) | func (sc *SiteInfoController) UpdatePrivilegesConfig(ctx *gin.Context) {
method GetAIConfig (line 597) | func (sc *SiteInfoController) GetAIConfig(ctx *gin.Context) {
method UpdateAIConfig (line 611) | func (sc *SiteInfoController) UpdateAIConfig(ctx *gin.Context) {
method GetAIProvider (line 629) | func (sc *SiteInfoController) GetAIProvider(ctx *gin.Context) {
method RequestAIModels (line 646) | func (sc *SiteInfoController) RequestAIModels(ctx *gin.Context) {
method GetMCPConfig (line 667) | func (sc *SiteInfoController) GetMCPConfig(ctx *gin.Context) {
method UpdateMCPConfig (line 681) | func (sc *SiteInfoController) UpdateMCPConfig(ctx *gin.Context) {
function NewSiteInfoController (line 40) | func NewSiteInfoController(siteInfoService *siteinfo.SiteInfoService) *S...
FILE: internal/controller_admin/theme_controller.go
type ThemeController (line 28) | type ThemeController struct
method GetThemeOptions (line 43) | func (t *ThemeController) GetThemeOptions(ctx *gin.Context) {
function NewThemeController (line 31) | func NewThemeController() *ThemeController {
FILE: internal/controller_admin/user_backyard_controller.go
type UserAdminController (line 35) | type UserAdminController struct
method UpdateUserStatus (line 54) | func (uc *UserAdminController) UpdateUserStatus(ctx *gin.Context) {
method UpdateUserRole (line 80) | func (uc *UserAdminController) UpdateUserRole(ctx *gin.Context) {
method AddUser (line 102) | func (uc *UserAdminController) AddUser(ctx *gin.Context) {
method AddUsers (line 124) | func (uc *UserAdminController) AddUsers(ctx *gin.Context) {
method UpdateUserPassword (line 144) | func (uc *UserAdminController) UpdateUserPassword(ctx *gin.Context) {
method EditUserProfile (line 166) | func (uc *UserAdminController) EditUserProfile(ctx *gin.Context) {
method GetUserPage (line 198) | func (uc *UserAdminController) GetUserPage(ctx *gin.Context) {
method GetUserActivation (line 217) | func (uc *UserAdminController) GetUserActivation(ctx *gin.Context) {
method SendUserActivation (line 236) | func (uc *UserAdminController) SendUserActivation(ctx *gin.Context) {
method DeletePermanently (line 256) | func (uc *UserAdminController) DeletePermanently(ctx *gin.Context) {
function NewUserAdminController (line 40) | func NewUserAdminController(userService *user_admin.UserAdminService) *U...
FILE: internal/entity/activity_entity.go
constant ActivityAvailable (line 25) | ActivityAvailable = 0
constant ActivityCancelled (line 26) | ActivityCancelled = 1
type Activity (line 30) | type Activity struct
method TableName (line 61) | func (Activity) TableName() string {
type ActivityRankSum (line 46) | type ActivityRankSum struct
type ActivityUserRankStat (line 50) | type ActivityUserRankStat struct
type ActivityUserVoteStat (line 55) | type ActivityUserVoteStat struct
FILE: internal/entity/ai_conversation.go
type AIConversation (line 25) | type AIConversation struct
method TableName (line 35) | func (AIConversation) TableName() string {
FILE: internal/entity/ai_conversation_record.go
type AIConversationRecord (line 25) | type AIConversationRecord struct
method TableName (line 38) | func (AIConversationRecord) TableName() string {
FILE: internal/entity/answer_entity.go
constant AnswerSearchOrderByDefault (line 25) | AnswerSearchOrderByDefault = "default"
constant AnswerSearchOrderByTime (line 26) | AnswerSearchOrderByTime = "updated"
constant AnswerSearchOrderByVote (line 27) | AnswerSearchOrderByVote = "vote"
constant AnswerSearchOrderByTimeAsc (line 28) | AnswerSearchOrderByTimeAsc = "created"
constant AnswerStatusAvailable (line 30) | AnswerStatusAvailable = 1
constant AnswerStatusDeleted (line 31) | AnswerStatusDeleted = 10
constant AnswerStatusPending (line 32) | AnswerStatusPending = 11
type Answer (line 42) | type Answer struct
method TableName (line 76) | func (Answer) TableName() string {
type AnswerSearch (line 58) | type AnswerSearch struct
type PersonalAnswerPageQueryCond (line 67) | type PersonalAnswerPageQueryCond struct
FILE: internal/entity/api_key_entity.go
type APIKey (line 27) | type APIKey struct
method TableName (line 40) | func (c *APIKey) TableName() string {
FILE: internal/entity/auth_user_entity.go
type UserCacheInfo (line 23) | type UserCacheInfo struct
FILE: internal/entity/badge_award_entity.go
constant IsBadgeNotDeleted (line 25) | IsBadgeNotDeleted = 0
constant IsBadgeDeleted (line 26) | IsBadgeDeleted = 1
constant BadgeEmptyAwardKey (line 28) | BadgeEmptyAwardKey = "0"
type BadgeAward (line 32) | type BadgeAward struct
method TableName (line 44) | func (BadgeAward) TableName() string {
type BadgeEarnedCount (line 48) | type BadgeEarnedCount struct
method TableName (line 54) | func (BadgeEarnedCount) TableName() string {
type BadgeAwardRecent (line 58) | type BadgeAwardRecent struct
method TableName (line 67) | func (BadgeAwardRecent) TableName() string {
FILE: internal/entity/badge_entity.go
type BadgeLevel (line 28) | type BadgeLevel
constant BadgeStatusActive (line 31) | BadgeStatusActive = 1
constant BadgeStatusDeleted (line 32) | BadgeStatusDeleted = 10
constant BadgeStatusInactive (line 33) | BadgeStatusInactive = 11
constant BadgeLevelBronze (line 35) | BadgeLevelBronze BadgeLevel = 1
constant BadgeLevelSilver (line 36) | BadgeLevelSilver BadgeLevel = 2
constant BadgeLevelGold (line 37) | BadgeLevelGold BadgeLevel = 3
constant BadgeSingleAward (line 39) | BadgeSingleAward = 1
constant BadgeMultiAward (line 40) | BadgeMultiAward = 2
type Badge (line 44) | type Badge struct
method TableName (line 62) | func (b *Badge) TableName() string {
method GetIntParam (line 66) | func (b *Badge) GetIntParam(key string) int64 {
method GetStringParam (line 70) | func (b *Badge) GetStringParam(key string) string {
FILE: internal/entity/badge_group_entity.go
type BadgeGroup (line 25) | type BadgeGroup struct
method TableName (line 33) | func (BadgeGroup) TableName() string {
FILE: internal/entity/captcha_entity.go
constant CaptchaActionEmail (line 23) | CaptchaActionEmail = "email"
constant CaptchaActionPassword (line 24) | CaptchaActionPassword = "password"
constant CaptchaActionEditUserinfo (line 25) | CaptchaActionEditUserinfo = "edit_userinfo"
constant CaptchaActionQuestion (line 26) | CaptchaActionQuestion = "question"
constant CaptchaActionAnswer (line 27) | CaptchaActionAnswer = "answer"
constant CaptchaActionComment (line 28) | CaptchaActionComment = "comment"
constant CaptchaActionEdit (line 29) | CaptchaActionEdit = "edit"
constant CaptchaActionInvitationAnswer (line 30) | CaptchaActionInvitationAnswer = "invitation_answer"
constant CaptchaActionSearch (line 31) | CaptchaActionSearch = "search"
constant CaptchaActionReport (line 32) | CaptchaActionReport = "report"
constant CaptchaActionDelete (line 33) | CaptchaActionDelete = "delete"
constant CaptchaActionVote (line 34) | CaptchaActionVote = "vote"
type ActionRecordInfo (line 37) | type ActionRecordInfo struct
FILE: internal/entity/collection_entity.go
type Collection (line 25) | type Collection struct
method TableName (line 41) | func (Collection) TableName() string {
type CollectionSearch (line 34) | type CollectionSearch struct
FILE: internal/entity/collection_group_entity.go
type CollectionGroup (line 25) | type CollectionGroup struct
method TableName (line 35) | func (CollectionGroup) TableName() string {
FILE: internal/entity/comment_entity.go
constant CommentStatusAvailable (line 31) | CommentStatusAvailable = 1
constant CommentStatusDeleted (line 32) | CommentStatusDeleted = 10
constant CommentStatusPending (line 33) | CommentStatusPending = 11
type Comment (line 37) | type Comment struct
method TableName (line 53) | func (c *Comment) TableName() string {
method GetReplyUserID (line 58) | func (c *Comment) GetReplyUserID() string {
method GetReplyCommentID (line 66) | func (c *Comment) GetReplyCommentID() string {
method SetReplyUserID (line 74) | func (c *Comment) SetReplyUserID(str string) {
method SetReplyCommentID (line 83) | func (c *Comment) SetReplyCommentID(str string) {
method GetMentionUsernameList (line 92) | func (c *Comment) GetMentionUsernameList() []string {
FILE: internal/entity/config_entity.go
type Config (line 31) | type Config struct
method TableName (line 38) | func (c *Config) TableName() string {
method BuildByJSON (line 42) | func (c *Config) BuildByJSON(data []byte) {
method JsonString (line 50) | func (c *Config) JsonString() string {
method GetIntValue (line 56) | func (c *Config) GetIntValue() int {
method GetArrayStringValue (line 64) | func (c *Config) GetArrayStringValue() []string {
method GetByteValue (line 71) | func (c *Config) GetByteValue() []byte {
FILE: internal/entity/file_record_entity.go
constant FileRecordStatusAvailable (line 25) | FileRecordStatusAvailable = 1
constant FileRecordStatusDeleted (line 26) | FileRecordStatusDeleted = 10
type FileRecord (line 30) | type FileRecord struct
method TableName (line 43) | func (FileRecord) TableName() string {
FILE: internal/entity/meta_entity.go
constant QuestionEditSummaryKey (line 25) | QuestionEditSummaryKey = "question.edit.summary"
constant QuestionCloseReasonKey (line 26) | QuestionCloseReasonKey = "question.close.reason"
constant AnswerEditSummaryKey (line 27) | AnswerEditSummaryKey = "answer.edit.summary"
constant TagEditSummaryKey (line 28) | TagEditSummaryKey = "tag.edit.summary"
constant ObjectReactSummaryKey (line 29) | ObjectReactSummaryKey = "object.react.summary"
type Meta (line 33) | type Meta struct
method TableName (line 43) | func (Meta) TableName() string {
FILE: internal/entity/notification_entity.go
type Notification (line 25) | type Notification struct
method TableName (line 39) | func (Notification) TableName() string {
FILE: internal/entity/plugin_config_entity.go
type PluginConfig (line 23) | type PluginConfig struct
method TableName (line 30) | func (PluginConfig) TableName() string {
FILE: internal/entity/plugin_kv_storage_entity.go
type PluginKVStorage (line 22) | type PluginKVStorage struct
method TableName (line 30) | func (PluginKVStorage) TableName() string {
FILE: internal/entity/plugin_user_config_entity.go
type PluginUserConfig (line 23) | type PluginUserConfig struct
method TableName (line 31) | func (PluginUserConfig) TableName() string {
FILE: internal/entity/power_entity.go
type Power (line 25) | type Power struct
method TableName (line 35) | func (Power) TableName() string {
FILE: internal/entity/question_entity.go
constant QuestionStatusAvailable (line 27) | QuestionStatusAvailable = 1
constant QuestionStatusClosed (line 28) | QuestionStatusClosed = 2
constant QuestionStatusDeleted (line 29) | QuestionStatusDeleted = 10
constant QuestionStatusPending (line 30) | QuestionStatusPending = 11
constant QuestionUnPin (line 31) | QuestionUnPin = 1
constant QuestionPin (line 32) | QuestionPin = 2
constant QuestionShow (line 33) | QuestionShow = 1
constant QuestionHide (line 34) | QuestionHide = 2
type Question (line 52) | type Question struct
method TableName (line 80) | func (Question) TableName() string {
type QuestionWithTagsRevision (line 85) | type QuestionWithTagsRevision struct
type TagSimpleInfoForRevision (line 91) | type TagSimpleInfoForRevision struct
FILE: internal/entity/question_link_entity.go
constant QuestionLinkStatusAvailable (line 27) | QuestionLinkStatusAvailable = 1
constant QuestionLinkStatusDeleted (line 28) | QuestionLinkStatusDeleted = 2
type QuestionLink (line 31) | type QuestionLink struct
method TableName (line 42) | func (QuestionLink) TableName() string {
FILE: internal/entity/report_entity.go
constant ReportStatusPending (line 25) | ReportStatusPending = 1
constant ReportStatusCompleted (line 26) | ReportStatusCompleted = 2
constant ReportStatusIgnore (line 27) | ReportStatusIgnore = 3
constant ReportStatusDeleted (line 28) | ReportStatusDeleted = 10
type Report (line 40) | type Report struct
method TableName (line 56) | func (Report) TableName() string {
FILE: internal/entity/review_entity.go
constant ReviewStatusPending (line 25) | ReviewStatusPending = 1
constant ReviewStatusApproved (line 26) | ReviewStatusApproved = 2
constant ReviewStatusRejected (line 27) | ReviewStatusRejected = 3
type Review (line 31) | type Review struct
method TableName (line 45) | func (Review) TableName() string {
FILE: internal/entity/revision_entity.go
constant RevisionNormalStatus (line 28) | RevisionNormalStatus = 0
constant RevisionUnreviewedStatus (line 30) | RevisionUnreviewedStatus = 1
constant RevisionReviewPassStatus (line 32) | RevisionReviewPassStatus = 2
constant RevisionReviewRejectStatus (line 34) | RevisionReviewRejectStatus = 3
type Revision (line 38) | type Revision struct
method TableName (line 53) | func (Revision) TableName() string {
FILE: internal/entity/role_entity.go
type Role (line 25) | type Role struct
method TableName (line 34) | func (Role) TableName() string {
FILE: internal/entity/role_power_rel_entity.go
type RolePowerRel (line 25) | type RolePowerRel struct
method TableName (line 34) | func (RolePowerRel) TableName() string {
FILE: internal/entity/site_info.go
type SiteInfo (line 25) | type SiteInfo struct
method TableName (line 35) | func (*SiteInfo) TableName() string {
FILE: internal/entity/tag_entity.go
constant TagStatusAvailable (line 25) | TagStatusAvailable = 1
constant TagStatusDeleted (line 26) | TagStatusDeleted = 10
type Tag (line 35) | type Tag struct
method TableName (line 55) | func (Tag) TableName() string {
FILE: internal/entity/tag_rel_entity.go
constant TagRelStatusAvailable (line 25) | TagRelStatusAvailable = 1
constant TagRelStatusHide (line 26) | TagRelStatusHide = 2
constant TagRelStatusDeleted (line 27) | TagRelStatusDeleted = 10
type TagRel (line 31) | type TagRel struct
method TableName (line 41) | func (TagRel) TableName() string {
FILE: internal/entity/uniqid_entity.go
type Uniqid (line 23) | type Uniqid struct
method TableName (line 29) | func (Uniqid) TableName() string {
FILE: internal/entity/user_entity.go
constant UserStatusAvailable (line 25) | UserStatusAvailable = 1
constant UserStatusSuspended (line 26) | UserStatusSuspended = 9
constant UserStatusDeleted (line 27) | UserStatusDeleted = 10
constant EmailStatusAvailable (line 31) | EmailStatusAvailable = 1
constant EmailStatusToBeVerified (line 32) | EmailStatusToBeVerified = 2
constant UserAdminFlag (line 36) | UserAdminFlag = 1
type User (line 43) | type User struct
method TableName (line 76) | func (User) TableName() string {
type UserSearch (line 80) | type UserSearch struct
FILE: internal/entity/user_external_login_entity.go
type UserExternalLogin (line 25) | type UserExternalLogin struct
method TableName (line 36) | func (UserExternalLogin) TableName() string {
FILE: internal/entity/user_notification_config_entity.go
type UserNotificationConfig (line 25) | type UserNotificationConfig struct
method TableName (line 36) | func (UserNotificationConfig) TableName() string {
FILE: internal/entity/user_role_rel_entity.go
type UserRoleRel (line 25) | type UserRoleRel struct
method TableName (line 34) | func (UserRoleRel) TableName() string {
FILE: internal/entity/version_entity.go
type Version (line 23) | type Version struct
method TableName (line 29) | func (Version) TableName() string {
FILE: internal/install/install_controller.go
function LangOptions (line 53) | func LangOptions(ctx *gin.Context) {
function GetLangMapping (line 65) | func GetLangMapping(ctx *gin.Context) {
function CheckConfigFileAndRedirectToInstallPage (line 85) | func CheckConfigFileAndRedirectToInstallPage(ctx *gin.Context) {
function CheckConfigFile (line 101) | func CheckConfigFile(ctx *gin.Context) {
function CheckDatabase (line 131) | func CheckDatabase(ctx *gin.Context) {
function InitEnvironment (line 159) | func InitEnvironment(ctx *gin.Context) {
function InitBaseInfo (line 211) | func InitBaseInfo(ctx *gin.Context) {
FILE: internal/install/install_from_env.go
type Env (line 35) | type Env struct
function TryToInstallByEnv (line 55) | func TryToInstallByEnv() (installByEnv bool, err error) {
function loadEnv (line 64) | func loadEnv() (env *Env) {
function initByEnv (line 84) | func initByEnv(env *Env) (err error) {
function dbCheck (line 98) | func dbCheck(env *Env) (err error) {
function initConfigAndDb (line 110) | func initConfigAndDb(env *Env) (err error) {
function initBaseInfo (line 122) | func initBaseInfo(env *Env) (err error) {
function requestAPI (line 137) | func requestAPI(req any, method, url string, handlerFunc gin.HandlerFunc...
FILE: internal/install/install_main.go
function init (line 36) | func init() {
function Run (line 41) | func Run(configPath string) {
FILE: internal/install/install_req.go
type CheckConfigFileResp (line 36) | type CheckConfigFileResp struct
type CheckDatabaseReq (line 43) | type CheckDatabaseReq struct
method GetConnection (line 58) | func (r *CheckDatabaseReq) GetConnection() string {
function parsePgSQLHostPort (line 93) | func parsePgSQLHostPort(dbHost string) (host string, port string) {
type CheckDatabaseResp (line 110) | type CheckDatabaseResp struct
type InitEnvironmentResp (line 115) | type InitEnvironmentResp struct
type InitBaseInfoReq (line 123) | type InitBaseInfoReq struct
method Check (line 135) | func (r *InitBaseInfoReq) Check() (errFields []*validator.FormErrorFie...
method FormatSiteUrl (line 147) | func (r *InitBaseInfoReq) FormatSiteUrl() {
FILE: internal/install/install_server.go
constant UIStaticPath (line 36) | UIStaticPath = "build/static"
type _resource (line 38) | type _resource struct
method Open (line 43) | func (r *_resource) Open(name string) (fs.File, error) {
function NewInstallHTTPServer (line 50) | func NewInstallHTTPServer() *gin.Engine {
function WebPage (line 80) | func WebPage(c *gin.Context) {
FILE: internal/migrations/init.go
type Mentor (line 41) | type Mentor struct
method InitDB (line 65) | func (m *Mentor) InitDB() error {
method do (line 95) | func (m *Mentor) do(taskName string, fn func()) {
method checkTableExist (line 105) | func (m *Mentor) checkTableExist() {
method syncTable (line 112) | func (m *Mentor) syncTable() {
method initVersionTable (line 116) | func (m *Mentor) initVersionTable() {
method initAdminUser (line 120) | func (m *Mentor) initAdminUser() {
method initConfig (line 135) | func (m *Mentor) initConfig() {
method initDefaultRankPrivileges (line 139) | func (m *Mentor) initDefaultRankPrivileges() {
method initRole (line 152) | func (m *Mentor) initRole() {
method initPower (line 156) | func (m *Mentor) initPower() {
method initRolePowerRel (line 160) | func (m *Mentor) initRolePowerRel() {
method initAdminUserRoleRel (line 164) | func (m *Mentor) initAdminUserRoleRel() {
method initSiteInfoInterface (line 168) | func (m *Mentor) initSiteInfoInterface() {
method initSiteInfoUsersSettings (line 200) | func (m *Mentor) initSiteInfoUsersSettings() {
method initSiteInfoGeneralData (line 213) | func (m *Mentor) initSiteInfoGeneralData() {
method initSiteInfoLoginConfig (line 227) | func (m *Mentor) initSiteInfoLoginConfig() {
method initSiteInfoSecurityConfig (line 241) | func (m *Mentor) initSiteInfoSecurityConfig() {
method initSiteInfoThemeConfig (line 255) | func (m *Mentor) initSiteInfoThemeConfig() {
method initSiteInfoSEOConfig (line 264) | func (m *Mentor) initSiteInfoSEOConfig() {
method initSiteInfoUsersConfig (line 277) | func (m *Mentor) initSiteInfoUsersConfig() {
method initSiteInfoPrivilegeRank (line 296) | func (m *Mentor) initSiteInfoPrivilegeRank() {
method initSiteInfoAdvanced (line 308) | func (m *Mentor) initSiteInfoAdvanced() {
method initSiteInfoQuestions (line 324) | func (m *Mentor) initSiteInfoQuestions() {
method initSiteInfoTags (line 338) | func (m *Mentor) initSiteInfoTags() {
method initDefaultContent (line 352) | func (m *Mentor) initDefaultContent() {
method initDefaultBadges (line 594) | func (m *Mentor) initDefaultBadges() {
method initSiteInfoAI (line 612) | func (m *Mentor) initSiteInfoAI() {
method initSiteInfoMCP (line 626) | func (m *Mentor) initSiteInfoMCP() {
function NewMentor (line 49) | func NewMentor(ctx context.Context, engine *xorm.Engine, data *InitNeedU...
type InitNeedUserInputData (line 53) | type InitNeedUserInputData struct
FILE: internal/migrations/init_data.go
constant defaultSEORobotTxt (line 28) | defaultSEORobotTxt = `User-agent: *
FILE: internal/migrations/migrations.go
constant minDBVersion (line 31) | minDBVersion = 0
type Migration (line 34) | type Migration interface
type migration (line 41) | type migration struct
method Version (line 49) | func (m *migration) Version() string {
method Description (line 54) | func (m *migration) Description() string {
method Migrate (line 59) | func (m *migration) Migrate(ctx context.Context, x *xorm.Engine) error {
method ShouldCleanCache (line 64) | func (m *migration) ShouldCleanCache() bool {
function NewMigration (line 69) | func NewMigration(version, desc string, fn func(ctx context.Context, x *...
function GetMigrations (line 112) | func GetMigrations() []Migration {
function GetCurrentDBVersion (line 117) | func GetCurrentDBVersion(engine *xorm.Engine) (int64, error) {
function ExpectedVersion (line 138) | func ExpectedVersion() int64 {
function Migrate (line 143) | func Migrate(debug bool, dbConf *data.Database, cacheConf *data.CacheCon...
FILE: internal/migrations/v1.go
function addUserLanguage (line 28) | func addUserLanguage(ctx context.Context, x *xorm.Engine) error {
FILE: internal/migrations/v10.go
function addLoginLimitations (line 34) | func addLoginLimitations(ctx context.Context, x *xorm.Engine) error {
FILE: internal/migrations/v11.go
function updateRolePinAndHideFeatures (line 31) | func updateRolePinAndHideFeatures(ctx context.Context, x *xorm.Engine) e...
FILE: internal/migrations/v12.go
type QuestionPostTime (line 32) | type QuestionPostTime struct
method TableName (line 56) | func (QuestionPostTime) TableName() string {
function updateQuestionPostTime (line 60) | func updateQuestionPostTime(ctx context.Context, x *xorm.Engine) error {
FILE: internal/migrations/v13.go
function updateCount (line 38) | func updateCount(ctx context.Context, x *xorm.Engine) error {
function addGravatarBaseURL (line 57) | func addGravatarBaseURL(ctx context.Context, x *xorm.Engine) error {
function addPrivilegeForInviteSomeoneToAnswer (line 80) | func addPrivilegeForInviteSomeoneToAnswer(ctx context.Context, x *xorm.E...
function updateQuestionCount (line 138) | func updateQuestionCount(ctx context.Context, x *xorm.Engine) error {
function updateTagCount (line 174) | func updateTagCount(ctx context.Context, x *xorm.Engine) error {
function updateUserQuestionCount (line 259) | func updateUserQuestionCount(ctx context.Context, x *xorm.Engine) error {
type AnswerV13 (line 298) | type AnswerV13 struct
method TableName (line 306) | func (AnswerV13) TableName() string {
function updateUserAnswerCount (line 311) | func updateUserAnswerCount(ctx context.Context, x *xorm.Engine) error {
type QuestionV13 (line 350) | type QuestionV13 struct
method TableName (line 375) | func (QuestionV13) TableName() string {
function inviteAnswer (line 379) | func inviteAnswer(ctx context.Context, x *xorm.Engine) error {
function inBoxData (line 388) | func inBoxData(ctx context.Context, x *xorm.Engine) error {
FILE: internal/migrations/v14.go
function updateTheLengthOfRevisionContent (line 31) | func updateTheLengthOfRevisionContent(ctx context.Context, x *xorm.Engin...
type RevisionV14 (line 39) | type RevisionV14 struct
method TableName (line 53) | func (RevisionV14) TableName() string {
FILE: internal/migrations/v15.go
function addNoticeConfig (line 29) | func addNoticeConfig(ctx context.Context, x *xorm.Engine) error {
FILE: internal/migrations/v16.go
function setDefaultUserNotificationConfig (line 31) | func setDefaultUserNotificationConfig(ctx context.Context, x *xorm.Engin...
FILE: internal/migrations/v17.go
function addRecoverPermission (line 32) | func addRecoverPermission(ctx context.Context, x *xorm.Engine) error {
FILE: internal/migrations/v18.go
function addPasswordLoginControl (line 33) | func addPasswordLoginControl(ctx context.Context, x *xorm.Engine) error {
FILE: internal/migrations/v19.go
function addNotificationPluginAndThemeConfig (line 29) | func addNotificationPluginAndThemeConfig(ctx context.Context, x *xorm.En...
FILE: internal/migrations/v2.go
function addTagRecommendedAndReserved (line 28) | func addTagRecommendedAndReserved(ctx context.Context, x *xorm.Engine) e...
FILE: internal/migrations/v20.go
function addReview (line 31) | func addReview(ctx context.Context, x *xorm.Engine) error {
FILE: internal/migrations/v21.go
function addQuestionHotScore (line 28) | func addQuestionHotScore(ctx context.Context, x *xorm.Engine) error {
FILE: internal/migrations/v22.go
function addBadges (line 32) | func addBadges(ctx context.Context, x *xorm.Engine) (err error) {
FILE: internal/migrations/v23.go
function addQuestionLink (line 29) | func addQuestionLink(ctx context.Context, x *xorm.Engine) (err error) {
FILE: internal/migrations/v24.go
function addQuestionLinkedCount (line 34) | func addQuestionLinkedCount(ctx context.Context, x *xorm.Engine) error {
FILE: internal/migrations/v25.go
function addFileRecord (line 31) | func addFileRecord(ctx context.Context, x *xorm.Engine) error {
FILE: internal/migrations/v26.go
function addPluginKVStorage (line 29) | func addPluginKVStorage(ctx context.Context, x *xorm.Engine) error {
FILE: internal/migrations/v27.go
function addSuspendedUntilToUser (line 34) | func addSuspendedUntilToUser(ctx context.Context, x *xorm.Engine) error {
function moveUserConfigToInterface (line 41) | func moveUserConfigToInterface(ctx context.Context, x *xorm.Engine) error {
FILE: internal/migrations/v28.go
function addOptionalTags (line 34) | func addOptionalTags(ctx context.Context, x *xorm.Engine) error {
FILE: internal/migrations/v29.go
function expandAvatarColumnLength (line 29) | func expandAvatarColumnLength(ctx context.Context, x *xorm.Engine) error {
FILE: internal/migrations/v3.go
function addActivityTimeline (line 33) | func addActivityTimeline(ctx context.Context, x *xorm.Engine) (err error) {
FILE: internal/migrations/v30.go
function updateAdminMenuSettings (line 35) | func updateAdminMenuSettings(ctx context.Context, x *xorm.Engine) (err e...
function splitWriteMenu (line 54) | func splitWriteMenu(ctx context.Context, x *xorm.Engine) error {
function splitInterfaceMenu (line 159) | func splitInterfaceMenu(ctx context.Context, x *xorm.Engine) error {
function splitLegalMenu (line 238) | func splitLegalMenu(ctx context.Context, x *xorm.Engine) error {
FILE: internal/migrations/v31.go
function aiFeat (line 34) | func aiFeat(ctx context.Context, x *xorm.Engine) error {
function addAIConversationTables (line 45) | func addAIConversationTables(ctx context.Context, x *xorm.Engine) error {
function addAPIKey (line 57) | func addAPIKey(ctx context.Context, x *xorm.Engine) error {
FILE: internal/migrations/v4.go
function addRoleFeatures (line 32) | func addRoleFeatures(ctx context.Context, x *xorm.Engine) error {
FILE: internal/migrations/v5.go
function addThemeAndPrivateMode (line 32) | func addThemeAndPrivateMode(ctx context.Context, x *xorm.Engine) error {
FILE: internal/migrations/v6.go
function addNewAnswerNotification (line 31) | func addNewAnswerNotification(ctx context.Context, x *xorm.Engine) error {
FILE: internal/migrations/v7.go
function addPlugin (line 31) | func addPlugin(ctx context.Context, x *xorm.Engine) error {
FILE: internal/migrations/v8.go
function addRolePinAndHideFeatures (line 33) | func addRolePinAndHideFeatures(ctx context.Context, x *xorm.Engine) error {
FILE: internal/migrations/v9.go
function updateAcceptAnswerRank (line 31) | func updateAcceptAnswerRank(ctx context.Context, x *xorm.Engine) error {
FILE: internal/repo/activity/activity_repo.go
type activityRepo (line 36) | type activityRepo struct
method GetObjectAllActivity (line 52) | func (ar *activityRepo) GetObjectAllActivity(ctx context.Context, obje...
method getAllActivityType (line 68) | func (ar *activityRepo) getAllActivityType(ctx context.Context) (activ...
function NewActivityRepo (line 42) | func NewActivityRepo(
FILE: internal/repo/activity/answer_repo.go
type AnswerActivityRepo (line 45) | type AnswerActivityRepo struct
method SaveAcceptAnswerActivity (line 67) | func (ar *AnswerActivityRepo) SaveAcceptAnswerActivity(ctx context.Con...
method SaveCancelAcceptAnswerActivity (line 98) | func (ar *AnswerActivityRepo) SaveCancelAcceptAnswerActivity(ctx conte...
method acquireUserInfo (line 145) | func (ar *AnswerActivityRepo) acquireUserInfo(session *xorm.Session, u...
method saveActivitiesAvailable (line 164) | func (ar *AnswerActivityRepo) saveActivitiesAvailable(session *xorm.Se...
method cancelActivities (line 214) | func (ar *AnswerActivityRepo) cancelActivities(session *xorm.Session, ...
method changeUserRank (line 242) | func (ar *AnswerActivityRepo) changeUserRank(ctx context.Context, sess...
method rollbackUserRank (line 262) | func (ar *AnswerActivityRepo) rollbackUserRank(ctx context.Context, se...
method getExistActivity (line 282) | func (ar *AnswerActivityRepo) getExistActivity(ctx context.Context, op...
method sendAcceptAnswerNotification (line 301) | func (ar *AnswerActivityRepo) sendAcceptAnswerNotification(
method sendCancelAcceptAnswerNotification (line 331) | func (ar *AnswerActivityRepo) sendCancelAcceptAnswerNotification(
function NewAnswerActivityRepo (line 53) | func NewAnswerActivityRepo(
FILE: internal/repo/activity/follow_repo.go
type FollowRepo (line 41) | type FollowRepo struct
method Follow (line 60) | func (ar *FollowRepo) Follow(ctx context.Context, objectID, userID str...
method FollowCancel (line 127) | func (ar *FollowRepo) FollowCancel(ctx context.Context, objectID, user...
method updateFollows (line 171) | func (ar *FollowRepo) updateFollows(_ context.Context, session *xorm.S...
function NewFollowRepo (line 48) | func NewFollowRepo(
FILE: internal/repo/activity/review_repo.go
type ReviewActivityRepo (line 42) | type ReviewActivityRepo struct
method Review (line 69) | func (ar *ReviewActivityRepo) Review(ctx context.Context, act *schema....
constant EditAccepted (line 50) | EditAccepted = "edit.accepted"
function NewReviewActivityRepo (line 54) | func NewReviewActivityRepo(
FILE: internal/repo/activity/user_active_repo.go
type UserActiveActivityRepo (line 40) | type UserActiveActivityRepo struct
method UserActive (line 67) | func (ar *UserActiveActivityRepo) UserActive(ctx context.Context, user...
constant UserActivated (line 48) | UserActivated = "user.activated"
function NewUserActiveActivityRepo (line 52) | func NewUserActiveActivityRepo(
FILE: internal/repo/activity/vote_repo.go
type VoteRepo (line 50) | type VoteRepo struct
method Vote (line 72) | func (vr *VoteRepo) Vote(ctx context.Context, op *schema.VoteOperation...
method CancelVote (line 131) | func (vr *VoteRepo) CancelVote(ctx context.Context, op *schema.VoteOpe...
method GetAndSaveVoteResult (line 183) | func (vr *VoteRepo) GetAndSaveVoteResult(ctx context.Context, objectID...
method ListUserVotes (line 191) | func (vr *VoteRepo) ListUserVotes(ctx context.Context, userID string,
method votePreCheck (line 210) | func (vr *VoteRepo) votePreCheck(ctx context.Context, op *schema.VoteO...
method acquireUserInfo (line 224) | func (vr *VoteRepo) acquireUserInfo(session *xorm.Session, userIDs []s...
method setActivityRankToZeroIfUserReachLimit (line 239) | func (vr *VoteRepo) setActivityRankToZeroIfUserReachLimit(ctx context....
method changeUserRank (line 268) | func (vr *VoteRepo) changeUserRank(ctx context.Context, session *xorm....
method rollbackUserRank (line 288) | func (vr *VoteRepo) rollbackUserRank(ctx context.Context, session *xor...
method saveActivitiesAvailable (line 312) | func (vr *VoteRepo) saveActivitiesAvailable(session *xorm.Session, op ...
method cancelActivities (line 363) | func (vr *VoteRepo) cancelActivities(session *xorm.Session, activities...
method getExistActivity (line 391) | func (vr *VoteRepo) getExistActivity(ctx context.Context, op *schema.V...
method countVoteUp (line 411) | func (vr *VoteRepo) countVoteUp(ctx context.Context, objectID, objectT...
method countVoteDown (line 419) | func (vr *VoteRepo) countVoteDown(ctx context.Context, objectID, objec...
method countVote (line 427) | func (vr *VoteRepo) countVote(ctx context.Context, objectID, objectTyp...
method updateVotes (line 440) | func (vr *VoteRepo) updateVotes(ctx context.Context, objectID, objectT...
method sendAchievementNotification (line 456) | func (vr *VoteRepo) sendAchievementNotification(ctx context.Context, a...
method sendVoteInboxNotification (line 472) | func (vr *VoteRepo) sendVoteInboxNotification(ctx context.Context, tri...
function NewVoteRepo (line 58) | func NewVoteRepo(
FILE: internal/repo/activity_common/activity_repo.go
type ActivityRepo (line 42) | type ActivityRepo struct
method GetActivityTypeByObjID (line 61) | func (ar *ActivityRepo) GetActivityTypeByObjID(ctx context.Context, ob...
method GetActivityTypeByObjectType (line 81) | func (ar *ActivityRepo) GetActivityTypeByObjectType(ctx context.Contex...
method GetActivityTypeByConfigKey (line 90) | func (ar *ActivityRepo) GetActivityTypeByConfigKey(ctx context.Context...
method GetActivity (line 98) | func (ar *ActivityRepo) GetActivity(ctx context.Context, session *xorm...
method GetUserActivitiesByActivityType (line 110) | func (ar *ActivityRepo) GetUserActivitiesByActivityType(ctx context.Co...
method GetUserIDObjectIDActivitySum (line 123) | func (ar *ActivityRepo) GetUserIDObjectIDActivitySum(ctx context.Conte...
method AddActivity (line 139) | func (ar *ActivityRepo) AddActivity(ctx context.Context, activity *ent...
method GetUsersWhoHasGainedTheMostReputation (line 148) | func (ar *ActivityRepo) GetUsersWhoHasGainedTheMostReputation(
method GetUsersWhoHasVoteMost (line 166) | func (ar *ActivityRepo) GetUsersWhoHasVoteMost(
function NewActivityRepo (line 49) | func NewActivityRepo(
FILE: internal/repo/activity_common/follow.go
type FollowRepo (line 39) | type FollowRepo struct
method GetFollowAmount (line 59) | func (ar *FollowRepo) GetFollowAmount(ctx context.Context, objectID st...
method GetFollowUserIDs (line 94) | func (ar *FollowRepo) GetFollowUserIDs(ctx context.Context, objectID s...
method GetFollowIDs (line 119) | func (ar *FollowRepo) GetFollowIDs(ctx context.Context, userID, object...
method IsFollowed (line 137) | func (ar *FollowRepo) IsFollowed(ctx context.Context, userID, objectID...
method MigrateFollowers (line 164) | func (ar *FollowRepo) MigrateFollowers(ctx context.Context, sourceObje...
function NewFollowRepo (line 46) | func NewFollowRepo(
FILE: internal/repo/activity_common/vote.go
type VoteRepo (line 36) | type VoteRepo struct
method GetVoteStatus (line 49) | func (vr *VoteRepo) GetVoteStatus(ctx context.Context, objectID, userI...
method GetVoteCount (line 76) | func (vr *VoteRepo) GetVoteCount(ctx context.Context, activityTypes []...
function NewVoteRepo (line 42) | func NewVoteRepo(data *data.Data, activityRepo activity_common.ActivityR...
FILE: internal/repo/ai_conversation/ai_conversation_repo.go
type AIConversationRepo (line 36) | type AIConversationRepo interface
type aiConversationRepo (line 51) | type aiConversationRepo struct
method CreateConversation (line 63) | func (r *aiConversationRepo) CreateConversation(ctx context.Context, c...
method GetConversation (line 73) | func (r *aiConversationRepo) GetConversation(ctx context.Context, conv...
method UpdateConversation (line 84) | func (r *aiConversationRepo) UpdateConversation(ctx context.Context, c...
method GetConversationsPage (line 94) | func (r *aiConversationRepo) GetConversationsPage(ctx context.Context,...
method CreateRecord (line 104) | func (r *aiConversationRepo) CreateRecord(ctx context.Context, record ...
method GetRecordsByConversationID (line 114) | func (r *aiConversationRepo) GetRecordsByConversationID(ctx context.Co...
method UpdateRecordVote (line 128) | func (r *aiConversationRepo) UpdateRecordVote(ctx context.Context, con...
method GetRecord (line 138) | func (r *aiConversationRepo) GetRecord(ctx context.Context, recordID i...
method GetRecordByChatCompletionID (line 149) | func (r *aiConversationRepo) GetRecordByChatCompletionID(ctx context.C...
method GetConversationsForAdmin (line 161) | func (r *aiConversationRepo) GetConversationsForAdmin(ctx context.Cont...
method GetConversationWithVoteStats (line 171) | func (r *aiConversationRepo) GetConversationWithVoteStats(ctx context....
method DeleteConversation (line 185) | func (r *aiConversationRepo) DeleteConversation(ctx context.Context, c...
function NewAIConversationRepo (line 56) | func NewAIConversationRepo(data *data.Data) AIConversationRepo {
FILE: internal/repo/answer/answer_repo.go
type answerRepo (line 44) | type answerRepo struct
method AddAnswer (line 67) | func (ar *answerRepo) AddAnswer(ctx context.Context, answer *entity.An...
method RemoveAnswer (line 88) | func (ar *answerRepo) RemoveAnswer(ctx context.Context, answerID strin...
method RecoverAnswer (line 101) | func (ar *answerRepo) RecoverAnswer(ctx context.Context, answerID stri...
method RemoveAllUserAnswer (line 114) | func (ar *answerRepo) RemoveAllUserAnswer(ctx context.Context, userID ...
method UpdateAnswer (line 148) | func (ar *answerRepo) UpdateAnswer(ctx context.Context, answer *entity...
method UpdateAnswerStatus (line 159) | func (ar *answerRepo) UpdateAnswerStatus(ctx context.Context, answerID...
method GetAnswer (line 170) | func (ar *answerRepo) GetAnswer(ctx context.Context, id string) (
method GetAnswerCount (line 187) | func (ar *answerRepo) GetAnswerCount(ctx context.Context) (count int64...
method GetAnswerList (line 197) | func (ar *answerRepo) GetAnswerList(ctx context.Context, answer *entit...
method GetAnswerPage (line 215) | func (ar *answerRepo) GetAnswerPage(ctx context.Context, page, pageSiz...
method UpdateAcceptedStatus (line 233) | func (ar *answerRepo) UpdateAcceptedStatus(ctx context.Context, accept...
method GetByID (line 259) | func (ar *answerRepo) GetByID(ctx context.Context, answerID string) (*...
method GetByIDs (line 273) | func (ar *answerRepo) GetByIDs(ctx context.Context, answerIDs ...strin...
method GetCountByQuestionID (line 291) | func (ar *answerRepo) GetCountByQuestionID(ctx context.Context, questi...
method GetCountByUserID (line 301) | func (ar *answerRepo) GetCountByUserID(ctx context.Context, userID str...
method GetIDsByUserIDAndQuestionID (line 310) | func (ar *answerRepo) GetIDsByUserIDAndQuestionID(ctx context.Context,...
method SearchList (line 329) | func (ar *answerRepo) SearchList(ctx context.Context, search *entity.A...
method GetPersonalAnswerPage (line 387) | func (ar *answerRepo) GetPersonalAnswerPage(ctx context.Context, req *...
method AdminSearchList (line 422) | func (ar *answerRepo) AdminSearchList(ctx context.Context, req *schema...
method SumVotesByQuestionID (line 452) | func (ar *answerRepo) SumVotesByQuestionID(ctx context.Context, questi...
method updateSearch (line 463) | func (ar *answerRepo) updateSearch(ctx context.Context, answerID strin...
method DeletePermanentlyAnswers (line 532) | func (ar *answerRepo) DeletePermanentlyAnswers(ctx context.Context) er...
function NewAnswerRepo (line 52) | func NewAnswerRepo(
FILE: internal/repo/api_key/api_key_repo.go
type apiKeyRepo (line 32) | type apiKeyRepo struct
method GetAPIKeyList (line 43) | func (ar *apiKeyRepo) GetAPIKeyList(ctx context.Context) (keys []*enti...
method GetAPIKey (line 52) | func (ar *apiKeyRepo) GetAPIKey(ctx context.Context, apiKey string) (k...
method UpdateAPIKey (line 61) | func (ar *apiKeyRepo) UpdateAPIKey(ctx context.Context, apiKey entity....
method AddAPIKey (line 69) | func (ar *apiKeyRepo) AddAPIKey(ctx context.Context, apiKey entity.API...
method DeleteAPIKey (line 77) | func (ar *apiKeyRepo) DeleteAPIKey(ctx context.Context, id int) (err e...
function NewAPIKeyRepo (line 37) | func NewAPIKeyRepo(data *data.Data) apikey.APIKeyRepo {
FILE: internal/repo/auth/auth.go
type authRepo (line 37) | type authRepo struct
method GetUserCacheInfo (line 49) | func (ar *authRepo) GetUserCacheInfo(ctx context.Context, accessToken ...
method SetUserCacheInfo (line 63) | func (ar *authRepo) SetUserCacheInfo(ctx context.Context,
method GetUserVisitCacheInfo (line 89) | func (ar *authRepo) GetUserVisitCacheInfo(ctx context.Context, visitTo...
method RemoveUserCacheInfo (line 101) | func (ar *authRepo) RemoveUserCacheInfo(ctx context.Context, accessTok...
method RemoveUserVisitCacheInfo (line 110) | func (ar *authRepo) RemoveUserVisitCacheInfo(ctx context.Context, visi...
method SetUserStatus (line 119) | func (ar *authRepo) SetUserStatus(ctx context.Context, userID string, ...
method GetUserStatus (line 133) | func (ar *authRepo) GetUserStatus(ctx context.Context, userID string) ...
method RemoveUserStatus (line 147) | func (ar *authRepo) RemoveUserStatus(ctx context.Context, userID strin...
method GetAdminUserCacheInfo (line 156) | func (ar *authRepo) GetAdminUserCacheInfo(ctx context.Context, accessT...
method SetAdminUserCacheInfo (line 171) | func (ar *authRepo) SetAdminUserCacheInfo(ctx context.Context, accessT...
method RemoveAdminUserCacheInfo (line 186) | func (ar *authRepo) RemoveAdminUserCacheInfo(ctx context.Context, acce...
method AddUserTokenMapping (line 195) | func (ar *authRepo) AddUserTokenMapping(ctx context.Context, userID, a...
method RemoveUserTokens (line 211) | func (ar *authRepo) RemoveUserTokens(ctx context.Context, userID strin...
function NewAuthRepo (line 42) | func NewAuthRepo(data *data.Data) auth.AuthRepo {
FILE: internal/repo/badge/badge_event_rule.go
type eventRuleRepo (line 37) | type eventRuleRepo struct
method HandleEventWithRule (line 73) | func (br *eventRuleRepo) HandleEventWithRule(ctx context.Context, msg ...
method FirstUpdateUserProfile (line 88) | func (br *eventRuleRepo) FirstUpdateUserProfile(ctx context.Context,
method FirstPostEdit (line 108) | func (br *eventRuleRepo) FirstPostEdit(ctx context.Context,
method FirstFlaggedPost (line 118) | func (br *eventRuleRepo) FirstFlaggedPost(ctx context.Context,
method FirstVotedPost (line 128) | func (br *eventRuleRepo) FirstVotedPost(ctx context.Context,
method FirstReactedPost (line 138) | func (br *eventRuleRepo) FirstReactedPost(ctx context.Context,
method FirstSharedPost (line 148) | func (br *eventRuleRepo) FirstSharedPost(ctx context.Context,
method FirstAcceptAnswer (line 158) | func (br *eventRuleRepo) FirstAcceptAnswer(ctx context.Context,
method ReachAnswerAcceptedAmount (line 168) | func (br *eventRuleRepo) ReachAnswerAcceptedAmount(ctx context.Context,
method ReachAnswerVote (line 197) | func (br *eventRuleRepo) ReachAnswerVote(ctx context.Context,
method ReachQuestionVote (line 218) | func (br *eventRuleRepo) ReachQuestionVote(ctx context.Context,
method getBadgesByHandler (line 238) | func (br *eventRuleRepo) getBadgesByHandler(ctx context.Context, handl...
method createBadgeAward (line 248) | func (br *eventRuleRepo) createBadgeAward(userID, awardKey string, bad...
function NewEventRuleRepo (line 43) | func NewEventRuleRepo(data *data.Data) badge.EventRuleRepo {
FILE: internal/repo/badge/badge_repo.go
type badgeRepo (line 35) | type badgeRepo struct
method GetByID (line 48) | func (r *badgeRepo) GetByID(ctx context.Context, id string) (badge *en...
method GetByIDs (line 57) | func (r *badgeRepo) GetByIDs(ctx context.Context, ids []string) (badge...
method ListPaged (line 67) | func (r *badgeRepo) ListPaged(ctx context.Context, page int, pageSize ...
method ListActivated (line 85) | func (r *badgeRepo) ListActivated(ctx context.Context, page int, pageS...
method ListInactivated (line 103) | func (r *badgeRepo) ListInactivated(ctx context.Context, page int, pag...
method UpdateStatus (line 121) | func (r *badgeRepo) UpdateStatus(ctx context.Context, id string, statu...
method UpdateAwardCount (line 146) | func (r *badgeRepo) UpdateAwardCount(ctx context.Context, badgeID stri...
function NewBadgeRepo (line 41) | func NewBadgeRepo(data *data.Data, uniqueIDRepo unique.UniqueIDRepo) bad...
FILE: internal/repo/badge_award/badge_award_repo.go
type badgeAwardRepo (line 36) | type badgeAwardRepo struct
method AwardBadgeForUser (line 49) | func (r *badgeAwardRepo) AwardBadgeForUser(ctx context.Context, badgeA...
method CheckIsAward (line 97) | func (r *badgeAwardRepo) CheckIsAward(ctx context.Context, badgeID, us...
method CountByUserIdAndBadgeId (line 110) | func (r *badgeAwardRepo) CountByUserIdAndBadgeId(ctx context.Context, ...
method CountByBadgeID (line 118) | func (r *badgeAwardRepo) CountByBadgeID(ctx context.Context, badgeID s...
method SumUserEarnedGroupByBadgeID (line 126) | func (r *badgeAwardRepo) SumUserEarnedGroupByBadgeID(ctx context.Conte...
method ListPagedByBadgeId (line 132) | func (r *badgeAwardRepo) ListPagedByBadgeId(ctx context.Context, badge...
method ListPagedByBadgeIdAndUserId (line 143) | func (r *badgeAwardRepo) ListPagedByBadgeIdAndUserId(ctx context.Conte...
method ListNewestEarned (line 154) | func (r *badgeAwardRepo) ListNewestEarned(ctx context.Context, userID ...
method GetByUserIdAndBadgeId (line 166) | func (r *badgeAwardRepo) GetByUserIdAndBadgeId(ctx context.Context, us...
method GetByUserIdAndBadgeIdAndAwardKey (line 178) | func (r *badgeAwardRepo) GetByUserIdAndBadgeIdAndAwardKey(ctx context....
method DeleteUserBadgeAward (line 190) | func (r *badgeAwardRepo) DeleteUserBadgeAward(ctx context.Context, use...
function NewBadgeAwardRepo (line 41) | func NewBadgeAwardRepo(data *data.Data, uniqueIDRepo unique.UniqueIDRepo...
FILE: internal/repo/badge_group/badge_group_repo.go
type badgeGroupRepo (line 31) | type badgeGroupRepo struct
method ListGroups (line 43) | func (r *badgeGroupRepo) ListGroups(ctx context.Context) (groups []*en...
method AddGroup (line 49) | func (r *badgeGroupRepo) AddGroup(ctx context.Context, group *entity.B...
function NewBadgeGroupRepo (line 36) | func NewBadgeGroupRepo(data *data.Data, uniqueIDRepo unique.UniqueIDRepo...
FILE: internal/repo/captcha/captcha.go
type captchaRepo (line 37) | type captchaRepo struct
method SetActionType (line 48) | func (cr *captchaRepo) SetActionType(ctx context.Context, unit, action...
method GetActionType (line 65) | func (cr *captchaRepo) GetActionType(ctx context.Context, unit, action...
method DelActionType (line 80) | func (cr *captchaRepo) DelActionType(ctx context.Context, unit, action...
method SetCaptcha (line 91) | func (cr *captchaRepo) SetCaptcha(ctx context.Context, key, captcha st...
method GetCaptcha (line 100) | func (cr *captchaRepo) GetCaptcha(ctx context.Context, key string) (ca...
method DelCaptcha (line 111) | func (cr *captchaRepo) DelCaptcha(ctx context.Context, key string) (er...
function NewCaptchaRepo (line 42) | func NewCaptchaRepo(data *data.Data) action.CaptchaRepo {
FILE: internal/repo/collection/collection_group_repo.go
type collectionGroupRepo (line 37) | type collectionGroupRepo struct
method AddCollectionGroup (line 49) | func (cr *collectionGroupRepo) AddCollectionGroup(ctx context.Context,...
method AddCollectionDefaultGroup (line 58) | func (cr *collectionGroupRepo) AddCollectionDefaultGroup(ctx context.C...
method CreateDefaultGroupIfNotExist (line 74) | func (cr *collectionGroupRepo) CreateDefaultGroupIfNotExist(ctx contex...
method UpdateCollectionGroup (line 110) | func (cr *collectionGroupRepo) UpdateCollectionGroup(ctx context.Conte...
method GetCollectionGroup (line 119) | func (cr *collectionGroupRepo) GetCollectionGroup(ctx context.Context,...
method GetCollectionGroupPage (line 131) | func (cr *collectionGroupRepo) GetCollectionGroupPage(ctx context.Cont...
method GetDefaultID (line 145) | func (cr *collectionGroupRepo) GetDefaultID(ctx context.Context, userI...
function NewCollectionGroupRepo (line 42) | func NewCollectionGroupRepo(data *data.Data) collection.CollectionGroupR...
FILE: internal/repo/collection/collection_repo.go
type collectionRepo (line 39) | type collectionRepo struct
method AddCollection (line 53) | func (cr *collectionRepo) AddCollection(ctx context.Context, collectio...
method RemoveCollection (line 85) | func (cr *collectionRepo) RemoveCollection(ctx context.Context, id str...
method UpdateCollection (line 94) | func (cr *collectionRepo) UpdateCollection(ctx context.Context, collec...
method GetCollection (line 100) | func (cr *collectionRepo) GetCollection(ctx context.Context, id int) (...
method GetCollectionList (line 110) | func (cr *collectionRepo) GetCollectionList(ctx context.Context, colle...
method GetOneByObjectIDAndUser (line 118) | func (cr *collectionRepo) GetOneByObjectIDAndUser(ctx context.Context,...
method SearchByObjectIDsAndUser (line 128) | func (cr *collectionRepo) SearchByObjectIDsAndUser(ctx context.Context...
method CountByObjectID (line 138) | func (cr *collectionRepo) CountByObjectID(ctx context.Context, objectI...
method GetCollectionPage (line 148) | func (cr *collectionRepo) GetCollectionPage(ctx context.Context, page,...
method SearchObjectCollected (line 169) | func (cr *collectionRepo) SearchObjectCollected(ctx context.Context, u...
method SearchList (line 191) | func (cr *collectionRepo) SearchList(ctx context.Context, search *enti...
function NewCollectionRepo (line 45) | func NewCollectionRepo(data *data.Data, uniqueIDRepo unique.UniqueIDRepo...
FILE: internal/repo/comment/comment_repo.go
type commentRepo (line 38) | type commentRepo struct
method AddComment (line 60) | func (cr *commentRepo) AddComment(ctx context.Context, comment *entity...
method RemoveComment (line 73) | func (cr *commentRepo) RemoveComment(ctx context.Context, commentID st...
method UpdateCommentContent (line 83) | func (cr *commentRepo) UpdateCommentContent(
method UpdateCommentStatus (line 96) | func (cr *commentRepo) UpdateCommentStatus(ctx context.Context, commen...
method GetComment (line 107) | func (cr *commentRepo) GetComment(ctx context.Context, commentID strin...
method GetCommentWithoutStatus (line 118) | func (cr *commentRepo) GetCommentWithoutStatus(ctx context.Context, co...
method GetCommentCount (line 128) | func (cr *commentRepo) GetCommentCount(ctx context.Context) (count int...
method GetCommentPage (line 138) | func (cr *commentRepo) GetCommentPage(ctx context.Context, commentQuer...
method RemoveAllUserComment (line 156) | func (cr *commentRepo) RemoveAllUserComment(ctx context.Context, userI...
function NewCommentRepo (line 44) | func NewCommentRepo(data *data.Data, uniqueIDRepo unique.UniqueIDRepo) c...
function NewCommentCommonRepo (line 52) | func NewCommentCommonRepo(data *data.Data, uniqueIDRepo unique.UniqueIDR...
FILE: internal/repo/config/config_repo.go
type configRepo (line 36) | type configRepo struct
method GetConfigByID (line 48) | func (cr configRepo) GetConfigByID(ctx context.Context, id int) (c *en...
method GetConfigByKey (line 75) | func (cr configRepo) GetConfigByKey(ctx context.Context, key string) (...
method GetConfigByKeyFromDB (line 102) | func (cr configRepo) GetConfigByKeyFromDB(ctx context.Context, key str...
method UpdateConfig (line 114) | func (cr configRepo) UpdateConfig(ctx context.Context, key string, val...
function NewConfigRepo (line 41) | func NewConfigRepo(data *data.Data) config.ConfigRepo {
FILE: internal/repo/export/email_repo.go
type emailRepo (line 36) | type emailRepo struct
method SetCode (line 48) | func (e *emailRepo) SetCode(ctx context.Context, userID, code, content...
method VerifyCode (line 63) | func (e *emailRepo) VerifyCode(ctx context.Context, code string) (cont...
function NewEmailRepo (line 41) | func NewEmailRepo(data *data.Data) export.EmailRepo {
FILE: internal/repo/file_record/file_record_repo.go
type fileRecordRepo (line 35) | type fileRecordRepo struct
method AddFileRecord (line 47) | func (fr *fileRecordRepo) AddFileRecord(ctx context.Context, fileRecor...
method GetFileRecordPage (line 56) | func (fr *fileRecordRepo) GetFileRecordPage(ctx context.Context, page,...
method DeleteFileRecord (line 69) | func (fr *fileRecordRepo) DeleteFileRecord(ctx context.Context, id int...
method UpdateFileRecord (line 78) | func (fr *fileRecordRepo) UpdateFileRecord(ctx context.Context, fileRe...
method GetFileRecordByURL (line 87) | func (fr *fileRecordRepo) GetFileRecordByURL(ctx context.Context, file...
function NewFileRecordRepo (line 40) | func NewFileRecordRepo(data *data.Data) file_record.FileRecordRepo {
FILE: internal/repo/limit/limit.go
type LimitRepo (line 34) | type LimitRepo struct
method CheckAndRecord (line 46) | func (lr *LimitRepo) CheckAndRecord(ctx context.Context, key string) (...
method ClearRecord (line 63) | func (lr *LimitRepo) ClearRecord(ctx context.Context, key string) error {
function NewRateLimitRepo (line 39) | func NewRateLimitRepo(data *data.Data) *LimitRepo {
FILE: internal/repo/meta/meta_repo.go
type metaRepo (line 35) | type metaRepo struct
method AddMeta (line 47) | func (mr *metaRepo) AddMeta(ctx context.Context, meta *entity.Meta) (e...
method RemoveMeta (line 56) | func (mr *metaRepo) RemoveMeta(ctx context.Context, id int) (err error) {
method UpdateMeta (line 65) | func (mr *metaRepo) UpdateMeta(ctx context.Context, meta *entity.Meta)...
method AddOrUpdateMetaByObjectIdAndKey (line 74) | func (mr *metaRepo) AddOrUpdateMetaByObjectIdAndKey(ctx context.Contex...
method GetMetaByObjectIdAndKey (line 103) | func (mr *metaRepo) GetMetaByObjectIdAndKey(ctx context.Context, objec...
method GetMetaList (line 114) | func (mr *metaRepo) GetMetaList(ctx context.Context, meta *entity.Meta...
function NewMetaRepo (line 40) | func NewMetaRepo(data *data.Data) metacommon.MetaRepo {
FILE: internal/repo/notification/notification_repo.go
type notificationRepo (line 37) | type notificationRepo struct
method AddNotification (line 49) | func (nr *notificationRepo) AddNotification(ctx context.Context, notif...
method UpdateNotificationContent (line 58) | func (nr *notificationRepo) UpdateNotificationContent(ctx context.Cont...
method ClearUnRead (line 69) | func (nr *notificationRepo) ClearUnRead(ctx context.Context, userID st...
method ClearIDUnRead (line 79) | func (nr *notificationRepo) ClearIDUnRead(ctx context.Context, userID ...
method GetById (line 89) | func (nr *notificationRepo) GetById(ctx context.Context, id string) (*...
method GetByUserIdObjectIdTypeId (line 99) | func (nr *notificationRepo) GetByUserIdObjectIdTypeId(ctx context.Cont...
method GetNotificationPage (line 109) | func (nr *notificationRepo) GetNotificationPage(ctx context.Context, s...
method CountNotificationByUser (line 133) | func (nr *notificationRepo) CountNotificationByUser(ctx context.Contex...
method DeleteNotification (line 141) | func (nr *notificationRepo) DeleteNotification(ctx context.Context, us...
method DeleteUserNotificationConfig (line 149) | func (nr *notificationRepo) DeleteUserNotificationConfig(ctx context.C...
function NewNotificationRepo (line 42) | func NewNotificationRepo(data *data.Data) notficationcommon.Notification...
FILE: internal/repo/plugin_config/plugin_config_repo.go
type pluginConfigRepo (line 32) | type pluginConfigRepo struct
method SavePluginConfig (line 43) | func (ur *pluginConfigRepo) SavePluginConfig(ctx context.Context, plug...
method GetPluginConfigAll (line 61) | func (ur *pluginConfigRepo) GetPluginConfigAll(ctx context.Context) (p...
function NewPluginConfigRepo (line 37) | func NewPluginConfigRepo(data *data.Data) plugin_common.PluginConfigRepo {
FILE: internal/repo/plugin_config/plugin_user_config_repo.go
type pluginUserConfigRepo (line 35) | type pluginUserConfigRepo struct
method SaveUserPluginConfig (line 46) | func (ur *pluginUserConfigRepo) SaveUserPluginConfig(ctx context.Conte...
method GetPluginUserConfig (line 79) | func (ur *pluginUserConfigRepo) GetPluginUserConfig(ctx context.Contex...
method GetPluginUserConfigPage (line 92) | func (ur *pluginUserConfigRepo) GetPluginUserConfigPage(ctx context.Co...
method DeleteUserPluginConfig (line 102) | func (ur *pluginUserConfigRepo) DeleteUserPluginConfig(ctx context.Con...
function NewPluginUserConfigRepo (line 40) | func NewPluginUserConfigRepo(data *data.Data) plugin_common.PluginUserCo...
FILE: internal/repo/question/question_repo.go
type questionRepo (line 49) | type questionRepo struct
method AddQuestion (line 66) | func (qr *questionRepo) AddQuestion(ctx context.Context, question *ent...
method RemoveQuestion (line 82) | func (qr *questionRepo) RemoveQuestion(ctx context.Context, id string)...
method UpdateQuestion (line 92) | func (qr *questionRepo) UpdateQuestion(ctx context.Context, question *...
method UpdatePvCount (line 105) | func (qr *questionRepo) UpdatePvCount(ctx context.Context, questionID ...
method UpdateAnswerCount (line 116) | func (qr *questionRepo) UpdateAnswerCount(ctx context.Context, questio...
method UpdateCollectionCount (line 128) | func (qr *questionRepo) UpdateCollectionCount(ctx context.Context, que...
method UpdateQuestionStatus (line 150) | func (qr *questionRepo) UpdateQuestionStatus(ctx context.Context, ques...
method UpdateQuestionStatusWithOutUpdateTime (line 160) | func (qr *questionRepo) UpdateQuestionStatusWithOutUpdateTime(ctx cont...
method DeletePermanentlyQuestions (line 170) | func (qr *questionRepo) DeletePermanentlyQuestions(ctx context.Context...
method RecoverQuestion (line 195) | func (qr *questionRepo) RecoverQuestion(ctx context.Context, questionI...
method UpdateQuestionOperation (line 205) | func (qr *questionRepo) UpdateQuestionOperation(ctx context.Context, q...
method UpdateAccepted (line 214) | func (qr *questionRepo) UpdateAccepted(ctx context.Context, question *...
method UpdateLastAnswer (line 224) | func (qr *questionRepo) UpdateLastAnswer(ctx context.Context, question...
method GetQuestion (line 235) | func (qr *questionRepo) GetQuestion(ctx context.Context, id string) (
method GetQuestionsByTitle (line 252) | func (qr *questionRepo) GetQuestionsByTitle(ctx context.Context, title...
method FindByID (line 271) | func (qr *questionRepo) FindByID(ctx context.Context, id []string) (qu...
method GetQuestionList (line 289) | func (qr *questionRepo) GetQuestionList(ctx context.Context, question ...
method GetQuestionCount (line 302) | func (qr *questionRepo) GetQuestionCount(ctx context.Context) (count i...
method GetUnansweredQuestionCount (line 312) | func (qr *questionRepo) GetUnansweredQuestionCount(ctx context.Context...
method GetResolvedQuestionCount (line 323) | func (qr *questionRepo) GetResolvedQuestionCount(ctx context.Context) ...
method GetUserQuestionCount (line 335) | func (qr *questionRepo) GetUserQuestionCount(ctx context.Context, user...
method SitemapQuestions (line 345) | func (qr *questionRepo) SitemapQuestions(ctx context.Context, page, pa...
method GetQuestionPage (line 395) | func (qr *questionRepo) GetQuestionPage(ctx context.Context, page, pag...
method GetRecommendQuestionPageByTags (line 460) | func (qr *questionRepo) GetRecommendQuestionPageByTags(ctx context.Con...
method AdminQuestionPage (line 514) | func (qr *questionRepo) AdminQuestionPage(ctx context.Context, search ...
method UpdateSearch (line 584) | func (qr *questionRepo) UpdateSearch(ctx context.Context, questionID s...
method RemoveAllUserQuestion (line 637) | func (qr *questionRepo) RemoveAllUserQuestion(ctx context.Context, use...
method LinkQuestion (line 671) | func (qr *questionRepo) LinkQuestion(ctx context.Context, link ...*ent...
method UpdateQuestionLinkCount (line 744) | func (qr *questionRepo) UpdateQuestionLinkCount(ctx context.Context, q...
method GetLinkedQuestionIDs (line 764) | func (qr *questionRepo) GetLinkedQuestionIDs(ctx context.Context, ques...
method RecoverQuestionLink (line 780) | func (qr *questionRepo) RecoverQuestionLink(ctx context.Context, links...
method RemoveQuestionLink (line 785) | func (qr *questionRepo) RemoveQuestionLink(ctx context.Context, links ...
method UpdateQuestionLinkStatus (line 790) | func (qr *questionRepo) UpdateQuestionLinkStatus(ctx context.Context, ...
method GetQuestionLink (line 820) | func (qr *questionRepo) GetQuestionLink(ctx context.Context, page, pag...
function NewQuestionRepo (line 55) | func NewQuestionRepo(
FILE: internal/repo/rank/user_rank_repo.go
type UserRankRepo (line 40) | type UserRankRepo struct
method GetMaxDailyRank (line 53) | func (ur *UserRankRepo) GetMaxDailyRank(ctx context.Context) (maxDaily...
method CheckReachLimit (line 61) | func (ur *UserRankRepo) CheckReachLimit(ctx context.Context, session *...
method ChangeUserRank (line 84) | func (ur *UserRankRepo) ChangeUserRank(
method TriggerUserRank (line 106) | func (ur *UserRankRepo) TriggerUserRank(ctx context.Context,
method checkUserMinRank (line 144) | func (ur *UserRankRepo) checkUserMinRank(_ context.Context, session *x...
method checkUserTodayRank (line 159) | func (ur *UserRankRepo) checkUserTodayRank(ctx context.Context,
method UserRankPage (line 201) | func (ur *UserRankRepo) UserRankPage(ctx context.Context, userID strin...
function NewUserRankRepo (line 46) | func NewUserRankRepo(data *data.Data, configService *config.ConfigServic...
FILE: internal/repo/reason/reason_repo.go
type reasonRepo (line 34) | type reasonRepo struct
method ListReasons (line 44) | func (rr *reasonRepo) ListReasons(ctx context.Context, objectType, act...
function NewReasonRepo (line 38) | func NewReasonRepo(configService *config.ConfigService) reason_common.Re...
FILE: internal/repo/repo_test/auth_test.go
function Test_authRepo_SetUserCacheInfo (line 38) | func Test_authRepo_SetUserCacheInfo(t *testing.T) {
function Test_authRepo_RemoveUserCacheInfo (line 49) | func Test_authRepo_RemoveUserCacheInfo(t *testing.T) {
function Test_authRepo_SetUserStatus (line 63) | func Test_authRepo_SetUserStatus(t *testing.T) {
function Test_authRepo_RemoveUserStatus (line 73) | func Test_authRepo_RemoveUserStatus(t *testing.T) {
function Test_authRepo_SetAdminUserCacheInfo (line 87) | func Test_authRepo_SetAdminUserCacheInfo(t *testing.T) {
function Test_authRepo_RemoveAdminUserCacheInfo (line 98) | func Test_authRepo_RemoveAdminUserCacheInfo(t *testing.T) {
FILE: internal/repo/repo_test/captcha_test.go
function Test_captchaRepo_DelActionType (line 37) | func Test_captchaRepo_DelActionType(t *testing.T) {
function Test_captchaRepo_SetCaptcha (line 50) | func Test_captchaRepo_SetCaptcha(t *testing.T) {
FILE: internal/repo/repo_test/comment_repo_test.go
function buildCommentEntity (line 35) | func buildCommentEntity() *entity.Comment {
function Test_commentRepo_AddComment (line 47) | func Test_commentRepo_AddComment(t *testing.T) {
function Test_commentRepo_GetCommentPage (line 58) | func Test_commentRepo_GetCommentPage(t *testing.T) {
function Test_commentRepo_UpdateComment (line 79) | func Test_commentRepo_UpdateComment(t *testing.T) {
function Test_commentRepo_CannotGetDeletedComment (line 100) | func Test_commentRepo_CannotGetDeletedComment(t *testing.T) {
FILE: internal/repo/repo_test/email_repo_test.go
function Test_emailRepo_VerifyCode (line 32) | func Test_emailRepo_VerifyCode(t *testing.T) {
FILE: internal/repo/repo_test/meta_repo_test.go
function buildMetaEntity (line 32) | func buildMetaEntity() *entity.Meta {
function Test_metaRepo_GetMetaByObjectIdAndKey (line 40) | func Test_metaRepo_GetMetaByObjectIdAndKey(t *testing.T) {
function Test_metaRepo_GetMetaList (line 56) | func Test_metaRepo_GetMetaList(t *testing.T) {
function Test_metaRepo_GetMetaPage (line 72) | func Test_metaRepo_GetMetaPage(t *testing.T) {
function Test_metaRepo_UpdateMeta (line 88) | func Test_metaRepo_UpdateMeta(t *testing.T) {
FILE: internal/repo/repo_test/notification_repo_test.go
function buildNotificationEntity (line 33) | func buildNotificationEntity() *entity.Notification {
function Test_notificationRepo_ClearIDUnRead (line 44) | func Test_notificationRepo_ClearIDUnRead(t *testing.T) {
function Test_notificationRepo_ClearUnRead (line 59) | func Test_notificationRepo_ClearUnRead(t *testing.T) {
function Test_notificationRepo_GetById (line 74) | func Test_notificationRepo_GetById(t *testing.T) {
function Test_notificationRepo_GetByUserIdObjectIdTypeId (line 86) | func Test_notificationRepo_GetByUserIdObjectIdTypeId(t *testing.T) {
function Test_notificationRepo_GetNotificationPage (line 98) | func Test_notificationRepo_GetNotificationPage(t *testing.T) {
function Test_notificationRepo_UpdateNotificationContent (line 110) | func Test_notificationRepo_UpdateNotificationContent(t *testing.T) {
FILE: internal/repo/repo_test/reason_repo_test.go
function Test_reasonRepo_ListReasons (line 34) | func Test_reasonRepo_ListReasons(t *testing.T) {
FILE: internal/repo/repo_test/recommend_test.go
function Test_questionRepo_GetRecommend (line 40) | func Test_questionRepo_GetRecommend(t *testing.T) {
FILE: internal/repo/repo_test/repo_main_test.go
function TestMain (line 73) | func TestMain(t *testing.M) {
type TestDBSetting (line 98) | type TestDBSetting struct
function initTestDataSource (line 107) | func initTestDataSource(dbSetting TestDBSetting) error {
function initDatabaseImage (line 139) | func initDatabaseImage(dbSetting TestDBSetting) (connection string, clea...
function initDatabase (line 182) | func initDatabase(dbSetting TestDBSetting) (dbEngine *xorm.Engine, err e...
function initCache (line 202) | func initCache() (newCache cache.Cache, err error) {
FILE: internal/repo/repo_test/revision_repo_test.go
function getRev (line 53) | func getRev(objID, title, content string) *entity.Revision {
function Test_revisionRepo_AddRevision (line 64) | func Test_revisionRepo_AddRevision(t *testing.T) {
function Test_revisionRepo_GetLastRevisionByObjectID (line 99) | func Test_revisionRepo_GetLastRevisionByObjectID(t *testing.T) {
function Test_revisionRepo_GetRevisionList (line 112) | func Test_revisionRepo_GetRevisionList(t *testing.T) {
FILE: internal/repo/repo_test/siteinfo_repo_test.go
function Test_siteInfoRepo_SaveByType (line 32) | func Test_siteInfoRepo_SaveByType(t *testing.T) {
FILE: internal/repo/repo_test/tag_rel_repo_test.go
function addTagRelList (line 52) | func addTagRelList() {
function Test_tagListRepo_BatchGetObjectTagRelList (line 60) | func Test_tagListRepo_BatchGetObjectTagRelList(t *testing.T) {
function Test_tagListRepo_CountTagRelByTagID (line 69) | func Test_tagListRepo_CountTagRelByTagID(t *testing.T) {
function Test_tagListRepo_GetObjectTagRelList (line 77) | func Test_tagListRepo_GetObjectTagRelList(t *testing.T) {
function Test_tagListRepo_GetObjectTagRelWithoutStatus (line 87) | func Test_tagListRepo_GetObjectTagRelWithoutStatus(t *testing.T) {
FILE: internal/repo/repo_test/tag_repo_test.go
function addTagList (line 65) | func addTagList() {
function Test_tagRepo_GetTagByID (line 74) | func Test_tagRepo_GetTagByID(t *testing.T) {
function Test_tagRepo_GetTagBySlugName (line 84) | func Test_tagRepo_GetTagBySlugName(t *testing.T) {
function Test_tagRepo_GetTagList (line 94) | func Test_tagRepo_GetTagList(t *testing.T) {
function Test_tagRepo_GetTagListByIDs (line 103) | func Test_tagRepo_GetTagListByIDs(t *testing.T) {
function Test_tagRepo_GetTagListByName (line 112) | func Test_tagRepo_GetTagListByName(t *testing.T) {
function Test_tagRepo_GetTagListByNames (line 121) | func Test_tagRepo_GetTagListByNames(t *testing.T) {
function Test_tagRepo_GetTagPage (line 130) | func Test_tagRepo_GetTagPage(t *testing.T) {
function Test_tagRepo_RemoveTag (line 139) | func Test_tagRepo_RemoveTag(t *testing.T) {
function Test_tagRepo_UpdateTag (line 153) | func Test_tagRepo_UpdateTag(t *testing.T) {
function Test_tagRepo_UpdateTagQuestionCount (line 169) | func Test_tagRepo_UpdateTagQuestionCount(t *testing.T) {
function Test_tagRepo_UpdateTagSynonym (line 182) | func Test_tagRepo_UpdateTagSynonym(t *testing.T) {
FILE: internal/repo/repo_test/user_backyard_repo_test.go
function Test_userAdminRepo_GetUserInfo (line 34) | func Test_userAdminRepo_GetUserInfo(t *testing.T) {
function Test_userAdminRepo_GetUserPage (line 42) | func Test_userAdminRepo_GetUserPage(t *testing.T) {
function Test_userAdminRepo_UpdateUserStatus (line 50) | func Test_userAdminRepo_UpdateUserStatus(t *testing.T) {
FILE: internal/repo/repo_test/user_repo_test.go
function Test_userRepo_AddUser (line 32) | func Test_userRepo_AddUser(t *testing.T) {
function Test_userRepo_BatchGetByID (line 47) | func Test_userRepo_BatchGetByID(t *testing.T) {
function Test_userRepo_GetByEmail (line 55) | func Test_userRepo_GetByEmail(t *testing.T) {
function Test_userRepo_GetByUserID (line 63) | func Test_userRepo_GetByUserID(t *testing.T) {
function Test_userRepo_GetByUsername (line 71) | func Test_userRepo_GetByUsername(t *testing.T) {
function Test_userRepo_IncreaseAnswerCount (line 79) | func Test_userRepo_IncreaseAnswerCount(t *testing.T) {
function Test_userRepo_IncreaseQuestionCount (line 90) | func Test_userRepo_IncreaseQuestionCount(t *testing.T) {
function Test_userRepo_UpdateEmail (line 101) | func Test_userRepo_UpdateEmail(t *testing.T) {
function Test_userRepo_UpdateEmailStatus (line 107) | func Test_userRepo_UpdateEmailStatus(t *testing.T) {
function Test_userRepo_UpdateInfo (line 113) | func Test_userRepo_UpdateInfo(t *testing.T) {
function Test_userRepo_UpdateLastLoginDate (line 124) | func Test_userRepo_UpdateLastLoginDate(t *testing.T) {
function Test_userRepo_UpdateNoticeStatus (line 130) | func Test_userRepo_UpdateNoticeStatus(t *testing.T) {
function Test_userRepo_UpdatePass (line 136) | func Test_userRepo_UpdatePass(t *testing.T) {
FILE: internal/repo/report/report_repo.go
type reportRepo (line 37) | type reportRepo struct
method AddReport (line 51) | func (rr *reportRepo) AddReport(ctx context.Context, report *entity.Re...
method GetReportListPage (line 64) | func (rr *reportRepo) GetReportListPage(ctx context.Context, dto *sche...
method GetByID (line 77) | func (rr *reportRepo) GetByID(ctx context.Context, id string) (report ...
method UpdateStatus (line 87) | func (rr *reportRepo) UpdateStatus(ctx context.Context, id string, sta...
method GetReportCount (line 95) | func (rr *reportRepo) GetReportCount(ctx context.Context) (count int64...
function NewReportRepo (line 43) | func NewReportRepo(data *data.Data, uniqueIDRepo unique.UniqueIDRepo) re...
FILE: internal/repo/review/review_repo.go
type reviewRepo (line 34) | type reviewRepo struct
method AddReview (line 46) | func (cr *reviewRepo) AddReview(ctx context.Context, review *entity.Re...
method UpdateReviewStatus (line 55) | func (cr *reviewRepo) UpdateReviewStatus(ctx context.Context, reviewID...
method GetReview (line 65) | func (cr *reviewRepo) GetReview(ctx context.Context, reviewID int) (
method GetReviewByObject (line 76) | func (cr *reviewRepo) GetReviewByObject(ctx context.Context, objectID ...
method GetReviewCount (line 86) | func (cr *reviewRepo) GetReviewCount(ctx context.Context, status int) ...
method GetReviewPage (line 95) | func (cr *reviewRepo) GetReviewPage(ctx context.Context, page, pageSiz...
function NewReviewRepo (line 39) | func NewReviewRepo(data *data.Data) review.ReviewRepo {
FILE: internal/repo/revision/revision_repo.go
type revisionRepo (line 40) | type revisionRepo struct
method AddRevision (line 57) | func (rr *revisionRepo) AddRevision(ctx context.Context, revision *ent...
method UpdateObjectRevisionId (line 88) | func (rr *revisionRepo) UpdateObjectRevisionId(ctx context.Context, re...
method UpdateStatus (line 105) | func (rr *revisionRepo) UpdateStatus(ctx context.Context, id string, s...
method GetRevision (line 121) | func (rr *revisionRepo) GetRevision(ctx context.Context, id string) (
method GetRevisionByID (line 133) | func (rr *revisionRepo) GetRevisionByID(ctx context.Context, revisionI...
method ExistUnreviewedByObjectID (line 143) | func (rr *revisionRepo) ExistUnreviewedByObjectID(ctx context.Context,...
method GetLastRevisionByObjectID (line 154) | func (rr *revisionRepo) GetLastRevisionByObjectID(ctx context.Context,...
method GetLastRevisionByFileURL (line 166) | func (rr *revisionRepo) GetLastRevisionByFileURL(ctx context.Context, ...
method GetRevisionList (line 176) | func (rr *revisionRepo) GetRevisionList(ctx context.Context, revision ...
method allowRecord (line 188) | func (rr *revisionRepo) allowRecord(objectType int) (ok bool) {
method GetUnreviewedRevisionPage (line 202) | func (rr *revisionRepo) GetUnreviewedRevisionPage(ctx context.Context,...
method CountUnreviewedRevision (line 221) | func (rr *revisionRepo) CountUnreviewedRevision(ctx context.Context, o...
function NewRevisionRepo (line 46) | func NewRevisionRepo(data *data.Data, uniqueIDRepo unique.UniqueIDRepo) ...
FILE: internal/repo/role/power_repo.go
type powerRepo (line 33) | type powerRepo struct
method GetPowerList (line 45) | func (pr *powerRepo) GetPowerList(ctx context.Context, power *entity.P...
function NewPowerRepo (line 38) | func NewPowerRepo(data *data.Data) role.PowerRepo {
FILE: internal/repo/role/role_power_rel_repo.go
type rolePowerRelRepo (line 33) | type rolePowerRelRepo struct
method GetRolePowerTypeList (line 45) | func (rr *rolePowerRelRepo) GetRolePowerTypeList(ctx context.Context, ...
function NewRolePowerRelRepo (line 38) | func NewRolePowerRelRepo(data *data.Data) role.RolePowerRelRepo {
FILE: internal/repo/role/role_repo.go
type roleRepo (line 33) | type roleRepo struct
method GetRoleAllList (line 45) | func (rr *roleRepo) GetRoleAllList(ctx context.Context) (roleList []*e...
method GetRoleAllMapping (line 55) | func (rr *roleRepo) GetRoleAllMapping(ctx context.Context) (roleMappin...
function NewRoleRepo (line 38) | func NewRoleRepo(data *data.Data) service.RoleRepo {
FILE: internal/repo/role/user_role_rel_repo.go
type userRoleRelRepo (line 35) | type userRoleRelRepo struct
method SaveUserRoleRel (line 47) | func (ur *userRoleRelRepo) SaveUserRoleRel(ctx context.Context, userID...
method GetUserRoleRelList (line 73) | func (ur *userRoleRelRepo) GetUserRoleRelList(ctx context.Context, use...
method GetUserRoleRelListByRoleID (line 84) | func (ur *userRoleRelRepo) GetUserRoleRelListByRoleID(ctx context.Cont...
method GetUserRoleRel (line 95) | func (ur *userRoleRelRepo) GetUserRoleRel(ctx context.Context, userID ...
function NewUserRoleRelRepo (line 40) | func NewUserRoleRelRepo(data *data.Data) role.UserRoleRelRepo {
FILE: internal/repo/search_common/search_repo.go
type searchRepo (line 79) | type searchRepo struct
method SearchContents (line 102) | func (sr *searchRepo) SearchContents(ctx context.Context, words []stri...
method SearchQuestions (line 245) | func (sr *searchRepo) SearchQuestions(ctx context.Context, words []str...
method SearchAnswers (line 356) | func (sr *searchRepo) SearchAnswers(ctx context.Context, words []strin...
method parseOrder (line 450) | func (sr *searchRepo) parseOrder(_ context.Context, order string) (res...
method ParseSearchPluginResult (line 467) | func (sr *searchRepo) ParseSearchPluginResult(ctx context.Context, sre...
method parseResult (line 494) | func (sr *searchRepo) parseResult(ctx context.Context, res []map[strin...
function NewSearchRepo (line 87) | func NewSearchRepo(
function addRelevanceField (line 578) | func addRelevanceField(searchFields, words, fields []string) (res []stri...
function filterWords (line 611) | func filterWords(words []string) (res []string) {
FILE: internal/repo/search_sync/search_sync.go
function NewPluginSyncer (line 34) | func NewPluginSyncer(data *data.Data) plugin.SearchSyncer {
type PluginSyncer (line 38) | type PluginSyncer struct
method GetAnswersPage (line 42) | func (p *PluginSyncer) GetAnswersPage(ctx context.Context, page, pageS...
method GetQuestionsPage (line 53) | func (p *PluginSyncer) GetQuestionsPage(ctx context.Context, page, pag...
method convertAnswers (line 64) | func (p *PluginSyncer) convertAnswers(ctx context.Context, answers []*...
method convertQuestions (line 109) | func (p *PluginSyncer) convertQuestions(ctx context.Context, questions...
FILE: internal/repo/site_info/siteinfo_repo.go
type siteInfoRepo (line 36) | type siteInfoRepo struct
method SaveByType (line 47) | func (sr *siteInfoRepo) SaveByType(ctx context.Context, siteType strin...
method GetByType (line 66) | func (sr *siteInfoRepo) GetByType(ctx context.Context, siteType string...
method getCache (line 85) | func (sr *siteInfoRepo) getCache(ctx context.Context, siteType string)...
method setCache (line 98) | func (sr *siteInfoRepo) setCache(ctx context.Context, siteType string,...
method IsBrandingFileUsed (line 107) | func (sr *siteInfoRepo) IsBrandingFileUsed(ctx context.Context, filePa...
function NewSiteInfo (line 40) | func NewSiteInfo(data *data.Data) siteinfo_common.SiteInfoRepo {
FILE: internal/repo/tag/tag_rel_repo.go
type tagRelRepo (line 37) | type tagRelRepo struct
method AddTagRelList (line 52) | func (tr *tagRelRepo) AddTagRelList(ctx context.Context, tagList []*en...
method RemoveTagRelListByObjectID (line 69) | func (tr *tagRelRepo) RemoveTagRelListByObjectID(ctx context.Context, ...
method RecoverTagRelListByObjectID (line 79) | func (tr *tagRelRepo) RecoverTagRelListByObjectID(ctx context.Context,...
method HideTagRelListByObjectID (line 88) | func (tr *tagRelRepo) HideTagRelListByObjectID(ctx context.Context, ob...
method ShowTagRelListByObjectID (line 97) | func (tr *tagRelRepo) ShowTagRelListByObjectID(ctx context.Context, ob...
method RemoveTagRelListByIDs (line 107) | func (tr *tagRelRepo) RemoveTagRelListByIDs(ctx context.Context, ids [...
method GetObjectTagRelWithoutStatus (line 116) | func (tr *tagRelRepo) GetObjectTagRelWithoutStatus(ctx context.Context...
method EnableTagRelByIDs (line 134) | func (tr *tagRelRepo) EnableTagRelByIDs(ctx context.Context, ids []int...
method GetObjectTagRelList (line 147) | func (tr *tagRelRepo) GetObjectTagRelList(ctx context.Context, objectI...
method BatchGetObjectTagRelList (line 166) | func (tr *tagRelRepo) BatchGetObjectTagRelList(ctx context.Context, ob...
method CountTagRelByTagID (line 187) | func (tr *tagRelRepo) CountTagRelByTagID(ctx context.Context, tagID st...
method GetTagRelDefaultStatusByObjectID (line 196) | func (tr *tagRelRepo) GetTagRelDefaultStatusByObjectID(ctx context.Con...
method MigrateTagObjects (line 210) | func (tr *tagRelRepo) MigrateTagObjects(ctx context.Context, sourceTag...
function NewTagRelRepo (line 43) | func NewTagRelRepo(data *data.Data,
FILE: internal/repo/tag/tag_repo.go
type tagRepo (line 36) | type tagRepo struct
method RemoveTag (line 53) | func (tr *tagRepo) RemoveTag(ctx context.Context, tagID string) (err e...
method UpdateTag (line 63) | func (tr *tagRepo) UpdateTag(ctx context.Context, tag *entity.Tag) (er...
method RecoverTag (line 72) | func (tr *tagRepo) RecoverTag(ctx context.Context, tagID string) (err ...
method MustGetTagByNameOrID (line 81) | func (tr *tagRepo) MustGetTagByNameOrID(ctx context.Context, tagID, sl...
method UpdateTagSynonym (line 102) | func (tr *tagRepo) UpdateTagSynonym(ctx context.Context, tagSlugNameLi...
method GetTagSynonymCount (line 114) | func (tr *tagRepo) GetTagSynonymCount(ctx context.Context, tagID strin...
method GetIDsByMainTagId (line 122) | func (tr *tagRepo) GetIDsByMainTagId(ctx context.Context, mainTagID st...
method GetTagList (line 132) | func (tr *tagRepo) GetTagList(ctx context.Context, tag *entity.Tag) (t...
function NewTagRepo (line 42) | func NewTagRepo(
FILE: internal/repo/tag_common/tag_common_repo.go
type tagCommonRepo (line 39) | type tagCommonRepo struct
method GetTagListByIDs (line 56) | func (tr *tagCommonRepo) GetTagListByIDs(ctx context.Context, ids []st...
method GetTagBySlugName (line 68) | func (tr *tagCommonRepo) GetTagBySlugName(ctx context.Context, slugNam...
method GetTagListByName (line 80) | func (tr *tagCommonRepo) GetTagListByName(ctx context.Context, name st...
method GetRecommendTagList (line 108) | func (tr *tagCommonRepo) GetRecommendTagList(ctx context.Context) (tag...
method GetReservedTagList (line 123) | func (tr *tagCommonRepo) GetReservedTagList(ctx context.Context) (tagL...
method GetTagListByNames (line 139) | func (tr *tagCommonRepo) GetTagListByNames(ctx context.Context, names ...
method GetTagByID (line 151) | func (tr *tagCommonRepo) GetTagByID(ctx context.Context, tagID string,...
method GetTagPage (line 167) | func (tr *tagCommonRepo) GetTagPage(ctx context.Context, page, pageSiz...
method AddTagList (line 224) | func (tr *tagCommonRepo) AddTagList(ctx context.Context, tagList []*en...
method updateDeletedTag (line 251) | func (tr *tagCommonRepo) updateDeletedTag(ctx context.Context, tag *en...
method UpdateTagQuestionCount (line 270) | func (tr *tagCommonRepo) UpdateTagQuestionCount(ctx context.Context, t...
method UpdateTagsAttribute (line 279) | func (tr *tagCommonRepo) UpdateTagsAttribute(ctx context.Context, tags...
function NewTagCommonRepo (line 45) | func NewTagCommonRepo(
FILE: internal/repo/unique/uniqid_repo.go
type uniqueIDRepo (line 35) | type uniqueIDRepo struct
method GenUniqueIDStr (line 48) | func (ur *uniqueIDRepo) GenUniqueIDStr(ctx context.Context, key string...
function NewUniqueIDRepo (line 40) | func NewUniqueIDRepo(data *data.Data) unique.UniqueIDRepo {
FILE: internal/repo/user/user_backyard_repo.go
type userAdminRepo (line 40) | type userAdminRepo struct
method UpdateUserStatus (line 54) | func (ur *userAdminRepo) UpdateUserStatus(ctx context.Context, userID ...
method AddUser (line 88) | func (ur *userAdminRepo) AddUser(ctx context.Context, user *entity.Use...
method AddUsers (line 97) | func (ur *userAdminRepo) AddUsers(ctx context.Context, users []*entity...
method UpdateUserPassword (line 106) | func (ur *userAdminRepo) UpdateUserPassword(ctx context.Context, userI...
method GetUserInfo (line 115) | func (ur *userAdminRepo) GetUserInfo(ctx context.Context, userID strin...
method GetUserInfoByEmail (line 132) | func (ur *userAdminRepo) GetUserInfoByEmail(ctx context.Context, email...
method GetUserPage (line 151) | func (ur *userAdminRepo) GetUserPage(ctx context.Context, page, pageSi...
method DeletePermanentlyUsers (line 184) | func (ur *userAdminRepo) DeletePermanentlyUsers(ctx context.Context) (...
method GetExpiredSuspendedUsers (line 193) | func (ur *userAdminRepo) GetExpiredSuspendedUsers(ctx context.Context)...
function NewUserAdminRepo (line 46) | func NewUserAdminRepo(data *data.Data, authRepo auth.AuthRepo) user_admi...
FILE: internal/repo/user/user_repo.go
type userRepo (line 41) | type userRepo struct
method AddUser (line 53) | func (ur *userRepo) AddUser(ctx context.Context, user *entity.User) (e...
method IncreaseAnswerCount (line 74) | func (ur *userRepo) IncreaseAnswerCount(ctx context.Context, userID st...
method IncreaseQuestionCount (line 84) | func (ur *userRepo) IncreaseQuestionCount(ctx context.Context, userID ...
method UpdateQuestionCount (line 93) | func (ur *userRepo) UpdateQuestionCount(ctx context.Context, userID st...
method UpdateAnswerCount (line 103) | func (ur *userRepo) UpdateAnswerCount(ctx context.Context, userID stri...
method UpdateLastLoginDate (line 114) | func (ur *userRepo) UpdateLastLoginDate(ctx context.Context, userID st...
method UpdateEmailStatus (line 124) | func (ur *userRepo) UpdateEmailStatus(ctx context.Context, userID stri...
method UpdateNoticeStatus (line 134) | func (ur *userRepo) UpdateNoticeStatus(ctx context.Context, userID str...
method UpdatePass (line 143) | func (ur *userRepo) UpdatePass(ctx context.Context, userID, pass strin...
method UpdateEmail (line 151) | func (ur *userRepo) UpdateEmail(ctx context.Context, userID, email str...
method UpdateUserInterface (line 159) | func (ur *userRepo) UpdateUserInterface(ctx context.Context, userID, l...
method UpdateInfo (line 169) | func (ur *userRepo) UpdateInfo(ctx context.Context, userInfo *entity.U...
method UpdateUserProfile (line 179) | func (ur *userRepo) UpdateUserProfile(ctx context.Context, userInfo *e...
method GetByUserID (line 189) | func (ur *userRepo) GetByUserID(ctx context.Context, userID string) (u...
method BatchGetByID (line 203) | func (ur *userRepo) BatchGetByID(ctx context.Context, ids []string) ([...
method GetByUsername (line 214) | func (ur *userRepo) GetByUsername(ctx context.Context, username string...
method GetByUsernames (line 228) | func (ur *userRepo) GetByUsernames(ctx context.Context, usernames []st...
method GetByEmail (line 240) | func (ur *userRepo) GetByEmail(ctx context.Context, email string) (use...
method GetUserCount (line 250) | func (ur *userRepo) GetUserCount(ctx context.Context) (count int64, er...
method SearchUserListByName (line 260) | func (ur *userRepo) SearchUserListByName(ctx context.Context, name str...
method IsAvatarFileUsed (line 385) | func (ur *userRepo) IsAvatarFileUsed(ctx context.Context, filePath str...
function NewUserRepo (line 46) | func NewUserRepo(data *data.Data) usercommon.UserRepo {
function tryToDecorateUserInfoFromUserCenter (line 279) | func tryToDecorateUserInfoFromUserCenter(ctx context.Context, data *data...
function tryToDecorateUserListFromUserCenter (line 309) | func tryToDecorateUserListFromUserCenter(ctx context.Context, data *data...
function decorateByUserCenterUser (line 352) | func decorateByUserCenterUser(original *entity.User, ucUser *plugin.User...
FILE: internal/repo/user_external_login/user_external_login_repo.go
type userExternalLoginRepo (line 35) | type userExternalLoginRepo struct
method AddUserExternalLogin (line 47) | func (ur *userExternalLoginRepo) AddUserExternalLogin(ctx context.Cont...
method UpdateInfo (line 56) | func (ur *userExternalLoginRepo) UpdateInfo(ctx context.Context, userI...
method GetByExternalID (line 65) | func (ur *userExternalLoginRepo) GetByExternalID(ctx context.Context, ...
method GetByUserID (line 76) | func (ur *userExternalLoginRepo) GetByUserID(ctx context.Context, prov...
method GetUserExternalLoginList (line 87) | func (ur *userExternalLoginRepo) GetUserExternalLoginList(ctx context....
method DeleteUserExternalLogin (line 98) | func (ur *userExternalLoginRepo) DeleteUserExternalLogin(ctx context.C...
method DeleteUserExternalLoginByUserID (line 108) | func (ur *userExternalLoginRepo) DeleteUserExternalLoginByUserID(ctx c...
method SetCacheUserExternalLoginInfo (line 118) | func (ur *userExternalLoginRepo) SetCacheUserExternalLoginInfo(
method GetCacheUserExternalLoginInfo (line 126) | func (ur *userExternalLoginRepo) GetCacheUserExternalLoginInfo(
function NewUserExternalLoginRepo (line 40) | func NewUserExternalLoginRepo(data *data.Data) user_external_login.UserE...
FILE: internal/repo/user_notification_config/user_notification_config_repo.go
type userNotificationConfigRepo (line 34) | type userNotificationConfigRepo struct
method Add (line 46) | func (ur *userNotificationConfigRepo) Add(ctx context.Context, userIDs...
method Save (line 64) | func (ur *userNotificationConfigRepo) Save(ctx context.Context, uc *en...
method GetByUserID (line 84) | func (ur *userNotificationConfigRepo) GetByUserID(ctx context.Context,...
method GetBySource (line 95) | func (ur *userNotificationConfigRepo) GetBySource(ctx context.Context,...
method GetByUserIDAndSource (line 107) | func (ur *userNotificationConfigRepo) GetByUserIDAndSource(ctx context...
method GetByUsersAndSource (line 118) | func (ur *userNotificationConfigRepo) GetByUsersAndSource(
function NewUserNotificationConfigRepo (line 39) | func NewUserNotificationConfigRepo(data *data.Data) user_notification_co...
FILE: internal/router/answer_api_router.go
type AnswerAPIRouter (line 29) | type AnswerAPIRouter struct
method RegisterMustUnAuthAnswerAPIRouter (line 143) | func (a *AnswerAPIRouter) RegisterMustUnAuthAnswerAPIRouter(authUserMi...
method RegisterUnAuthAnswerAPIRouter (line 168) | func (a *AnswerAPIRouter) RegisterUnAuthAnswerAPIRouter(r *gin.RouterG...
method RegisterAuthUserWithAnyStatusAnswerAPIRouter (line 219) | func (a *AnswerAPIRouter) RegisterAuthUserWithAnyStatusAnswerAPIRouter...
method RegisterAnswerAPIRouter (line 225) | func (a *AnswerAPIRouter) RegisterAnswerAPIRouter(r *gin.RouterGroup) {
method RegisterAnswerAdminAPIRouter (line 336) | func (a *AnswerAPIRouter) RegisterAnswerAdminAPIRouter(r *gin.RouterGr...
function NewAnswerAPIRouter (line 67) | func NewAnswerAPIRouter(
FILE: internal/router/config.go
type SwaggerConfig (line 23) | type SwaggerConfig struct
FILE: internal/router/mcp_router.go
method RegisterMCPRouter (line 28) | func (a *AnswerAPIRouter) RegisterMCPRouter(r *gin.RouterGroup) {
FILE: internal/router/plugin_api_router.go
type PluginAPIRouter (line 27) | type PluginAPIRouter struct
method RegisterUnAuthConnectorRouter (line 54) | func (pr *PluginAPIRouter) RegisterUnAuthConnectorRouter(r *gin.Router...
method RegisterAuthUserConnectorRouter (line 79) | func (pr *PluginAPIRouter) RegisterAuthUserConnectorRouter(r *gin.Rout...
method RegisterAuthAdminConnectorRouter (line 87) | func (pr *PluginAPIRouter) RegisterAuthAdminConnectorRouter(r *gin.Rou...
function NewPluginAPIRouter (line 36) | func NewPluginAPIRouter(
FILE: internal/router/static_router.go
type StaticRouter (line 34) | type StaticRouter struct
method RegisterStaticRouter (line 46) | func (a *StaticRouter) RegisterStaticRouter(r *gin.RouterGroup) {
function NewStaticRouter (line 39) | func NewStaticRouter(serviceConfig *service_config.ServiceConfig) *Stati...
FILE: internal/router/swagger_router.go
type SwaggerRouter (line 32) | type SwaggerRouter struct
method Register (line 44) | func (a *SwaggerRouter) Register(r *gin.RouterGroup) {
method InitSwaggerDocs (line 53) | func (a *SwaggerRouter) InitSwaggerDocs() {
function NewSwaggerRouter (line 37) | func NewSwaggerRouter(config *SwaggerConfig) *SwaggerRouter {
FILE: internal/router/template_router.go
type TemplateRouter (line 30) | type TemplateRouter struct
method RegisterTemplateRouter (line 53) | func (a *TemplateRouter) RegisterTemplateRouter(r *gin.RouterGroup, ba...
function NewTemplateRouter (line 37) | func NewTemplateRouter(
FILE: internal/router/ui.go
constant UIIndexFilePath (line 39) | UIIndexFilePath = "build/index.html"
constant UIRootFilePath (line 40) | UIRootFilePath = "build"
constant UIStaticPath (line 41) | UIStaticPath = "build/static"
type UIRouter (line 44) | type UIRouter struct
method Register (line 73) | func (a *UIRouter) Register(r *gin.Engine, baseURLPath string) {
function NewUIRouter (line 50) | func NewUIRouter(
type _resource (line 61) | type _resource struct
method Open (line 66) | func (r *_resource) Open(name string) (fs.File, error) {
FILE: internal/router/ui_test.go
function TestUIRouter_FaviconWithNilBranding (line 34) | func TestUIRouter_FaviconWithNilBranding(t *testing.T) {
FILE: internal/schema/activity.go
type ActivityMsg (line 25) | type ActivityMsg struct
type GetObjectTimelineReq (line 36) | type GetObjectTimelineReq struct
type GetObjectTimelineResp (line 44) | type GetObjectTimelineResp struct
type ActObjectTimeline (line 50) | type ActObjectTimeline struct
type ActObjectInfo (line 64) | type ActObjectInfo struct
type GetObjectTimelineDetailReq (line 75) | type GetObjectTimelineDetailReq struct
type GetObjectTimelineDetailResp (line 82) | type GetObjectTimelineDetailResp struct
type ObjectTimelineDetail (line 88) | type ObjectTimelineDetail struct
type ObjectTimelineTag (line 97) | type ObjectTimelineTag struct
type PassReviewActivity (line 106) | type PassReviewActivity struct
FILE: internal/schema/ai_config_schema.go
type GetAIProviderResp (line 23) | type GetAIProviderResp struct
type GetAIModelsResp (line 30) | type GetAIModelsResp struct
type GetAIModelsReq (line 40) | type GetAIModelsReq struct
type GetAIModelResp (line 46) | type GetAIModelResp struct
FILE: internal/schema/ai_conversation_schema.go
type AIConversationListReq (line 27) | type AIConversationListReq struct
type AIConversationListItem (line 34) | type AIConversationListItem struct
type AIConversationDetailReq (line 41) | type AIConversationDetailReq struct
method Check (line 117) | func (req *AIConversationDetailReq) Check() (errFields []*validator.Fo...
type AIConversationRecord (line 47) | type AIConversationRecord struct
type AIConversationDetailResp (line 57) | type AIConversationDetailResp struct
type AIConversationVoteReq (line 66) | type AIConversationVoteReq struct
method Check (line 121) | func (req *AIConversationVoteReq) Check() (errFields []*validator.Form...
type AIConversationAdminListReq (line 74) | type AIConversationAdminListReq struct
type AIConversationAdminListItem (line 80) | type AIConversationAdminListItem struct
type AIConversationUserInfo (line 90) | type AIConversationUserInfo struct
type AIConversationAdminDetailReq (line 99) | type AIConversationAdminDetailReq struct
type AIConversationAdminDetailResp (line 104) | type AIConversationAdminDetailResp struct
type AIConversationAdminDeleteReq (line 113) | type AIConversationAdminDeleteReq struct
FILE: internal/schema/answer_activity_schema.go
type AcceptAnswerOperationInfo (line 23) | type AcceptAnswerOperationInfo struct
method GetUserIDs (line 50) | func (a *AcceptAnswerOperationInfo) GetUserIDs() (userIDs []string) {
type AcceptAnswerActivity (line 35) | type AcceptAnswerActivity struct
method HasRank (line 43) | func (v *AcceptAnswerActivity) HasRank() int {
FILE: internal/schema/answer_schema.go
type RemoveAnswerReq (line 30) | type RemoveAnswerReq struct
type RecoverAnswerReq (line 39) | type RecoverAnswerReq struct
constant AnswerAcceptedFailed (line 45) | AnswerAcceptedFailed = 1
constant AnswerAcceptedEnable (line 46) | AnswerAcceptedEnable = 2
type AnswerAddReq (line 49) | type AnswerAddReq struct
method Check (line 63) | func (req *AnswerAddReq) Check() (errFields []*validator.FormErrorFiel...
type GetAnswerInfoResp (line 74) | type GetAnswerInfoResp struct
type AnswerUpdateReq (line 79) | type AnswerUpdateReq struct
method Check (line 92) | func (req *AnswerUpdateReq) Check() (errFields []*validator.FormErrorF...
type AnswerUpdateResp (line 104) | type AnswerUpdateResp struct
type AnswerListReq (line 108) | type AnswerListReq struct
type AnswerInfo (line 120) | type AnswerInfo struct
type AdminAnswerInfo (line 142) | type AdminAnswerInfo struct
type AcceptAnswerReq (line 158) | type AcceptAnswerReq struct
method Check (line 164) | func (req *AcceptAnswerReq) Check() (errFields []*validator.FormErrorF...
type AdminUpdateAnswerStatusReq (line 171) | type AdminUpdateAnswerStatusReq struct
FILE: internal/schema/api_key_schema.go
type GetAPIKeyReq (line 23) | type GetAPIKeyReq struct
type GetAPIKeyResp (line 28) | type GetAPIKeyResp struct
type AddAPIKeyReq (line 38) | type AddAPIKeyReq struct
type AddAPIKeyResp (line 45) | type AddAPIKeyResp struct
type UpdateAPIKeyReq (line 50) | type UpdateAPIKeyReq struct
type DeleteAPIKeyReq (line 57) | type DeleteAPIKeyReq struct
FILE: internal/schema/backyard_user_schema.go
type UpdateUserStatusReq (line 37) | type UpdateUserStatusReq struct
method IsNormal (line 45) | func (r *UpdateUserStatusReq) IsNormal() bool { return r.Status == ...
method IsSuspended (line 46) | func (r *UpdateUserStatusReq) IsSuspended() bool { return r.Status == ...
method IsDeleted (line 47) | func (r *UpdateUserStatusReq) IsDeleted() bool { return r.Status == ...
method IsInactive (line 48) | func (r *UpdateUserStatusReq) IsInactive() bool { return r.Status == ...
method GetSuspendedUntil (line 51) | func (r *UpdateUserStatusReq) GetSuspendedUntil() time.Time {
type GetUserPageReq (line 84) | type GetUserPageReq struct
method IsSuspended (line 97) | func (r *GetUserPageReq) IsSuspended() bool { return r.Status == const...
method IsDeleted (line 98) | func (r *GetUserPageReq) IsDeleted() bool { return r.Status == const...
method IsInactive (line 99) | func (r *GetUserPageReq) IsInactive() bool { return r.Status == const...
type GetUserPageResp (line 102) | type GetUserPageResp struct
type GetUserInfoReq (line 132) | type GetUserInfoReq struct
type GetUserInfoResp (line 137) | type GetUserInfoResp struct
type UpdateUserRoleReq (line 143) | type UpdateUserRoleReq struct
type EditUserProfileReq (line 153) | type EditUserProfileReq struct
type AddUserReq (line 163) | type AddUserReq struct
type AddUsersReq (line 171) | type AddUsersReq struct
method ParseUsers (line 200) | func (req *AddUsersReq) ParseUsers(ctx context.Context) (errFields []*...
type DeletePermanentlyReq (line 178) | type DeletePermanentlyReq struct
type AddUsersErrorData (line 182) | type AddUsersErrorData struct
method GetErrField (line 193) | func (e *AddUsersErrorData) GetErrField(ctx context.Context) (errField...
type UpdateUserPasswordReq (line 239) | type UpdateUserPasswordReq struct
type GetUserActivationReq (line 246) | type GetUserActivationReq struct
type GetUserActivationResp (line 251) | type GetUserActivationResp struct
type SendUserActivationReq (line 256) | type SendUserActivationReq struct
FILE: internal/schema/badge_schema.go
constant BadgeStatusActive (line 25) | BadgeStatusActive BadgeStatus = "active"
constant BadgeStatusInactive (line 26) | BadgeStatusInactive BadgeStatus = "inactive"
type BadgeStatus (line 29) | type BadgeStatus
type BadgeListInfo (line 42) | type BadgeListInfo struct
type GetBadgeListResp (line 57) | type GetBadgeListResp struct
type UpdateBadgeStatusReq (line 64) | type UpdateBadgeStatusReq struct
type GetBadgeListPagedReq (line 71) | type GetBadgeListPagedReq struct
type GetBadgeListPagedResp (line 82) | type GetBadgeListPagedResp struct
type GetBadgeInfoResp (line 103) | type GetBadgeInfoResp struct
type GetBadgeAwardWithPageReq (line 122) | type GetBadgeAwardWithPageReq struct
type GetBadgeAwardWithPageResp (line 135) | type GetBadgeAwardWithPageResp struct
type GetUserBadgeAwardListReq (line 154) | type GetUserBadgeAwardListReq struct
type GetUserBadgeAwardListResp (line 162) | type GetUserBadgeAwardListResp struct
type BadgeTplData (line 175) | type BadgeTplData struct
FILE: internal/schema/collection_group_schema.go
constant CGDefault (line 25) | CGDefault = 1
constant CGDIY (line 26) | CGDIY = 2
type CollectionSwitchReq (line 30) | type CollectionSwitchReq struct
type CollectionSwitchResp (line 38) | type CollectionSwitchResp struct
type AddCollectionGroupReq (line 43) | type AddCollectionGroupReq struct
type UpdateCollectionGroupReq (line 57) | type UpdateCollectionGroupReq struct
type GetCollectionGroupResp (line 73) | type GetCollectionGroupResp struct
FILE: internal/schema/comment_schema.go
type AddCommentReq (line 32) | type AddCommentReq struct
method Check (line 59) | func (req *AddCommentReq) Check() (errFields []*validator.FormErrorFie...
type RemoveCommentReq (line 71) | type RemoveCommentReq struct
type UpdateCommentReq (line 81) | type UpdateCommentReq struct
method Check (line 100) | func (req *UpdateCommentReq) Check() (errFields []*validator.FormError...
type UpdateCommentResp (line 111) | type UpdateCommentResp struct
type GetCommentListReq (line 121) | type GetCommentListReq struct
type GetCommentWithPageReq (line 141) | type GetCommentWithPageReq struct
type GetCommentReq (line 161) | type GetCommentReq struct
type GetCommentResp (line 173) | type GetCommentResp struct
method SetFromComment (line 216) | func (r *GetCommentResp) SetFromComment(comment *entity.Comment) {
type GetCommentPersonalWithPageReq (line 225) | type GetCommentPersonalWithPageReq struct
type GetCommentPersonalWithPageResp (line 237) | type GetCommentPersonalWithPageResp struct
FILE: internal/schema/config_schema.go
type AddConfigReq (line 23) | type AddConfigReq struct
type RemoveConfigReq (line 31) | type RemoveConfigReq struct
type UpdateConfigReq (line 37) | type UpdateConfigReq struct
type GetConfigListReq (line 47) | type GetConfigListReq struct
type GetConfigWithPageReq (line 55) | type GetConfigWithPageReq struct
type GetConfigResp (line 67) | type GetConfigResp struct
FILE: internal/schema/connector_schema.go
type ConnectorInfoResp (line 22) | type ConnectorInfoResp struct
type ConnectorUserInfoResp (line 28) | type ConnectorUserInfoResp struct
FILE: internal/schema/dashboard_schema.go
constant DashboardCacheKey (line 27) | DashboardCacheKey = "answer:dashboard"
constant DashboardCacheTime (line 28) | DashboardCacheTime = 60 * time.Minute
type DashboardInfo (line 31) | type DashboardInfo struct
type DashboardInfoVersion (line 55) | type DashboardInfoVersion struct
type RemoteVersion (line 61) | type RemoteVersion struct
FILE: internal/schema/email_template.go
constant AccountActivationSourceType (line 29) | AccountActivationSourceType EmailSourceType = "account-activation"
constant PasswordResetSourceType (line 30) | PasswordResetSourceType EmailSourceType = "password-reset"
constant ConfirmNewEmailSourceType (line 31) | ConfirmNewEmailSourceType EmailSourceType = "password-reset"
constant UnsubscribeSourceType (line 32) | UnsubscribeSourceType EmailSourceType = "unsubscribe"
constant BindingSourceType (line 33) | BindingSourceType EmailSourceType = "binding"
type EmailSourceType (line 36) | type EmailSourceType
type EmailCodeContent (line 38) | type EmailCodeContent struct
method ToJSONString (line 50) | func (r *EmailCodeContent) ToJSONString() string {
method FromJSONString (line 55) | func (r *EmailCodeContent) FromJSONString(data string) error {
type RegisterTemplateData (line 59) | type RegisterTemplateData struct
type PassResetTemplateData (line 64) | type PassResetTemplateData struct
type ChangeEmailTemplateData (line 69) | type ChangeEmailTemplateData struct
type TestTemplateData (line 74) | type TestTemplateData struct
type NewAnswerTemplateRawData (line 78) | type NewAnswerTemplateRawData struct
type NewAnswerTemplateData (line 87) | type NewAnswerTemplateData struct
type NewInviteAnswerTemplateRawData (line 96) | type NewInvit
Condensed preview — 1094 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (8,688K chars).
[
{
"path": ".asf.yaml",
"chars": 1655,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": ".editorconfig",
"chars": 1082,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": ".github/ISSUE_TEMPLATE/bug_report.md",
"chars": 634,
"preview": "---\nname: Bug report\nabout: Report an issue to help the project improve.\ntitle: ''\nlabels: bug\ntype: 'Bug'\nassignees: ''"
},
{
"path": ".github/ISSUE_TEMPLATE/config.yml",
"chars": 945,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": ".github/ISSUE_TEMPLATE/enhancement_request.md",
"chars": 571,
"preview": "---\nname: Enhancement request\nabout: Suggest an enhancement for this project. Improve an existing feature.\ntitle: ''\nlab"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.md",
"chars": 551,
"preview": "---\nname: Feature request\nabout: Suggest an idea or possible new feature for this project.\ntitle: ''\nlabels: new-feature"
},
{
"path": ".github/PULL_REQUEST_TEMPLATE/pull_request_template.md",
"chars": 42,
"preview": "Fixes #\n\n## Proposed Changes\n\n -\n -\n -\n"
},
{
"path": ".github/workflows/build-binary-for-release.yml",
"chars": 1651,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": ".github/workflows/build-image-for-latest-release.yml",
"chars": 1882,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": ".github/workflows/build-image-for-manual.yml",
"chars": 1988,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": ".github/workflows/build-image-for-release.yml",
"chars": 1940,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": ".github/workflows/build-image-for-test.yml",
"chars": 1794,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": ".github/workflows/check-asf-header.yml",
"chars": 1731,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": ".github/workflows/lint.yml",
"chars": 1721,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": ".gitignore",
"chars": 418,
"preview": "*.exe\n*.orig\n*.rej\n*.so\n*~\n*.db\n.DS_Store\n._*\n/.idea\n/.fleet\n/.vscode/*.log\n/cmd/answer/*.sh\n/cmd/answer/answer\n/cmd/ans"
},
{
"path": ".gitlab-ci.yml",
"chars": 1367,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": ".golangci.yaml",
"chars": 1989,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": ".goreleaser.yaml",
"chars": 2406,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": ".vaunt/config.yaml",
"chars": 1519,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": ".vscode/settings.json",
"chars": 134,
"preview": "{\n \"eslint.workingDirectories\": [\n \"ui\"\n ],\n \"explorer.autoReveal\": \"focusNoScroll\",\n \"cSpell.words\": [\n \"grec"
},
{
"path": "Dockerfile",
"chars": 2223,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "LICENSE",
"chars": 11357,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "Makefile",
"chars": 2117,
"preview": ".PHONY: build clean ui\n\nVERSION=2.0.0\nBIN=answer\nDIR_SRC=./cmd/answer\nDOCKER_CMD=docker\n\nGO_ENV=CGO_ENABLED=0 GO111MODUL"
},
{
"path": "NOTICE",
"chars": 168,
"preview": "Apache Answer\nCopyright 2023-2025 The Apache Software Foundation\n\nThis product includes software developed at\nThe Apache"
},
{
"path": "README.md",
"chars": 2417,
"preview": "<a href=\"https://answer.apache.org\">\n <img alt=\"logo\" src=\"docs/img/logo.svg\" height=\"99px\">\n</a>\n\n# Apache Answer - "
},
{
"path": "build/README.md",
"chars": 47,
"preview": "# /build\nPackaging and Continuous Integration.\n"
},
{
"path": "charts/.helmignore",
"chars": 349,
"preview": "# Patterns to ignore when building packages.\n# This supports shell glob matching, relative path matching, and\n# negation"
},
{
"path": "charts/Chart.yaml",
"chars": 922,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "charts/README.md",
"chars": 3547,
"preview": "# answer\n\nAn open-source knowledge-based community software. You can use it quickly to build Q&A community for your prod"
},
{
"path": "charts/templates/_helpers.tpl",
"chars": 2499,
"preview": "{{/*\n\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements. See the NOTICE"
},
{
"path": "charts/templates/deployment.yaml",
"chars": 3489,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "charts/templates/hpa.yaml",
"chars": 1699,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "charts/templates/ingress.yaml",
"chars": 2862,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "charts/templates/pvc.yaml",
"chars": 1683,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "charts/templates/service.yaml",
"chars": 1144,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "charts/templates/serviceaccount.yaml",
"chars": 1103,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "charts/values.yaml",
"chars": 4942,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "cmd/answer/main.go",
"chars": 1184,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "cmd/command.go",
"chars": 11269,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "cmd/main.go",
"chars": 3085,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "cmd/wire.go",
"chars": 2412,
"preview": "//go:build wireinject\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license a"
},
{
"path": "cmd/wire_gen.go",
"chars": 24280,
"preview": "//go:build !wireinject\n// +build !wireinject\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or mor"
},
{
"path": "configs/config.go",
"chars": 1004,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "configs/config.yaml",
"chars": 1283,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "configs/path_ignore.yaml",
"chars": 1078,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "configs/reserved-usernames.json",
"chars": 6536,
"preview": "[\"0\",\"100\",\"101\",\"102\",\"1xx\",\"200\",\"201\",\"202\",\"203\",\"204\",\"205\",\"206\",\"207\",\"226\",\"2xx\",\"300\",\"301\",\"302\",\"303\",\"304\",\""
},
{
"path": "crowdin.yml",
"chars": 875,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "docker-compose.yaml",
"chars": 961,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "docs/docs.go",
"chars": 451350,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "docs/release/LICENSE",
"chars": 21375,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "docs/release/NOTICE",
"chars": 163,
"preview": "Apache Answer\nCopyright 2025 The Apache Software Foundation\n\nThis product includes software developed at\nThe Apache Soft"
},
{
"path": "docs/release/licenses/LICENSE-JedWatson-classnames.txt",
"chars": 1077,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2018 Jed Watson\n\nPermission is hereby granted, free of charge, to any person obtain"
},
{
"path": "docs/release/licenses/LICENSE-Machiel-slugify.txt",
"chars": 1084,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2015 Machiel Molenaar\n\nPermission is hereby granted, free of charge, to any person "
},
{
"path": "docs/release/licenses/LICENSE-Masterminds-semver.txt",
"chars": 1078,
"preview": "Copyright (C) 2014-2019, Matt Butcher and Matt Farina\n\nPermission is hereby granted, free of charge, to any person obtai"
},
{
"path": "docs/release/licenses/LICENSE-Qix--color.txt",
"chars": 1058,
"preview": "Copyright (c) 2012 Heather Arthur\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this "
},
{
"path": "docs/release/licenses/LICENSE-anargu-gin-brotli.txt",
"chars": 1074,
"preview": "MIT License\n\nCopyright (c) 2021 Anthony Arostegui\n\nPermission is hereby granted, free of charge, to any person obtaining"
},
{
"path": "docs/release/licenses/LICENSE-asaskevich-govalidator.txt",
"chars": 1085,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2014-2020 Alex Saskevich\n\nPermission is hereby granted, free of charge, to any pers"
},
{
"path": "docs/release/licenses/LICENSE-axios-axios.txt",
"chars": 1084,
"preview": "# Copyright (c) 2014-present Matt Zabriskie & Collaborators\n\nPermission is hereby granted, free of charge, to any person"
},
{
"path": "docs/release/licenses/LICENSE-bwmarrin-snowflake.txt",
"chars": 1288,
"preview": "Copyright (c) 2016, Bruce\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodif"
},
{
"path": "docs/release/licenses/LICENSE-codemirror-basic-setup.txt",
"chars": 1118,
"preview": "MIT License\n\nCopyright (C) 2018-2021 by Marijn Haverbeke <marijn@haverbeke.berlin> and others\n\nPermission is hereby gran"
},
{
"path": "docs/release/licenses/LICENSE-codemirror-lang-markdown.txt",
"chars": 1118,
"preview": "MIT License\n\nCopyright (C) 2018-2021 by Marijn Haverbeke <marijn@haverbeke.berlin> and others\n\nPermission is hereby gran"
},
{
"path": "docs/release/licenses/LICENSE-codemirror-language-data.txt",
"chars": 1118,
"preview": "MIT License\n\nCopyright (C) 2018-2021 by Marijn Haverbeke <marijn@haverbeke.berlin> and others\n\nPermission is hereby gran"
},
{
"path": "docs/release/licenses/LICENSE-codemirror-state.txt",
"chars": 1118,
"preview": "MIT License\n\nCopyright (C) 2018-2021 by Marijn Haverbeke <marijn@haverbeke.berlin> and others\n\nPermission is hereby gran"
},
{
"path": "docs/release/licenses/LICENSE-codemirror-view.txt",
"chars": 1118,
"preview": "MIT License\n\nCopyright (C) 2018-2021 by Marijn Haverbeke <marijn@haverbeke.berlin> and others\n\nPermission is hereby gran"
},
{
"path": "docs/release/licenses/LICENSE-cznic-sqlite.txt",
"chars": 1489,
"preview": "Copyright (c) 2017 The Sqlite Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or "
},
{
"path": "docs/release/licenses/LICENSE-disintegration-imaging.txt",
"chars": 1082,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2012 Grigory Dryapak\n\nPermission is hereby granted, free of charge, to any person o"
},
{
"path": "docs/release/licenses/LICENSE-emn178-js-sha256.txt",
"chars": 1076,
"preview": "Copyright (c) 2014-2024 Chen, Yi-Cyuan\n\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaini"
},
{
"path": "docs/release/licenses/LICENSE-facebook-react.txt",
"chars": 1088,
"preview": "MIT License\n\nCopyright (c) Meta Platforms, Inc. and affiliates.\n\nPermission is hereby granted, free of charge, to any pe"
},
{
"path": "docs/release/licenses/LICENSE-gin-gonic-gin.txt",
"chars": 1090,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2014 Manuel Martínez-Almeida\n\nPermission is hereby granted, free of charge, to any "
},
{
"path": "docs/release/licenses/LICENSE-go-gomail-gomail.txt",
"chars": 1083,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2014 Alexandre Cesaro\n\nPermission is hereby granted, free of charge, to any person "
},
{
"path": "docs/release/licenses/LICENSE-go-playground-locales.txt",
"chars": 1079,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2016 Go Playground\n\nPermission is hereby granted, free of charge, to any person obt"
},
{
"path": "docs/release/licenses/LICENSE-go-playground-universal-translator.txt",
"chars": 1080,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2016 Go Playground\n\nPermission is hereby granted, free of charge, to any person obt"
},
{
"path": "docs/release/licenses/LICENSE-go-playground-validator.txt",
"chars": 1077,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2015 Dean Karn\n\nPermission is hereby granted, free of charge, to any person obtaini"
},
{
"path": "docs/release/licenses/LICENSE-go-resty-resty.txt",
"chars": 1130,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2015-present Jeevanandam M., https://myjeeva.com <jeeva@myjeeva.com>\n\nPermission is"
},
{
"path": "docs/release/licenses/LICENSE-go-sql-driver-mysql.txt",
"chars": 16726,
"preview": "Mozilla Public License Version 2.0\n==================================\n\n1. Definitions\n--------------\n\n1.1. \"Contributor\""
},
{
"path": "docs/release/licenses/LICENSE-go-yaml-yaml.txt",
"chars": 2151,
"preview": "\nThis project is covered by two different licenses: MIT and Apache.\n\n#### MIT License ####\n\nThe following files were por"
},
{
"path": "docs/release/licenses/LICENSE-goccy-go-json.txt",
"chars": 1072,
"preview": "MIT License\n\nCopyright (c) 2020 Masaaki Goshima\n\nPermission is hereby granted, free of charge, to any person obtaining a"
},
{
"path": "docs/release/licenses/LICENSE-golang-org-x.txt",
"chars": 1478,
"preview": "Copyright (c) 2009 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or with"
},
{
"path": "docs/release/licenses/LICENSE-google-uuid.txt",
"chars": 1480,
"preview": "Copyright (c) 2009,2014 Google Inc. All rights reserved.\n\nRedistribution and use in source and binary forms, with or wit"
},
{
"path": "docs/release/licenses/LICENSE-google-wire.txt",
"chars": 11358,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "docs/release/licenses/LICENSE-grokify-html-strip-tags-go.txt",
"chars": 1479,
"preview": "Copyright (c) 2009 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or with"
},
{
"path": "docs/release/licenses/LICENSE-i18next-i18next.txt",
"chars": 1074,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2023 i18next\n\nPermission is hereby granted, free of charge, to any person obtaining"
},
{
"path": "docs/release/licenses/LICENSE-i18next-react-i18next.txt",
"chars": 1074,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2023 i18next\n\nPermission is hereby granted, free of charge, to any person obtaining"
},
{
"path": "docs/release/licenses/LICENSE-iamkun-dayjs.txt",
"chars": 1072,
"preview": "MIT License\n\nCopyright (c) 2018-present, iamkun\n\nPermission is hereby granted, free of charge, to any person obtaining a"
},
{
"path": "docs/release/licenses/LICENSE-jinzhu-copier.txt",
"chars": 1073,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2015 Jinzhu\n\nPermission is hereby granted, free of charge, to any person obtaining "
},
{
"path": "docs/release/licenses/LICENSE-jinzhu-now.txt",
"chars": 1097,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2013-NOW Jinzhu <wosmvp@gmail.com>\n\nPermission is hereby granted, free of charge, "
},
{
"path": "docs/release/licenses/LICENSE-joho-godotenv.txt",
"chars": 1068,
"preview": "Copyright (c) 2013 John Barton\n\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining\na cop"
},
{
"path": "docs/release/licenses/LICENSE-jordan-wright-email.txt",
"chars": 1080,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2013 Jordan Wright\n\nPermission is hereby granted, free of charge, to any person obt"
},
{
"path": "docs/release/licenses/LICENSE-jxson-front-matter.txt",
"chars": 1089,
"preview": "# The MIT License (MIT)\n\nCopyright (c) Jason Campbell (\"Author\")\n\nPermission is hereby granted, free of charge, to any p"
},
{
"path": "docs/release/licenses/LICENSE-kpdecker-jsdiff.txt",
"chars": 1573,
"preview": "Software License Agreement (BSD License)\n\nCopyright (c) 2009-2015, Kevin Decker <kpdecker@gmail.com>\n\nAll rights reserve"
},
{
"path": "docs/release/licenses/LICENSE-lib-pq.txt",
"chars": 1110,
"preview": "Copyright (c) 2011-2013, 'pq' Contributors\nPortions Copyright (C) 2011 Blake Mizerany\n\nPermission is hereby granted, fre"
},
{
"path": "docs/release/licenses/LICENSE-ljharb-qs.txt",
"chars": 1600,
"preview": "BSD 3-Clause License\n\nCopyright (c) 2014, Nathan LaFreniere and other [contributors](https://github.com/ljharb/qs/graphs"
},
{
"path": "docs/release/licenses/LICENSE-lodash-lodash.txt",
"chars": 1967,
"preview": "The MIT License\n\nCopyright JS Foundation and other contributors <https://js.foundation/>\n\nBased on Underscore.js, copyri"
},
{
"path": "docs/release/licenses/LICENSE-mark3labs-mcp-go.txt",
"chars": 1071,
"preview": "MIT License\n\nCopyright (c) 2024 Anthropic, PBC\n\nPermission is hereby granted, free of charge, to any person obtaining a "
},
{
"path": "docs/release/licenses/LICENSE-markedjs-marked.txt",
"chars": 2933,
"preview": "# License information\n\n## Contribution License Agreement\n\nIf you contribute code to this project, you are implicitly all"
},
{
"path": "docs/release/licenses/LICENSE-mattn-go-sqlite3.txt",
"chars": 1085,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2014 Yasuhiro Matsumoto\n\nPermission is hereby granted, free of charge, to any perso"
},
{
"path": "docs/release/licenses/LICENSE-microcosm-cc-bluemonday.txt",
"chars": 1600,
"preview": "SPDX short identifier: BSD-3-Clause\nhttps://opensource.org/licenses/BSD-3-Clause\n\nCopyright (c) 2014, David Kitchen <dav"
},
{
"path": "docs/release/licenses/LICENSE-mojocn-base64Captcha.txt",
"chars": 562,
"preview": "Copyright 2019 Eric neochau@gmail.com\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use t"
},
{
"path": "docs/release/licenses/LICENSE-mozillazg-go-pinyin.txt",
"chars": 1076,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2016 mozillazg\n\nPermission is hereby granted, free of charge, to any person obtaini"
},
{
"path": "docs/release/licenses/LICENSE-npm-node-semver.txt",
"chars": 765,
"preview": "The ISC License\n\nCopyright (c) Isaac Z. Schlueter and Contributors\n\nPermission to use, copy, modify, and/or distribute t"
},
{
"path": "docs/release/licenses/LICENSE-ory-dockertest.txt",
"chars": 11357,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "docs/release/licenses/LICENSE-pmndrs-zustand.txt",
"chars": 1070,
"preview": "MIT License\n\nCopyright (c) 2019 Paul Henschel\n\nPermission is hereby granted, free of charge, to any person obtaining a c"
},
{
"path": "docs/release/licenses/LICENSE-react-bootstrap-react-bootstrap.txt",
"chars": 1132,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2014-present Stephen J. Collings, Matthew Honnibal, Pieter Vanderwerff\n\nPermission "
},
{
"path": "docs/release/licenses/LICENSE-remix-run-react-router.txt",
"chars": 1161,
"preview": "MIT License\n\nCopyright (c) React Training LLC 2015-2019 Copyright (c) Remix Software Inc. 2020-2021 Copyright (c) Shopif"
},
{
"path": "docs/release/licenses/LICENSE-robfig-cron.txt",
"chars": 1092,
"preview": "Copyright (C) 2012 Rob Figueiredo\nAll Rights Reserved.\n\nMIT LICENSE\n\nPermission is hereby granted, free of charge, to an"
},
{
"path": "docs/release/licenses/LICENSE-sashabaranov-go-openai.txt",
"chars": 11357,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "docs/release/licenses/LICENSE-scottleedavis-go-exif-remove.txt",
"chars": 1072,
"preview": "MIT License\n\nCopyright (c) 2019 scott lee davis\n\nPermission is hereby granted, free of charge, to any person obtaining a"
},
{
"path": "docs/release/licenses/LICENSE-segmentfault-pacman.txt",
"chars": 1097,
"preview": "MIT License\n\nCopyright (c) since 2022 The Segmentfault Development Team.\n\nPermission is hereby granted, free of charge, "
},
{
"path": "docs/release/licenses/LICENSE-soldair-qrcode.txt",
"chars": 1075,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2012 Ryan Day\n\nPermission is hereby granted, free of charge, to any person obtainin"
},
{
"path": "docs/release/licenses/LICENSE-spf13-cobra.txt",
"chars": 10140,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "docs/release/licenses/LICENSE-staylor-react-helmet-async.txt",
"chars": 11356,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "docs/release/licenses/LICENSE-stretchr-testify.txt",
"chars": 1103,
"preview": "MIT License\n\nCopyright (c) 2012-2020 Mat Ryer, Tyler Bunnell and contributors.\n\nPermission is hereby granted, free of ch"
},
{
"path": "docs/release/licenses/LICENSE-sudodoki-copy-to-clipboard.txt",
"chars": 1090,
"preview": "MIT License\n\nCopyright (c) 2017 sudodoki <smd.deluzion@gmail.com>\n\nPermission is hereby granted, free of charge, to any "
},
{
"path": "docs/release/licenses/LICENSE-swaggo-files.txt",
"chars": 1063,
"preview": "MIT License\n\nCopyright (c) 2019 Swaggo\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof "
},
{
"path": "docs/release/licenses/LICENSE-swaggo-gin-swagger.txt",
"chars": 1063,
"preview": "MIT License\n\nCopyright (c) 2017 Swaggo\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof "
},
{
"path": "docs/release/licenses/LICENSE-swaggo-swag.txt",
"chars": 1066,
"preview": "MIT License\n\nCopyright (c) 2017 Eason Lin\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\n"
},
{
"path": "docs/release/licenses/LICENSE-tidwall-gjson.txt",
"chars": 1077,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2016 Josh Baker\n\nPermission is hereby granted, free of charge, to any person obtain"
},
{
"path": "docs/release/licenses/LICENSE-twbs-bootstrap.txt",
"chars": 1093,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2011-2023 The Bootstrap Authors\n\nPermission is hereby granted, free of charge, to a"
},
{
"path": "docs/release/licenses/LICENSE-twbs-icons.txt",
"chars": 1093,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2019-2023 The Bootstrap Authors\n\nPermission is hereby granted, free of charge, to a"
},
{
"path": "docs/release/licenses/LICENSE-uber-go-mock.txt",
"chars": 11358,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "docs/release/licenses/LICENSE-vercel-swr.txt",
"chars": 1069,
"preview": "MIT License\n\nCopyright (c) 2023 Vercel, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a co"
},
{
"path": "docs/release/licenses/LICENSE-xorm.txt",
"chars": 1498,
"preview": "Copyright (c) 2013 - 2015 The Xorm Authors\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with"
},
{
"path": "docs/release/licenses/LICENSE-yuin-goldmark.txt",
"chars": 1071,
"preview": "MIT License\n\nCopyright (c) 2019 Yusuke Inuzuka\n\nPermission is hereby granted, free of charge, to any person obtaining a "
},
{
"path": "docs/release/licenses/LIcENSE-Bunlong-next-share.txt",
"chars": 1074,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2021 Bunlong\n\nPermission is hereby granted, free of charge, to any person obtaining"
},
{
"path": "docs/swagger.json",
"chars": 449835,
"preview": "{\n \"swagger\": \"2.0\",\n \"info\": {\n \"description\": \"Apache Answer API\",\n \"title\": \"Apache Answer\",\n "
},
{
"path": "docs/swagger.yaml",
"chars": 201441,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "go.mod",
"chars": 9199,
"preview": "// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE"
},
{
"path": "go.sum",
"chars": 98535,
"preview": "cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.34.0/go.mod h1"
},
{
"path": "i18n/af_ZA.yaml",
"chars": 43565,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/ar_SA.yaml",
"chars": 43553,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/az_AZ.yaml",
"chars": 43283,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/bal_BA.yaml",
"chars": 43283,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/ban_ID.yaml",
"chars": 43283,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/bn_BD.yaml",
"chars": 43283,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/bs_BA.yaml",
"chars": 43283,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/ca_ES.yaml",
"chars": 43553,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/cs_CZ.yaml",
"chars": 79780,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/cy_GB.yaml",
"chars": 79715,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/da_DK.yaml",
"chars": 81886,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/de_DE.yaml",
"chars": 87311,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/el_GR.yaml",
"chars": 43553,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/en_US.yaml",
"chars": 79597,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/es_ES.yaml",
"chars": 86748,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/fa_IR.yaml",
"chars": 79398,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/fi_FI.yaml",
"chars": 43553,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/fr_FR.yaml",
"chars": 88070,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/he_IL.yaml",
"chars": 43553,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/hi_IN.yaml",
"chars": 79269,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/hu_HU.yaml",
"chars": 43553,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/hy_AM.yaml",
"chars": 43283,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/i18n.go",
"chars": 876,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "i18n/i18n.yaml",
"chars": 1680,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/id_ID.yaml",
"chars": 80274,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/it_IT.yaml",
"chars": 85475,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/ja_JP.yaml",
"chars": 63044,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/ko_KR.yaml",
"chars": 64168,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/ml_IN.yaml",
"chars": 79259,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/nl_NL.yaml",
"chars": 43553,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/no_NO.yaml",
"chars": 43578,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/pl_PL.yaml",
"chars": 83362,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/pt_BR.yaml",
"chars": 46793,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/pt_PT.yaml",
"chars": 84212,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/ro_RO.yaml",
"chars": 84273,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/ru_RU.yaml",
"chars": 84565,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/sk_SK.yaml",
"chars": 80688,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/sq_AL.yaml",
"chars": 43283,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/sr_SP.yaml",
"chars": 43553,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/sv_SE.yaml",
"chars": 79482,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/te_IN.yaml",
"chars": 79326,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/tr_TR.yaml",
"chars": 82311,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/uk_UA.yaml",
"chars": 85489,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/vi_VN.yaml",
"chars": 83074,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/zh_CN.yaml",
"chars": 56516,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "i18n/zh_TW.yaml",
"chars": 69605,
"preview": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE f"
},
{
"path": "internal/base/conf/conf.go",
"chars": 3939,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "internal/base/constant/acticity.go",
"chars": 2960,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "internal/base/constant/ai_config.go",
"chars": 2099,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "internal/base/constant/cache_key.go",
"chars": 2816,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "internal/base/constant/comment.go",
"chars": 891,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "internal/base/constant/constant.go",
"chars": 1598,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "internal/base/constant/ctx_flag.go",
"chars": 1086,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "internal/base/constant/email_tpl_key.go",
"chars": 1786,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "internal/base/constant/event.go",
"chars": 2682,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "internal/base/constant/meta.go",
"chars": 880,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "internal/base/constant/notification.go",
"chars": 4521,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "internal/base/constant/object_type.go",
"chars": 1704,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "internal/base/constant/plugin_config_key.go",
"chars": 869,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "internal/base/constant/privilege.go",
"chars": 4522,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "internal/base/constant/question.go",
"chars": 1043,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "internal/base/constant/reason.go",
"chars": 1736,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "internal/base/constant/revision.go",
"chars": 1533,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "internal/base/constant/site_info.go",
"chars": 1818,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "internal/base/constant/site_type.go",
"chars": 1661,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "internal/base/constant/upload.go",
"chars": 1034,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "internal/base/constant/user.go",
"chars": 1408,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "internal/base/cron/cron.go",
"chars": 3705,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "internal/base/cron/provider.go",
"chars": 963,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "internal/base/data/config.go",
"chars": 1500,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "internal/base/data/data.go",
"chars": 3808,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
},
{
"path": "internal/base/handler/handler.go",
"chars": 2801,
"preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOT"
}
]
// ... and 894 more files (download for full content)
About this extraction
This page contains the full source code of the apache/answer GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1094 files (7.8 MB), approximately 2.1M tokens, and a symbol index with 4070 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.