Documentation ¶
Index ¶
- type CollectiveRelService
- type CollectiveRelServiceImpl
- func (s CollectiveRelServiceImpl) CreateCollectiveRelIndex(indexes map[string]interface{}) error
- func (s CollectiveRelServiceImpl) DeleteCollectiveRel(filter interface{}) error
- func (s CollectiveRelServiceImpl) DeleteManyCollectiveRel(filter interface{}) error
- func (s CollectiveRelServiceImpl) FindById(objectId uuid.UUID) (*dto.CollectiveRel, error)
- func (s CollectiveRelServiceImpl) FindCollectiveRelsIncludeProfile(filter interface{}, limit int64, skip int64, sort map[string]int) ([]dto.CollectiveRel, error)
- func (s CollectiveRelServiceImpl) FindOneCollectiveRel(filter interface{}) (*dto.CollectiveRel, error)
- func (s CollectiveRelServiceImpl) FollowCollective(leftUser dto.UserRelMeta, collective dto.CollectiveRelMeta, tags []string) error
- func (s CollectiveRelServiceImpl) GetCollectiveFollowing(userId uuid.UUID) ([]dto.CollectiveRel, error)
- func (s CollectiveRelServiceImpl) GetFollowers(userId uuid.UUID) ([]dto.CollectiveRel, error)
- func (s CollectiveRelServiceImpl) SaveCollectiveRel(collectiveRel *dto.CollectiveRel) error
- func (s CollectiveRelServiceImpl) UnfollowCollective(leftId uuid.UUID, collectiveId uuid.UUID) error
- func (s CollectiveRelServiceImpl) UpdateCollectiveRel(filter interface{}, data interface{}) error
- type UserRelService
- type UserRelServiceImpl
- func (s UserRelServiceImpl) CreateUserRelIndex(indexes map[string]interface{}) error
- func (s UserRelServiceImpl) DeleteCircle(circleId string) error
- func (s UserRelServiceImpl) DeleteManyUserRel(filter interface{}) error
- func (s UserRelServiceImpl) DeleteUserRel(filter interface{}) error
- func (s UserRelServiceImpl) DeleteUserRelByOwner(ownerUserId uuid.UUID, userRelId uuid.UUID) error
- func (s UserRelServiceImpl) FindById(objectId uuid.UUID) (*dto.UserRel, error)
- func (s UserRelServiceImpl) FindByOwnerUserId(ownerUserId string) (*dto.UserRel, error)
- func (s UserRelServiceImpl) FindOneUserRel(filter interface{}) (*dto.UserRel, error)
- func (s UserRelServiceImpl) FindRelsIncludeProfile(filter interface{}, limit int64, skip int64, sort map[string]int) ([]dto.UserRel, error)
- func (s UserRelServiceImpl) FindUserRelList(filter interface{}, limit int64, skip int64, sort map[string]int) ([]dto.UserRel, error)
- func (s UserRelServiceImpl) FollowUser(leftUser dto.UserRelMeta, rightUser dto.UserRelMeta, circleIds []string, ...) error
- func (s UserRelServiceImpl) GetFollowers(userId uuid.UUID) ([]dto.UserRel, error)
- func (s UserRelServiceImpl) GetFollowing(userId uuid.UUID) ([]dto.UserRel, error)
- func (s UserRelServiceImpl) QueryUserRel(search string, ownerUserId *uuid.UUID, sortBy string, page int64) ([]dto.UserRel, error)
- func (s UserRelServiceImpl) SaveUserRel(userRel *dto.UserRel) error
- func (s UserRelServiceImpl) UnfollowUser(leftId uuid.UUID, rightId uuid.UUID) error
- func (s UserRelServiceImpl) UpdateRelCircles(leftId uuid.UUID, rightId uuid.UUID, circleIds []string) error
- func (s UserRelServiceImpl) UpdateUserRel(filter interface{}, data interface{}) error
- func (s UserRelServiceImpl) UpdateUserRelById(data *dto.UserRel) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectiveRelService ¶
type CollectiveRelService interface { FindOneCollectiveRel(filter interface{}) (*dto.CollectiveRel, error) FollowCollective(leftUser dto.UserRelMeta, collective dto.CollectiveRelMeta, tags []string) error UnfollowCollective(leftId uuid.UUID, collectiveId uuid.UUID) error DeleteCollectiveRel(filter interface{}) error SaveCollectiveRel(collectiveRel *dto.CollectiveRel) error GetCollectiveFollowing(userId uuid.UUID) ([]dto.CollectiveRel, error) FindById(objectId uuid.UUID) (*dto.CollectiveRel, error) FindCollectiveRelsIncludeProfile(filter interface{}, limit int64, skip int64, sort map[string]int) ([]dto.CollectiveRel, error) UpdateCollectiveRel(filter interface{}, data interface{}) error DeleteManyCollectiveRel(filter interface{}) error CreateCollectiveRelIndex(indexes map[string]interface{}) error GetFollowers(collectiveId uuid.UUID) ([]dto.CollectiveRel, error) }
func NewCollectiveRelService ¶
func NewCollectiveRelService(db interface{}) (CollectiveRelService, error)
type CollectiveRelServiceImpl ¶
type CollectiveRelServiceImpl struct {
CollectiveRelRepo repo.Repository
}
func (CollectiveRelServiceImpl) CreateCollectiveRelIndex ¶
func (s CollectiveRelServiceImpl) CreateCollectiveRelIndex(indexes map[string]interface{}) error
CreateCollectiveRelIndex create index for collectiveRel search.
func (CollectiveRelServiceImpl) DeleteCollectiveRel ¶
func (s CollectiveRelServiceImpl) DeleteCollectiveRel(filter interface{}) error
DeleteCollectiveRel delete collectiveRel by filter
func (CollectiveRelServiceImpl) DeleteManyCollectiveRel ¶
func (s CollectiveRelServiceImpl) DeleteManyCollectiveRel(filter interface{}) error
DeleteManyCollectiveRel delete many collectiveRel by filter
func (CollectiveRelServiceImpl) FindById ¶
func (s CollectiveRelServiceImpl) FindById(objectId uuid.UUID) (*dto.CollectiveRel, error)
FindById find by collectiveRel id
func (CollectiveRelServiceImpl) FindCollectiveRelsIncludeProfile ¶
func (s CollectiveRelServiceImpl) FindCollectiveRelsIncludeProfile(filter interface{}, limit int64, skip int64, sort map[string]int) ([]dto.CollectiveRel, error)
func (CollectiveRelServiceImpl) FindOneCollectiveRel ¶
func (s CollectiveRelServiceImpl) FindOneCollectiveRel(filter interface{}) (*dto.CollectiveRel, error)
FindOneCollectiveRel get one collectiveRel
func (CollectiveRelServiceImpl) FollowCollective ¶
func (s CollectiveRelServiceImpl) FollowCollective(leftUser dto.UserRelMeta, collective dto.CollectiveRelMeta, tags []string) error
FollowCollective create relation between two users
func (CollectiveRelServiceImpl) GetCollectiveFollowing ¶
func (s CollectiveRelServiceImpl) GetCollectiveFollowing(userId uuid.UUID) ([]dto.CollectiveRel, error)
GetCollectiveFollowing Get Collective following by collectiveId
func (CollectiveRelServiceImpl) GetFollowers ¶
func (s CollectiveRelServiceImpl) GetFollowers(userId uuid.UUID) ([]dto.CollectiveRel, error)
GetFollowers Get collective followers by collectiveId
func (CollectiveRelServiceImpl) SaveCollectiveRel ¶
func (s CollectiveRelServiceImpl) SaveCollectiveRel(collectiveRel *dto.CollectiveRel) error
SaveCollectiveRel save the collectiveRel
func (CollectiveRelServiceImpl) UnfollowCollective ¶
func (s CollectiveRelServiceImpl) UnfollowCollective(leftId uuid.UUID, collectiveId uuid.UUID) error
UnfollowCollective delete relation between a collective, and a user (inherits left-syntax from UnFollowUser)
func (CollectiveRelServiceImpl) UpdateCollectiveRel ¶
func (s CollectiveRelServiceImpl) UpdateCollectiveRel(filter interface{}, data interface{}) error
UpdateCollectiveRel update the collectiveRel
type UserRelService ¶
type UserRelService interface { SaveUserRel(userRel *dto.UserRel) error FindOneUserRel(filter interface{}) (*dto.UserRel, error) FindUserRelList(filter interface{}, limit int64, skip int64, sort map[string]int) ([]dto.UserRel, error) QueryUserRel(search string, ownerUserId *uuid.UUID, sortBy string, page int64) ([]dto.UserRel, error) FindById(objectId uuid.UUID) (*dto.UserRel, error) FindByOwnerUserId(userId string) (*dto.UserRel, error) UpdateUserRel(filter interface{}, data interface{}) error UpdateUserRelById(data *dto.UserRel) error DeleteUserRel(filter interface{}) error DeleteUserRelByOwner(ownerUserId uuid.UUID, userRelId uuid.UUID) error DeleteManyUserRel(filter interface{}) error CreateUserRelIndex(indexes map[string]interface{}) error GetFollowers(userId uuid.UUID) ([]dto.UserRel, error) GetFollowing(userId uuid.UUID) ([]dto.UserRel, error) FollowUser(leftUser dto.UserRelMeta, rightUser dto.UserRelMeta, circleIds []string, tags []string) error UpdateRelCircles(leftId uuid.UUID, rightId uuid.UUID, circleIds []string) error UnfollowUser(leftId uuid.UUID, rightId uuid.UUID) error DeleteCircle(circleId string) error }
func NewUserRelService ¶
func NewUserRelService(db interface{}) (UserRelService, error)
NewUserRelService initializes UserRelService's dependencies and create new UserRelService struct
type UserRelServiceImpl ¶
type UserRelServiceImpl struct {
UserRelRepo repo.Repository
}
UserRelService handlers with injected dependencies
func (UserRelServiceImpl) CreateUserRelIndex ¶
func (s UserRelServiceImpl) CreateUserRelIndex(indexes map[string]interface{}) error
CreateUserRelIndex create index for userRel search.
func (UserRelServiceImpl) DeleteCircle ¶
func (s UserRelServiceImpl) DeleteCircle(circleId string) error
DeleteCircle delete the circle from user-rel
func (UserRelServiceImpl) DeleteManyUserRel ¶
func (s UserRelServiceImpl) DeleteManyUserRel(filter interface{}) error
DeleteManyUserRel delete many userRel by filter
func (UserRelServiceImpl) DeleteUserRel ¶
func (s UserRelServiceImpl) DeleteUserRel(filter interface{}) error
DeleteUserRel delete userRel by filter
func (UserRelServiceImpl) DeleteUserRelByOwner ¶
DeleteUserRel delete userRel by ownerUserId and userRelId
func (UserRelServiceImpl) FindByOwnerUserId ¶
func (s UserRelServiceImpl) FindByOwnerUserId(ownerUserId string) (*dto.UserRel, error)
FindByOwnerUserId find by owner user id
func (UserRelServiceImpl) FindOneUserRel ¶
func (s UserRelServiceImpl) FindOneUserRel(filter interface{}) (*dto.UserRel, error)
FindOneUserRel get one userRel
func (UserRelServiceImpl) FindRelsIncludeProfile ¶
func (s UserRelServiceImpl) FindRelsIncludeProfile(filter interface{}, limit int64, skip int64, sort map[string]int) ([]dto.UserRel, error)
FindRelsIncludeProfile get all user relations by filter including user profile entity
func (UserRelServiceImpl) FindUserRelList ¶
func (s UserRelServiceImpl) FindUserRelList(filter interface{}, limit int64, skip int64, sort map[string]int) ([]dto.UserRel, error)
FindUserRelList get all userRels by filter
func (UserRelServiceImpl) FollowUser ¶
func (s UserRelServiceImpl) FollowUser(leftUser dto.UserRelMeta, rightUser dto.UserRelMeta, circleIds []string, tags []string) error
FollowUser create relation between two users
func (UserRelServiceImpl) GetFollowers ¶
GetFollowers Get user followers by userId
func (UserRelServiceImpl) GetFollowing ¶
GetFollowing Get user's following by userId
func (UserRelServiceImpl) QueryUserRel ¶
func (s UserRelServiceImpl) QueryUserRel(search string, ownerUserId *uuid.UUID, sortBy string, page int64) ([]dto.UserRel, error)
QueryUserRel get all userRels by query
func (UserRelServiceImpl) SaveUserRel ¶
func (s UserRelServiceImpl) SaveUserRel(userRel *dto.UserRel) error
SaveUserRel save the userRel
func (UserRelServiceImpl) UnfollowUser ¶
UnfollowUser delete relation between two users by left and right userId
func (UserRelServiceImpl) UpdateRelCircles ¶
func (s UserRelServiceImpl) UpdateRelCircles(leftId uuid.UUID, rightId uuid.UUID, circleIds []string) error
UpdateRelCircles update the user relation circle ids
func (UserRelServiceImpl) UpdateUserRel ¶
func (s UserRelServiceImpl) UpdateUserRel(filter interface{}, data interface{}) error
UpdateUserRel update the userRel
func (UserRelServiceImpl) UpdateUserRelById ¶
func (s UserRelServiceImpl) UpdateUserRelById(data *dto.UserRel) error
UpdateUserRel update the userRel