Documentation ¶
Index ¶
- type UserProfileService
- type UserProfileServiceImpl
- func (s UserProfileServiceImpl) CreateUserProfileIndex(indexes map[string]interface{}) error
- func (s UserProfileServiceImpl) DeleteManyUserProfile(filter interface{}) error
- func (s UserProfileServiceImpl) DeleteUserProfile(filter interface{}) error
- func (s UserProfileServiceImpl) FindBySocialName(socialName string) (*dto.UserPublicProfile, error)
- func (s UserProfileServiceImpl) FindByUserId(userId uuid.UUID) (*dto.UserPublicProfile, error)
- func (s UserProfileServiceImpl) FindByUsername(username string) (*dto.UserPublicProfile, error)
- func (s UserProfileServiceImpl) FindOneUserProfile(filter interface{}) (*dto.UserPublicProfile, error)
- func (s UserProfileServiceImpl) FindProfileByUserIds(userIds []uuid.UUID) ([]dto.UserPublicProfile, error)
- func (s UserProfileServiceImpl) FindUserProfileList(filter interface{}, limit int64, skip int64, sort map[string]int) ([]dto.UserPublicProfile, error)
- func (s UserProfileServiceImpl) IncreaseFollowCount(objectId uuid.UUID, inc int) error
- func (s UserProfileServiceImpl) IncreaseFollowerCount(objectId uuid.UUID, inc int) error
- func (s UserProfileServiceImpl) Increment(objectId uuid.UUID, field string, value int) error
- func (s UserProfileServiceImpl) QueryUserProfile(search string, sortBy string, page int64, notIncludeUserIDList []uuid.UUID) ([]dto.UserPublicProfile, error)
- func (s UserProfileServiceImpl) SaveUserProfile(userProfile *dto.UserPublicProfile) error
- func (s UserProfileServiceImpl) UpdateLastSeenNow(userId uuid.UUID) error
- func (s UserProfileServiceImpl) UpdateUserProfile(filter interface{}, data interface{}) error
- func (s UserProfileServiceImpl) UpdateUserProfileById(userId uuid.UUID, data interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserProfileService ¶
type UserProfileService interface { SaveUserProfile(userProfile *dto.UserPublicProfile) error FindOneUserProfile(filter interface{}) (*dto.UserPublicProfile, error) FindUserProfileList(filter interface{}, limit int64, skip int64, sort map[string]int) ([]dto.UserPublicProfile, error) QueryUserProfile(search string, sortBy string, page int64, notIncludeUserIDList []uuid.UUID) ([]dto.UserPublicProfile, error) FindProfileByUserIds(userIds []uuid.UUID) ([]dto.UserPublicProfile, error) FindByUserId(userId uuid.UUID) (*dto.UserPublicProfile, error) FindBySocialName(socialName string) (*dto.UserPublicProfile, error) UpdateUserProfile(filter interface{}, data interface{}) error UpdateLastSeenNow(userId uuid.UUID) error UpdateUserProfileById(userId uuid.UUID, data interface{}) error DeleteUserProfile(filter interface{}) error DeleteManyUserProfile(filter interface{}) error FindByUsername(username string) (*dto.UserPublicProfile, error) CreateUserProfileIndex(indexes map[string]interface{}) error IncreaseFollowCount(objectId uuid.UUID, inc int) error IncreaseFollowerCount(objectId uuid.UUID, inc int) error }
func NewUserProfileService ¶
func NewUserProfileService(db interface{}) (UserProfileService, error)
NewUserProfileService initializes UserProfileService's dependencies and create new UserProfileService struct
type UserProfileServiceImpl ¶
type UserProfileServiceImpl struct {
UserProfileRepo coreData.Repository
}
UserProfileService handlers with injected dependencies
func (UserProfileServiceImpl) CreateUserProfileIndex ¶
func (s UserProfileServiceImpl) CreateUserProfileIndex(indexes map[string]interface{}) error
CreateUserProfileIndex create index for user profile search.
func (UserProfileServiceImpl) DeleteManyUserProfile ¶
func (s UserProfileServiceImpl) DeleteManyUserProfile(filter interface{}) error
DeleteManyUserProfile get all user profile informaition.
func (UserProfileServiceImpl) DeleteUserProfile ¶
func (s UserProfileServiceImpl) DeleteUserProfile(filter interface{}) error
DeleteUserProfile get all user profile informaition.
func (UserProfileServiceImpl) FindBySocialName ¶
func (s UserProfileServiceImpl) FindBySocialName(socialName string) (*dto.UserPublicProfile, error)
FindBySocialName find user profile by social name
func (UserProfileServiceImpl) FindByUserId ¶
func (s UserProfileServiceImpl) FindByUserId(userId uuid.UUID) (*dto.UserPublicProfile, error)
FindByUserId find user profile by userId
func (UserProfileServiceImpl) FindByUsername ¶
func (s UserProfileServiceImpl) FindByUsername(username string) (*dto.UserPublicProfile, error)
FindByUsername find user profile by name
func (UserProfileServiceImpl) FindOneUserProfile ¶
func (s UserProfileServiceImpl) FindOneUserProfile(filter interface{}) (*dto.UserPublicProfile, error)
FindOneUserProfile get one user profile informaition
func (UserProfileServiceImpl) FindProfileByUserIds ¶
func (s UserProfileServiceImpl) FindProfileByUserIds(userIds []uuid.UUID) ([]dto.UserPublicProfile, error)
FindProfileByUserIds Find profile by user IDs
func (UserProfileServiceImpl) FindUserProfileList ¶
func (s UserProfileServiceImpl) FindUserProfileList(filter interface{}, limit int64, skip int64, sort map[string]int) ([]dto.UserPublicProfile, error)
FindUserProfileList get all user profile information
func (UserProfileServiceImpl) IncreaseFollowCount ¶
func (s UserProfileServiceImpl) IncreaseFollowCount(objectId uuid.UUID, inc int) error
IncreaseFollowCount increment follow count of post
func (UserProfileServiceImpl) IncreaseFollowerCount ¶
func (s UserProfileServiceImpl) IncreaseFollowerCount(objectId uuid.UUID, inc int) error
IncreaseFollowerCount increment follower count of post
func (UserProfileServiceImpl) QueryUserProfile ¶
func (s UserProfileServiceImpl) QueryUserProfile(search string, sortBy string, page int64, notIncludeUserIDList []uuid.UUID) ([]dto.UserPublicProfile, error)
QueryPost get all user profile by query
func (UserProfileServiceImpl) SaveUserProfile ¶
func (s UserProfileServiceImpl) SaveUserProfile(userProfile *dto.UserPublicProfile) error
SaveUserProfile save user profile informaition
func (UserProfileServiceImpl) UpdateLastSeenNow ¶
func (s UserProfileServiceImpl) UpdateLastSeenNow(userId uuid.UUID) error
UpdateLastSeen update user profile information
func (UserProfileServiceImpl) UpdateUserProfile ¶
func (s UserProfileServiceImpl) UpdateUserProfile(filter interface{}, data interface{}) error
UpdateUserProfile update user profile information
func (UserProfileServiceImpl) UpdateUserProfileById ¶
func (s UserProfileServiceImpl) UpdateUserProfileById(userId uuid.UUID, data interface{}) error
UpdateUserProfileById update user profile information by user id