Documentation ¶
Index ¶
- Variables
- type Service
- func (s *Service) AddUserSubbedTag(ctx context.Context, tag string) (*entity.User, error)
- func (s *Service) BanUser(ctx context.Context, postID *uid.UID, threadID *uid.UID) (bool, error)
- func (s *Service) BlockPost(ctx context.Context, postID uid.UID) (*entity.Post, error)
- func (s *Service) BlockThread(ctx context.Context, threadID uid.UID) (*entity.Thread, error)
- func (s *Service) CtxWithUserByToken(ctx context.Context, tok string) (context.Context, *entity.Token, error)
- func (s *Service) DelUserSubbedTag(ctx context.Context, tag string) (*entity.User, error)
- func (s *Service) EditTags(ctx context.Context, threadID uid.UID, mainTag string, subTags []string) (*entity.Thread, error)
- func (s *Service) GetMainTags(ctx context.Context) ([]string, error)
- func (s *Service) GetNotification(ctx context.Context, query entity.SliceQuery) (*entity.NotiSlice, error)
- func (s *Service) GetPostByID(ctx context.Context, id uid.UID) (*entity.Post, error)
- func (s *Service) GetRecommendedTags(ctx context.Context) ([]string, error)
- func (s *Service) GetThreadByID(ctx context.Context, id uid.UID) (*entity.Thread, error)
- func (s *Service) GetUnreadNotiCount(ctx context.Context) (int, error)
- func (s *Service) GetUserPosts(ctx context.Context, obj *entity.User, query entity.SliceQuery) (*entity.PostSlice, error)
- func (s *Service) GetUserThreads(ctx context.Context, obj *entity.User, query entity.SliceQuery) (*entity.ThreadSlice, error)
- func (s *Service) LockThread(ctx context.Context, threadID uid.UID) (*entity.Thread, error)
- func (s *Service) Profile(ctx context.Context) (*entity.User, error)
- func (s *Service) PubPost(ctx context.Context, post entity.PostInput) (*entity.Post, error)
- func (s *Service) PubThread(ctx context.Context, thread entity.ThreadInput) (*entity.Thread, error)
- func (s *Service) SearchTags(ctx context.Context, query *string, limit *int) ([]*entity.Tag, error)
- func (s *Service) SearchThreads(ctx context.Context, tags []string, query entity.SliceQuery) (*entity.ThreadSlice, error)
- func (s *Service) SetMainTags(ctx context.Context, tags []string) error
- func (s *Service) SetUserName(ctx context.Context, name string) (*entity.User, error)
- func (s *Service) SignInByCode(ctx context.Context, code string) (*entity.Token, error)
- func (s *Service) SyncUserTags(ctx context.Context, tags []string) (*entity.User, error)
- func (s *Service) TrySignInByEmail(ctx context.Context, email string) (entity.Code, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var DevServiceSet = wire.NewSet(
serviceSet,
repoSet,
mockMailSet,
)
View Source
var ProdServiceSet = wire.NewSet(
serviceSet,
repoSet,
mailSet,
)
Functions ¶
This section is empty.
Types ¶
type Service ¶ added in v1.9.0
type Service struct { User *entity.UserService Forum *entity.ForumService Noti *entity.NotiService TxAdapter adapter.Tx }
func InitDevService ¶ added in v1.9.0
func InitProdService ¶ added in v1.9.0
func (*Service) AddUserSubbedTag ¶ added in v1.9.0
func (*Service) BlockThread ¶ added in v1.9.0
func (*Service) CtxWithUserByToken ¶ added in v1.9.0
func (s *Service) CtxWithUserByToken(ctx context.Context, tok string) (context.Context, *entity.Token, error)
CtxWithUserByToken add user to context by tok is for both signed user and guest user.
func (*Service) DelUserSubbedTag ¶ added in v1.9.0
func (*Service) GetMainTags ¶ added in v1.9.0
func (*Service) GetNotification ¶ added in v1.9.0
func (*Service) GetPostByID ¶ added in v1.9.0
func (*Service) GetRecommendedTags ¶ added in v1.9.0
func (*Service) GetThreadByID ¶ added in v1.9.0
func (*Service) GetUnreadNotiCount ¶ added in v1.9.0
func (*Service) GetUserPosts ¶ added in v1.9.0
func (*Service) GetUserThreads ¶ added in v1.9.0
func (s *Service) GetUserThreads( ctx context.Context, obj *entity.User, query entity.SliceQuery, ) (*entity.ThreadSlice, error)
func (*Service) LockThread ¶ added in v1.9.0
func (*Service) SearchTags ¶ added in v1.9.0
func (*Service) SearchThreads ¶ added in v1.9.0
func (s *Service) SearchThreads( ctx context.Context, tags []string, query entity.SliceQuery, ) (*entity.ThreadSlice, error)
func (*Service) SetMainTags ¶ added in v1.9.0
func (*Service) SetUserName ¶ added in v1.9.0
func (*Service) SignInByCode ¶ added in v1.9.0
SignInByCode is only for signed in user
func (*Service) SyncUserTags ¶ added in v1.9.0
Click to show internal directories.
Click to hide internal directories.