Documentation ¶
Index ¶
- Constants
- func AllowReadCharacter(u domain.Auth, c model.Character) bool
- func AllowReadSubject(u domain.Auth, s model.Subject) bool
- func CanViewClosedTopic(a domain.Auth) bool
- func CanViewDeleteTopic(a domain.Auth) bool
- func CanViewTopicContent(u domain.Auth, topic model.Topic) bool
- func ListTopicDisplays(u domain.Auth) []model.TopicDisplay
- func NewMysqlRepo(q *query.Query, log *zap.Logger) domain.AuthRepo
- func NewService(repo domain.AuthRepo, user domain.UserRepo, logger *zap.Logger, ...) domain.AuthService
- func RewriteCommentTree(comments []model.Comment) []model.Comment
- func RewriteCommit(t model.Comment) model.Comment
- func RewriteSubCommit(t model.SubComment) model.SubComment
- type TokenInfo
Constants ¶
View Source
const ( UserGroupAdmin uint8 = iota + 1 UserGroupBangumiAdmin UserGroupWindowAdmin UserGroupQuite UserGroupBanned UserGroupCharacterAdmin UserGroupWikiAdmin UserGroupNormal UserGroupWikiEditor )
View Source
const CanViewStateClosedTopic = gtime.OneDay * 180
View Source
const CanViewStateDeleteTopic = gtime.OneDay * 365
View Source
const TokenTypeAccessToken = 1
View Source
const TokenTypeOauthToken = 0
Variables ¶
This section is empty.
Functions ¶
func AllowReadCharacter ¶ added in v0.22.0
func CanViewClosedTopic ¶ added in v0.22.0
func CanViewDeleteTopic ¶ added in v0.22.0
func CanViewTopicContent ¶ added in v0.22.0
func ListTopicDisplays ¶ added in v0.25.9
func ListTopicDisplays(u domain.Auth) []model.TopicDisplay
ListTopicDisplays 在帖子列表能看到哪些状态的帖子。
func NewService ¶
func NewService(repo domain.AuthRepo, user domain.UserRepo, logger *zap.Logger, c cache.RedisCache) domain.AuthService
func RewriteCommentTree ¶ added in v0.23.2
func RewriteSubCommit ¶ added in v0.22.0
func RewriteSubCommit(t model.SubComment) model.SubComment
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.