-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use custom func to parse msg and validate, intended to pars…
…e enum, carbon directly
- Loading branch information
1 parent
25d3033
commit 4cd7f9a
Showing
22 changed files
with
626 additions
and
264 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package consts | ||
|
||
type HitokotoType string | ||
|
||
const ( | ||
HitokotoTypeAnime HitokotoType = "a" // Anime - 动画 | ||
HitokotoTypeComic HitokotoType = "b" // Comic – 漫画 | ||
HitokotoTypeGame HitokotoType = "c" // Game – 游戏 | ||
HitokotoTypeLiterature HitokotoType = "d" // Literature – 文学 | ||
HitokotoTypeOriginal HitokotoType = "e" // Original – 原创 | ||
HitokotoTypeInternet HitokotoType = "f" // Internet – 来自网络 | ||
HitokotoTypeOther HitokotoType = "g" // Other – 其他 | ||
HitokotoTypeVideo HitokotoType = "h" // Video – 影视 | ||
HitokotoTypePoetry HitokotoType = "i" // Poetry – 古诗词 | ||
HitokotoTypeNetEase HitokotoType = "j" // NetEase – 网易云音乐 | ||
HitokotoTypePhilosophy HitokotoType = "k" // Philosophy – 哲学 | ||
HitokotoTypeJoke HitokotoType = "l" // Joke - 抖机灵 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package consts | ||
|
||
type PollMethod int | ||
|
||
const ( | ||
PollMethodApprove PollMethod = iota + 1 // 赞同 | ||
PollMethodReject // 驳回 | ||
PollMethodNeedModify // 需要修改 | ||
PollMethodNeedCommonUserPoll // 需要普通用户投票 | ||
) | ||
|
||
type PollStatus int | ||
|
||
const ( | ||
PollStatusUnknown PollStatus = -1 // 未知,比如投票不存在 | ||
PollStatusNotOpen PollStatus = 0 // 未开放投票 | ||
PollStatusOpen PollStatus = 1 // 投票正常开放 | ||
PollStatusProcessing PollStatus = 2 // 处理中,停止投票 | ||
PollStatusSuspended PollStatus = 100 // 暂停投票 | ||
PollStatusClosed PollStatus = 101 // 关闭投票 | ||
PollStatusOpenForCommonUser PollStatus = 102 // 开放给普通用户投票 | ||
PollStatusApproved PollStatus = 200 // 赞同 | ||
PollStatusRejected PollStatus = 201 // 驳回 | ||
PollStatusNeedModify PollStatus = 202 // 需要修改 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../notification/hitokotoFailedMessageCan.go → ...tification/v1/hitokotoFailedMessageCan.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package notification | ||
package v1 | ||
|
||
import ( | ||
"github.com/hitokoto-osc/notification-worker/consumers/provider" | ||
|
2 changes: 1 addition & 1 deletion
2
...ication/hitokotoFailedMessageCollector.go → ...tion/v1/hitokotoFailedMessageCollector.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package notification | ||
package v1 | ||
|
||
import ( | ||
"context" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.