Documentation ¶
Index ¶
- type Controller
- type Dao
- type DbDao
- func (db DbDao) FollowUser(followerUuid uuid.UUID, followingUuid uuid.UUID) (bool, error)
- func (db DbDao) GetFollowersPageAs(userUuid uuid.UUID, searchAsUuid uuid.UUID, afterFollowerId uuid.UUID, ...) ([]user.ModelUserWithCustom, error)
- func (db DbDao) GetFollowingsPageAs(userUuid uuid.UUID, searchAsUuid uuid.UUID, afterFollowerId uuid.UUID, ...) ([]user.ModelUserWithCustom, error)
- func (db DbDao) UnfollowUser(followerUuid uuid.UUID, followingUuid uuid.UUID) (bool, error)
- type Service
- type ServiceImpl
- func (service ServiceImpl) FollowUser(followerId string, followingId string) error
- func (service ServiceImpl) ListFollowersAs(userId string, searchAs string, pageCursor string) ([]user.User, *string, error)
- func (service ServiceImpl) ListFollowingsAs(userId string, searchAs string, pageCursor string) ([]user.User, *string, error)
- func (service ServiceImpl) UnfollowUser(followerId string, followingId string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
Service Service
}
func (Controller) ListRoutes ¶
func (controller Controller) ListRoutes() []route.Route
type Dao ¶
type Dao interface { FollowUser(followerUuid uuid.UUID, followingUuid uuid.UUID) (bool, error) UnfollowUser(followerUuid uuid.UUID, followingUuid uuid.UUID) (bool, error) GetFollowersPageAs(userUuid uuid.UUID, searchAsUuid uuid.UUID, afterFollowerId uuid.UUID, afterUsername string) ([]user.ModelUserWithCustom, error) GetFollowingsPageAs(userUuid uuid.UUID, searchAsUuid uuid.UUID, afterFollowerId uuid.UUID, afterUsername string) ([]user.ModelUserWithCustom, error) }
type DbDao ¶
type DbDao struct {
Db database.AppDatabase
}
func (DbDao) FollowUser ¶
func (DbDao) GetFollowersPageAs ¶
func (DbDao) GetFollowingsPageAs ¶
type Service ¶
type Service interface { FollowUser(followerId string, followingId string) error UnfollowUser(followerId string, followingId string) error ListFollowersAs(userId string, searchAs string, pageCursor string) ([]user.User, *string, error) ListFollowingsAs(userId string, searchAs string, pageCursor string) ([]user.User, *string, error) }
type ServiceImpl ¶
type ServiceImpl struct { Db Dao BanService user.BanService UserService user.Service }
func NewServiceImpl ¶
func NewServiceImpl(db Dao, banService user.BanService, userService user.Service) ServiceImpl
func (ServiceImpl) FollowUser ¶
func (service ServiceImpl) FollowUser(followerId string, followingId string) error
func (ServiceImpl) ListFollowersAs ¶
func (ServiceImpl) ListFollowingsAs ¶
func (ServiceImpl) UnfollowUser ¶
func (service ServiceImpl) UnfollowUser(followerId string, followingId string) error
Click to show internal directories.
Click to hide internal directories.