Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "fix #128 #137 #134 #136 add follow limiter" #190

Merged
merged 1 commit into from
Aug 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/constant/config/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ type envConfig struct {
LoggerLevel string `env:"LOGGER_LEVEL" envDefault:"INFO"`
LoggerWithTraceState string `env:"LOGGER_OUT_TRACING" envDefault:"disable"`
TiedLogging string `env:"TIED" envDefault:"NONE"`
PostgreSQLHost string `env:"POSTGRESQL_HOST" envDefault:"127.0.0.1"`
PostgreSQLPort string `env:"POSTGRESQL_PORT" envDefault:"5432"`
PostgreSQLUser string `env:"POSTGRESQL_USER" envDefault:"postgres"`
PostgreSQLPassword string `env:"POSTGRESQL_PASSWORD" envDefault:"1092"`
PostgreSQLDataBase string `env:"POSTGRESQL_DATABASE" envDefault:"Gugo"`
PostgreSQLHost string `env:"POSTGRESQL_HOST"`
PostgreSQLPort string `env:"POSTGRESQL_PORT"`
PostgreSQLUser string `env:"POSTGRESQL_USER"`
PostgreSQLPassword string `env:"POSTGRESQL_PASSWORD"`
PostgreSQLDataBase string `env:"POSTGRESQL_DATABASE"`
StorageType string `env:"STORAGE_TYPE" envDefault:"fs"`
FileSystemStartPath string `env:"FS_PATH" envDefault:"/tmp"`
FileSystemBaseUrl string `env:"FS_BASEURL" envDefault:"http://localhost/"`
Expand All @@ -27,7 +27,7 @@ type envConfig struct {
TracingEndPoint string `env:"TRACING_ENDPOINT"`
PyroscopeState string `env:"PYROSCOPE_STATE" envDefault:"false"`
PyroscopeAddr string `env:"PYROSCOPE_ADDR"`
RedisPrefix string `env:"REDIS_PREFIX" envDefault:"GUGUo"`
RedisPrefix string `env:"REDIS_PREFIX" envDefault:"GUGUTIK"`
PostgreSQLSchema string `env:"POSTGRESQL_SCHEMA"`
RedisMaster string `env:"REDIS_MASTER"`
ConsulAnonymityPrefix string `env:"CONSUL_ANONYMITY_NAME" envDefault:""`
Expand Down
50 changes: 22 additions & 28 deletions src/constant/strings/err.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,36 +54,30 @@ const (
UserServiceInnerError = "登录服务出现内部错误,请稍后重试!"
UnableToQueryVideoErrorCode = 50022
UnableToQueryVideoError = "无法查询到该视频"
AlreadyFollowingErrorCode = 50023
AlreadyFollowingError = "无法关注已关注的人"
UnableToGetFriendListErrorCode = 50024
UnableToGetFriendListError = "无法查询到好友列表"
)

// Expected Error
const (
AuthUserExistedCode = 10001
AuthUserExisted = "用户已存在,请更换用户名或尝试登录!"
UserNotExistedCode = 10002
UserNotExisted = "用户不存在,请先注册或检查你的用户名是否正确!"
AuthUserLoginFailedCode = 10003
AuthUserLoginFailed = "用户信息错误,请检查账号密码是否正确"
AuthUserNeededCode = 10004
AuthUserNeeded = "用户无权限操作,请登陆后重试!"
ActionCommentTypeInvalidCode = 10005
ActionCommentTypeInvalid = "不合法的评论类型"
ActionCommentLimitedCode = 10006
ActionCommentLimited = "评论频繁,请稍后再试!"
InvalidContentTypeCode = 10007
InvalidContentType = "不合法的内容类型"
FavorivateServiceDuplicateCode = 10008
FavorivateServiceDuplicateError = "不能重复点赞"
FavorivateServiceCancelCode = 10009
FavorivateServiceCancelError = "没有点赞,不能取消点赞"
PublishVideoLimitedCode = 10010
PublishVideoLimited = "视频发布频繁,请稍后再试!"
ChatActionLimitedCode = 10011
ChatActionLimitedError = "发送消息频繁,请稍后再试!"
FollowLimitedCode = 10012
FollowLimited = "关注频繁,请稍后再试! "
AuthUserExistedCode = 10001
AuthUserExisted = "用户已存在,请更换用户名或尝试登录!"
UserNotExistedCode = 10002
UserNotExisted = "用户不存在,请先注册或检查你的用户名是否正确!"
AuthUserLoginFailedCode = 10003
AuthUserLoginFailed = "用户信息错误,请检查账号密码是否正确"
AuthUserNeededCode = 10004
AuthUserNeeded = "用户无权限操作,请登陆后重试!"
ActionCommentTypeInvalidCode = 10005
ActionCommentTypeInvalid = "不合法的评论类型"
ActionCommentLimitedCode = 10006
ActionCommentLimited = "评论频繁,请稍后再试!"
InvalidContentTypeCode = 10007
InvalidContentType = "不合法的内容类型"
FavoriteServiceDuplicateCode = 10008
FavoriteServiceDuplicateError = "不能重复点赞"
FavoriteServiceCancelCode = 10009
FavoriteServiceCancelError = "没有点赞,不能取消点赞"
PublishVideoLimitedCode = 10010
PublishVideoLimited = "视频发布频繁,请稍后再试!"
ChatActionLimitedCode = 10011
ChatActionLimitedError = "发送消息频繁,请稍后再试!"
)
Loading
Loading