v1.0.0
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
# ======================
|
||||
# Basic configuration
|
||||
# ======================
|
||||
[base]
|
||||
# Web run port. Default:9090
|
||||
http_port=3002
|
||||
# Database driver [mysql/sqlite(Default)]
|
||||
database_drive=sqlite
|
||||
# Cache driver [redis/memory(Default)]
|
||||
cache_drive=memory
|
||||
# Queue driver [redis/memory(Default)]
|
||||
queue_drive=memory
|
||||
# File upload path.
|
||||
source_path=./uploads
|
||||
# File cache path.
|
||||
source_temp_path=./runtime/temp
|
||||
|
||||
# ======================
|
||||
# Mysql database driver
|
||||
# ======================
|
||||
[mysql]
|
||||
host=127.0.0.1
|
||||
port=3306
|
||||
username=root
|
||||
password=root
|
||||
db_name=chatgpt
|
||||
wait_timeout=100
|
||||
|
||||
# ======================
|
||||
# sqlite database driver
|
||||
# ======================
|
||||
[sqlite]
|
||||
file_path=./database/database.db
|
||||
|
||||
# ======================
|
||||
# redis database driver
|
||||
# ======================
|
||||
[redis]
|
||||
address=127.0.0.1:6379
|
||||
password=
|
||||
prefix=sun_panel:
|
||||
db=0
|
||||
|
||||
# ================
|
||||
# proxy
|
||||
# ================
|
||||
[proxy]
|
||||
url=
|
||||
|
||||
# ======================
|
||||
# Automatically generated
|
||||
# Prohibit modification
|
||||
# ======================
|
||||
[build]
|
||||
conf_version=1
|
||||
; install_time=132456
|
||||
|
||||
|
||||
# ======================
|
||||
# Initial configuration
|
||||
# ======================
|
||||
# Automatically delete after successful initialization
|
||||
[init]
|
||||
# Administrator account (try to use email format; 6-16 digits)
|
||||
admin_username=admin
|
||||
# Administrator password (6-16 digits)
|
||||
admin_password=123456
|
||||
|
||||
# ======================
|
||||
# 支付宝支付相关配置
|
||||
# ======================
|
||||
[alipay]
|
||||
appid=
|
||||
private_key=
|
||||
alipay_public_key=
|
||||
@@ -0,0 +1,70 @@
|
||||
[lang_info]
|
||||
version=1.0
|
||||
soft_low_allow_version=1
|
||||
|
||||
[common]
|
||||
api_error_param_format=Incorrect parameter format
|
||||
api_password_error=Incorrect password
|
||||
api_update_fail=Update failed
|
||||
api_create_fail=Creation failed
|
||||
api_save_fail=Save failed
|
||||
api_get_fail=Get failed
|
||||
db_error=Database error
|
||||
app_name=Li Calendar Notes
|
||||
contact_admin=Please contact the administrator
|
||||
captcha_code_error=Invalid captcha code
|
||||
no_access=You do not have permission to perform this operation
|
||||
start_time=Start time
|
||||
end_time=End time
|
||||
|
||||
[captcha]
|
||||
api_void_captcha_id=Invalid captcha ID
|
||||
|
||||
[login]
|
||||
err_username_password=Incorrect username or password
|
||||
err_username_deactivation=User account is deactivated or not activated
|
||||
err_token_expire=Login session has expired
|
||||
err_not_login=Not logged in
|
||||
err_captcha_check_fail=Invalid captcha code
|
||||
|
||||
[register]
|
||||
mail_exist=Email address already in use
|
||||
username_exist=Username already in use
|
||||
err_code=Invalid email verification code
|
||||
unopened_register=Registration function is not yet open
|
||||
emailSuffix_error=Please use an email address with the suffix {EmailSuffix} to register
|
||||
|
||||
[style]
|
||||
err_title_already_exists=Title already exists
|
||||
err_class_name_already_exists=Class name already exists
|
||||
|
||||
[subject]
|
||||
err_title_already_exists=Name already exists
|
||||
|
||||
[admin]
|
||||
api_mail_setting_save_err=Failed to save email information
|
||||
api_mail_setting_get_err=Failed to get email information
|
||||
|
||||
[item]
|
||||
api_item_not_exists=Item does not exist
|
||||
|
||||
[mail]
|
||||
from=From
|
||||
|
||||
register_vcode_title=Welcome to register for {AppName}
|
||||
register_vcode_content=You are registering for {AppName}, and below is the verification code you need for registration, which is valid for {Minute} minutes. If this was not initiated by you, please ignore this email.
|
||||
|
||||
item_retrieval_password_title=You are retrieving the calendar access password
|
||||
item_retrieval_password_content=The access password for [{ItemName}] is:
|
||||
|
||||
reset_password_password_title=You are resetting the account password
|
||||
reset_password_password_content=The verification code you need to reset your password is:
|
||||
|
||||
reminder_title=You have a calendar reminder: {Title} starts at {Time}
|
||||
reminder_content=You have a reminder event in {ItemTitle}, which is as follows:
|
||||
reminder_event_title=Event title
|
||||
|
||||
send_mail_fail=Failed to send email
|
||||
|
||||
[user]
|
||||
api_old_pass_error=Incorrect old password
|
||||
@@ -0,0 +1,73 @@
|
||||
[lang_info]
|
||||
version=1.0
|
||||
soft_low_allow_version=1
|
||||
|
||||
[common]
|
||||
api_error_param_format=参数格式错误
|
||||
api_password_error=密码不正确
|
||||
api_update_fail=更新失败
|
||||
api_create_fail=创建失败
|
||||
api_save_fail=保存失败
|
||||
api_get_fail=获取失败
|
||||
db_error=数据库错误
|
||||
app_name=SAi-Chat
|
||||
contact_admin=请联系管理员
|
||||
captcha_code_error=验证码错误
|
||||
no_access=你当前无权限操作
|
||||
start_time=开始时间
|
||||
end_time=结束时间
|
||||
|
||||
[captcha]
|
||||
api_void_captcha_id=无效验证码ID
|
||||
api_captcha_fail=验证码错误
|
||||
|
||||
[login]
|
||||
err_username_password=账号或密码错误
|
||||
err_username_deactivation=账号已停用或未激活
|
||||
err_token_expire=登录状态已经过期
|
||||
err_not_login=未登录
|
||||
err_captcha_check_fail=验证码错误
|
||||
|
||||
|
||||
[register]
|
||||
mail_exist=邮箱已被使用
|
||||
username_exist=用户名已被使用
|
||||
err_code=邮箱验证码有误
|
||||
unopened_register=未开放注册功能
|
||||
emailSuffix_error=请使用后缀为{EmailSuffix}的邮箱地址注册
|
||||
|
||||
[style]
|
||||
err_title_already_exists=标题已存在
|
||||
err_class_name_already_exists=类名已存在
|
||||
|
||||
[subject]
|
||||
err_title_already_exists=名称已存在
|
||||
|
||||
[admin]
|
||||
api_mail_setting_save_err=邮箱信息保存失败
|
||||
api_mail_setting_get_err=邮箱信息获取失败
|
||||
|
||||
[item]
|
||||
api_item_not_exists=项目不存在
|
||||
|
||||
[mail]
|
||||
from=来自
|
||||
|
||||
register_vcode_title=欢迎注册{AppName}
|
||||
register_vcode_content=您正在注册{AppName},下方是注册所需的验证码,验证码有效期{Minute}分钟,如果这不是你本人的操作,请忽略此邮件。
|
||||
|
||||
item_retrieval_password_title=你正在找回日历访问密码
|
||||
item_retrieval_password_content=[{ItemName}]的访问密码是
|
||||
|
||||
reset_password_password_title=你正在重置账号的密码
|
||||
reset_password_password_content=你重置密码所需的验证码是
|
||||
|
||||
reminder_title=您有一个日历提醒:{Title}在{Time}开始
|
||||
reminder_content=您在{ItemTitle}中有一个提醒事件,具体如下:
|
||||
reminder_event_title=事件标题
|
||||
|
||||
|
||||
send_mail_fail=邮件发送失败
|
||||
|
||||
[user]
|
||||
api_old_pass_error=旧密码不正确
|
||||
@@ -0,0 +1,39 @@
|
||||
## 将静态资源编译成go文件打包到可执行文件内
|
||||
|
||||
原版教程来源:https://blog.enianteam.com/u/sun/content/211
|
||||
|
||||
> 为了简化部署和减少出错的几率,将前端文件打包到可执行文件中,最终程序发布之后只有一个可执行文件
|
||||
|
||||
### 1. 安装
|
||||
** 注意:`...`必须带上 **
|
||||
```ssh
|
||||
go get github.com/go-bindata/go-bindata/...
|
||||
go get github.com/elazarl/go-bindata-assetfs/...
|
||||
|
||||
# go版本>=1.17 使用intsall方式
|
||||
go install -a -v github.com/go-bindata/go-bindata/...@latest
|
||||
go install -a -v github.com/elazarl/go-bindata-assetfs/...@latest
|
||||
```
|
||||
### 2. 安装成功后将 `GOPATH/bin` 加入环境变量
|
||||
|
||||
参考各自系统环境变量配置即可
|
||||
|
||||
|
||||
### 3. 压缩静态文件 到 asset目录
|
||||
以下命令在Windows的`powershell`可能会报错,可使用`cmd`执行
|
||||
```ssh
|
||||
# 开发环境,并非真实将所有文件编译,修改静态文件可以及时生效
|
||||
go-bindata-assetfs -debug -o=assets/bindata.go -pkg=assets static/... view/... # 多个
|
||||
go-bindata-assetfs -debug -o=assets/bindata.go -pkg=assets assets/...
|
||||
|
||||
# 正式环境,修改静态文件后需要重新编译
|
||||
go-bindata-assetfs -o=assets/bindata.go -pkg=assets assets/...
|
||||
```
|
||||
> 正式环境需要 去掉` -debug `
|
||||
|
||||
#### 参考文章
|
||||
Go | Go 语言打包静态文件以及如何与Gin一起使用Go-bindata
|
||||
https://www.jianshu.com/p/a7f5885679ef
|
||||
|
||||
[golang]Go内嵌静态资源go-bindata的安装及使用
|
||||
https://www.cnblogs.com/landv/p/11577213.html
|
||||
@@ -0,0 +1 @@
|
||||
1|1.0.0
|
||||
Reference in New Issue
Block a user