mapper

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Code generated by goctl. DO NOT EDIT.

Code generated by goctl. DO NOT EDIT.

Index

Constants

View Source
const CommentCollectionName = "comment"
View Source
const HistoryCollectionName = "history"

Variables

View Source
var (
	ErrNotFound        = mon.ErrNotFound
	ErrInvalidObjectId = errors.New("invalid objectId")
)
View Source
var CommentSet = wire.NewSet(
	NewCommentModel,
)
View Source
var HistorySet = wire.NewSet(
	NewHistoryModel,
)

Functions

This section is empty.

Types

type CommentModel

type CommentModel interface {
	FindByAuthorIdAndType(ctx context.Context, authorId string, _type string, skip int64, limit int64) ([]db.Comment, int64, error)
	FindByParent(ctx context.Context, _type string, parentId string, onlyFirstLevel *bool, skip int64, limit int64) ([]db.Comment, int64, error)
	FindByFirstLevel(ctx context.Context, firstLevelId string, skip int64, limit int64) ([]db.Comment, int64, error)
	FindByReplyToAndType(ctx context.Context, _type string, replyTo string, skip int64, limit int64) ([]db.Comment, int64, error)
	CountByParent(ctx context.Context, _type string, parentId string, onlyFirstLevel *bool) (int64, error)
	CountByFirstLevel(ctx context.Context, parentId string) (int64, error)
	// contains filtered or unexported methods
}

CommentModel is an interface to be customized, add more methods here, and implement the added methods in customCommentModel.

func NewCommentModel

func NewCommentModel(config *config.Config) CommentModel

NewCommentModel returns a model for the mongo.

type HistoryModel

type HistoryModel interface {
	// contains filtered or unexported methods
}

HistoryModel is an interface to be customized, add more methods here, and implement the added methods in customHistoryModel.

func NewHistoryModel

func NewHistoryModel(config *config.Config) HistoryModel

NewHistoryModel returns a model for the mongo.

Jump to

Keyboard shortcuts

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