mgm

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BsonMTransferModel

func BsonMTransferModel(bm bson.M, model any) error

BsonMTransferModel bson.M to model

Types

type Base

type Base struct {
	Model    mgm.Model
	Handlers gin.HandlersChain
}

Base action

func (*Base) Handler

func (*Base) Handler() gin.HandlersChain

Handler action handler

func (*Base) String

func (*Base) String() string

String string

type Control

type Control struct {
	Base
	Key string
}

Control action

func NewControl

func NewControl(b Base, key string) *Control

NewControl new control action

func (*Control) Handler added in v0.2.7

func (e *Control) Handler() gin.HandlersChain

func (*Control) String

func (*Control) String() string

String action name

type Delete

type Delete struct {
	Base
	Key string
}

Delete action

func NewDelete

func NewDelete(b Base, key string) *Delete

NewDelete new deleteMgm action

func (*Delete) Handler added in v0.2.7

func (e *Delete) Handler() gin.HandlersChain

func (*Delete) String

func (*Delete) String() string

String action name

type Get

type Get struct {
	Base
	Key string
}

Get action

func NewGet

func NewGet(b Base, key string) *Get

NewGet new get action

func (*Get) Handler added in v0.2.7

func (e *Get) Handler() gin.HandlersChain

func (*Get) String

func (*Get) String() string

String action name

type LinkConfig

type LinkConfig struct {
	// FieldName field name
	FieldName string
	// CollectionName collection name
	CollectionName string
	// LocalField local field
	LocalField string
	// ForeignField foreign field
	ForeignField string
}

LinkConfig link config

type Search struct {
	Base
	TreeField string
	Depth     int
	Search    response.Searcher
}

Search action

func NewSearch

func NewSearch(b Base, search response.Searcher) *Search

NewSearch new search action

func (*Search) Handler added in v0.2.7

func (e *Search) Handler() gin.HandlersChain

func (*Search) String

func (*Search) String() string

String action name

Jump to

Keyboard shortcuts

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