mongodemo

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MongoDemoEntityType reflect.Type = reflect.TypeOf(MongoDemoEntity{})

Functions

This section is empty.

Types

type MongoDemoEntity

type MongoDemoEntity struct {
	svc.MongoBaseEntity

	Name   string `bson:"name" json:"name"`
	Status int    `bson:"status" json:"status"`
}

type MongoDemoSvc

type MongoDemoSvc struct {
	*svc.MongoBaseSvc
}

func NewMongoDemoSvc

func NewMongoDemoSvc(alogger golog.ILogger, mclient *mongo.Client) *MongoDemoSvc

func (*MongoDemoSvc) DeleteById

func (d *MongoDemoSvc) DeleteById(id interface{}) (bool, error)

func (*MongoDemoSvc) GetById

func (d *MongoDemoSvc) GetById(id interface{}) (*MongoDemoEntity, error)

func (*MongoDemoSvc) Insert

func (d *MongoDemoSvc) Insert(entities ...*MongoDemoEntity) ([]interface{}, error)

func (*MongoDemoSvc) SelectAll

func (d *MongoDemoSvc) SelectAll(mqp *svc.MongoQueryParams) (*[]MongoDemoEntity, error)

func (*MongoDemoSvc) SelectRegex

func (d *MongoDemoSvc) SelectRegex(mqp *svc.MongoQueryParams) (*[]MongoDemoEntity, error)

func (*MongoDemoSvc) UpdateById

func (d *MongoDemoSvc) UpdateById(id interface{}, newEntity *MongoDemoEntity, updateFields map[string]bool) (error, error)

Jump to

Keyboard shortcuts

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