dao

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 6 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(inter interface{}, f func(i interface{}) map[string]interface{}) (interface{}, int)

func GetObjectID

func GetObjectID(id interface{}) (primitive.ObjectID, error)

Types

type CommonDoc

type CommonDoc struct {
	Records []*record
}

func (*CommonDoc) AddRecord

func (c *CommonDoc) AddRecord(u LogUser, msg string) []*record

func (*CommonDoc) GetC

func (u *CommonDoc) GetC() string

func (*CommonDoc) SetCreator

func (c *CommonDoc) SetCreator(lu LogUser)

type DocInter

type DocInter interface {
	GetC() string
	GetDoc() interface{}
	GetID() interface{}
	SetCreator(u LogUser)
	AddRecord(u LogUser, msg string) []*record
	GetIndexes() []mongo.IndexModel
}

type ListDoc

type ListDoc interface {
	GetID() string
	GetC() string
	GetList(slice interface{}) []ListDoc
	BeforeSave() error
}

type LogUser

type LogUser interface {
	GetName() string
	GetAccount() string
}

type PipelineQryInter

type PipelineQryInter interface {
	GetQ() bson.M
	GetPipeline() []bson.M
}

func NewPipelineQry added in v0.3.1

func NewPipelineQry(q bson.M, pipeline []bson.M) PipelineQryInter

Jump to

Keyboard shortcuts

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