engine

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteId

func DeleteId(resource *crud.Resource, c *gin.Context)

根据id查询数据

func FindOne

func FindOne(resource *crud.Resource, c *gin.Context)

查询单个数据

func Func

func Func(resource *crud.Resource, c *gin.Context)

保存数据

func GetCollectionName

func GetCollectionName() *string

func GetWithId

func GetWithId(resource *crud.Resource, c *gin.Context)

根据id查询数据

func Post

func Post(resource *crud.Resource, c *gin.Context)

保存数据

func Query

func Query(resource *crud.Resource, c *gin.Context)

保存数据

func QueryWithBson

func QueryWithBson(resource *crud.Resource, collection collection.Collection, body CollectionBody) map[string]interface{}

func Save

func Save(resource *crud.Resource, collection collection.Collection, body CollectionBody) map[string]interface{}

Types

type CollectionBody

type CollectionBody struct {
	Filter    bson.M                 `json:"filter"`
	Body      map[string]interface{} `json:"body" `
	Sort      []crud.Sort            `json:"sort" `
	Page      commons.PagingRequest  `json:"page" `
	Aggregate string                 `json:"aggregate" `
}

type CollectionQuery

type CollectionQuery struct {
	Group      string `uri:"group" binding:"required"`
	Collection string `uri:"collection" binding:"required"`

	Func string `uri:"func"`
}

func (*CollectionQuery) GetDbCollection

func (query *CollectionQuery) GetDbCollection(resource *crud.Resource) *collection.Collection

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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