service

package
v0.0.0-...-b4a6059 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CollectiveService

type CollectiveService interface {
	SaveCollective(collective *dto.Collective) error
	FindOneCollective(filter interface{}) (*dto.Collective, error)
	FindCollectiveList(filter interface{}, limit int64, skip int64, sort map[string]int) ([]dto.Collective, error)
	QueryCollective(search string, sortBy string, page int64, notIncludeCollectiveIDList []uuid.UUID) ([]dto.Collective, error)
	FindCollectiveByCollectiveIds(collectiveIds []uuid.UUID) ([]dto.Collective, error)
	FindByCollectiveId(collectiveId uuid.UUID) (*dto.Collective, error)
	DeleteCollective(filter interface{}) error
	FindByCollectiveName(name string) (*dto.Collective, error)
	CreateCollectiveIndex(indexes map[string]interface{}) error
	IncreaseFollowCount(objectId uuid.UUID, inc int) error
	IncreaseFollowerCount(objectId uuid.UUID, inc int) error
	IncreasePostCount(collectiveUUID uuid.UUID, inc int) error
}

func NewCollectiveService

func NewCollectiveService(db interface{}) (CollectiveService, error)

NewCollectiveService initializes CollectiveService's dependencies and create new CollectiveService struct

type CollectiveServiceImpl

type CollectiveServiceImpl struct {
	CollectiveRepo coreData.Repository
}

CollectiveService handlers with injected dependencies

func (CollectiveServiceImpl) CreateCollectiveIndex

func (s CollectiveServiceImpl) CreateCollectiveIndex(indexes map[string]interface{}) error

CreateCollectiveIndex create index for Collective search.

func (CollectiveServiceImpl) DeleteCollective

func (s CollectiveServiceImpl) DeleteCollective(filter interface{}) error

DeleteCollective get all Collective information.

func (CollectiveServiceImpl) DeleteManyCollective

func (s CollectiveServiceImpl) DeleteManyCollective(filter interface{}) error

DeleteManyCollective get all Collective informaition.

func (CollectiveServiceImpl) FindByCollectiveId

func (s CollectiveServiceImpl) FindByCollectiveId(collectiveId uuid.UUID) (*dto.Collective, error)

FindByCollectiveId find Collective by collectiveId

func (CollectiveServiceImpl) FindByCollectiveName

func (s CollectiveServiceImpl) FindByCollectiveName(collectiveName string) (*dto.Collective, error)

FindByCollectivename find user Collective by name

func (CollectiveServiceImpl) FindCollectiveByCollectiveIds

func (s CollectiveServiceImpl) FindCollectiveByCollectiveIds(collectiveIds []uuid.UUID) ([]dto.Collective, error)

FindCollectiveByCollectiveIds Find profile by Collective IDs

func (CollectiveServiceImpl) FindCollectiveList

func (s CollectiveServiceImpl) FindCollectiveList(filter interface{}, limit int64, skip int64, sort map[string]int) ([]dto.Collective, error)

FindCollectiveList get list of Collectives

func (CollectiveServiceImpl) FindOneCollective

func (s CollectiveServiceImpl) FindOneCollective(filter interface{}) (*dto.Collective, error)

FindOneCollective get one collective informaition

func (CollectiveServiceImpl) IncreaseFollowCount

func (s CollectiveServiceImpl) IncreaseFollowCount(objectId uuid.UUID, inc int) error

IncreaseFollowCount increment follow count of post

func (CollectiveServiceImpl) IncreaseFollowerCount

func (s CollectiveServiceImpl) IncreaseFollowerCount(objectId uuid.UUID, inc int) error

IncreaseFollowerCount increment follower count of post

func (CollectiveServiceImpl) IncreasePostCount

func (s CollectiveServiceImpl) IncreasePostCount(objectId uuid.UUID, inc int) error

IncreasePostCount increment post count of collective

func (CollectiveServiceImpl) Increment

func (s CollectiveServiceImpl) Increment(collectiveId uuid.UUID, field string, value int) error

Increment increment a profile field

func (CollectiveServiceImpl) QueryCollective

func (s CollectiveServiceImpl) QueryCollective(search string, sortBy string, page int64, notIncludeCollectiveIDList []uuid.UUID) ([]dto.Collective, error)

QueryPost get all user profile by query

func (CollectiveServiceImpl) SaveCollective

func (s CollectiveServiceImpl) SaveCollective(collective *dto.Collective) error

SaveCollective save ollective informaition

func (CollectiveServiceImpl) UpdateCollective

func (s CollectiveServiceImpl) UpdateCollective(filter interface{}, data interface{}) error

UpdateCollective update collective information

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL