Documentation ¶
Index ¶
Constants ¶
View Source
const (
IdSort = internal.IdSorter
)
Variables ¶
View Source
var Sorters = map[int]mongop.MongoSorter{ IdSort: (*mongop.IdSorter)(nil), }
Functions ¶
This section is empty.
Types ¶
type MomentMongoModel ¶
type MomentMongoModel interface { Insert(ctx context.Context, data *internal.Moment) error FindOne(ctx context.Context, id string) (*internal.Moment, error) Update(ctx context.Context, data *internal.Moment) error Delete(ctx context.Context, id string) error FindMany(ctx context.Context, fopts *internal.FilterOptions, popts *paginator.PaginationOptions, sorter int) ([]*internal.Moment, error) Count(ctx context.Context, filter *internal.FilterOptions) (int64, error) FindManyAndCount(ctx context.Context, fopts *internal.FilterOptions, popts *paginator.PaginationOptions, sorter int) ([]*internal.Moment, int64, error) }
MomentMongoModel is an interface to be customized, add more methods here, and implement the added methods in defaultMomentModel.
func NewMomentModel ¶
func NewMomentModel(url, db string, c cache.CacheConf) MomentMongoModel
NewMomentModel returns a model for the mongo.
type PostFilter ¶
type PostFilter struct { *internal.FilterOptions // contains filtered or unexported fields }
func (*PostFilter) CheckOnlyCommunityId ¶
func (f *PostFilter) CheckOnlyCommunityId()
func (*PostFilter) CheckOnlyCommunityIds ¶
func (f *PostFilter) CheckOnlyCommunityIds()
func (*PostFilter) CheckOnlyUserId ¶
func (f *PostFilter) CheckOnlyUserId()
Click to show internal directories.
Click to hide internal directories.