Versions in this module Expand all Collapse all v1 v1.9.0 Jul 22, 2020 Changes in this version + type AppleWhereAndOrderFunc func(q *orm.Query, isAfter bool, cursor string) (*orm.Query, error) + type DealSliceResultFunc func(i int, isFirst bool, isLast bool) + type ForumRepo struct + func (f *ForumRepo) GetAnonyID(ctx context.Context, userID uid.UID, threadID uid.UID) (string, error) + func (f *ForumRepo) GetMainTags(ctx context.Context) ([]string, error) + func (f *ForumRepo) GetPost(ctx context.Context, search *entity.PostSearch) (*entity.Post, error) + func (f *ForumRepo) GetPostCount(ctx context.Context, search *entity.PostsSearch) (int, error) + func (f *ForumRepo) GetPostQuotedCount(ctx context.Context, id uid.UID) (int, error) + func (f *ForumRepo) GetPostSlice(ctx context.Context, search *entity.PostsSearch, query entity.SliceQuery) (*entity.PostSlice, error) + func (f *ForumRepo) GetPosts(ctx context.Context, search *entity.PostsSearch) ([]*entity.Post, error) + func (f *ForumRepo) GetTags(ctx context.Context, search *entity.TagSearch) ([]*entity.Tag, error) + func (f *ForumRepo) GetThread(ctx context.Context, search *entity.ThreadSearch) (*entity.Thread, error) + func (f *ForumRepo) GetThreadCatalog(ctx context.Context, id uid.UID) ([]*entity.ThreadCatalogItem, error) + func (f *ForumRepo) GetThreadSlice(ctx context.Context, search *entity.ThreadsSearch, query entity.SliceQuery) (*entity.ThreadSlice, error) + func (f *ForumRepo) InsertPost(ctx context.Context, post *entity.Post) error + func (f *ForumRepo) InsertThread(ctx context.Context, thread *entity.Thread) error + func (f *ForumRepo) SetMainTags(ctx context.Context, tags []string) error + func (f *ForumRepo) UpdatePost(ctx context.Context, id uid.UID, update *entity.PostUpdate) error + func (f *ForumRepo) UpdateThread(ctx context.Context, id uid.UID, update *entity.ThreadUpdate) error + type NotiRepo struct + func (n *NotiRepo) GetNotiByKey(ctx context.Context, userID uid.UID, key string) (*entity.Notification, error) + func (n *NotiRepo) GetNotiSlice(ctx context.Context, user *entity.User, query entity.SliceQuery) (*entity.NotiSlice, error) + func (n *NotiRepo) GetUserUnreadCount(ctx context.Context, user *entity.User) (int, error) + func (n *NotiRepo) InsertNoti(ctx context.Context, noti *entity.Notification) error + func (n *NotiRepo) ToEntityNoti(noti *NotificationQuery) *entity.Notification + func (n *NotiRepo) UpdateNotiContent(ctx context.Context, noti *entity.Notification) error + func (n *NotiRepo) UpdateReadID(ctx context.Context, userID uid.UID, id uid.UID) error + type Notification struct + Content map[string]interface{} + CreatedAt time.Time + Key string + Receivers []entity.Receiver + SortKey uid.UID + Type entity.NotiType + UpdatedAt time.Time + type NotificationQuery struct + HasRead bool + type Post struct + Anonymous bool + Author string + Blocked *bool + Content string + CreatedAt time.Time + Guest bool + ID uid.UID + QuotedIDs []uid.UID + ThreadID uid.UID + UpdatedAt time.Time + UserID uid.UID + type Tag struct + CreatedAt time.Time + Name string + TagType *string + UpdatedAt time.Time + type Thread struct + Anonymous bool + Author string + Blocked bool + Content string + CreatedAt time.Time + Guest bool + ID uid.UID + LastPostID uid.UID + Locked bool + Tags []string + Title *string + UpdatedAt time.Time + UserID uid.UID + type User struct + CreatedAt time.Time + Email *string + ID uid.UID + LastReadNoti uid.UID + Name *string + Role entity.Role + Tags []string + UpdatedAt time.Time + type UserRepo struct + Forum *ForumRepo + Redis *redis.Client + func (u *UserRepo) DelCode(ctx context.Context, code string) error + func (u *UserRepo) GetCodeEmail(ctx context.Context, code string) (string, error) + func (u *UserRepo) GetToken(ctx context.Context, tok string) (*entity.Token, error) + func (u *UserRepo) GetUserByAuthInfo(ctx context.Context, ai entity.AuthInfo) (*entity.User, error) + func (u *UserRepo) InsertUser(ctx context.Context, user *entity.User, ex time.Duration) (*entity.User, error) + func (u *UserRepo) SetCode(ctx context.Context, email string, code string, ex time.Duration) error + func (u *UserRepo) SetToken(ctx context.Context, token *entity.Token) error + func (u *UserRepo) UpdateUser(ctx context.Context, id uid.UID, update *entity.UserUpdate) error