actions

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: MIT Imports: 17 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BsonMTransferModel

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

Types

type Base

type Base struct {
	Model mgm.Model
}

func (*Base) Handler

func (*Base) Handler() gin.HandlerFunc

Handler action handler

func (*Base) String

func (*Base) String() string

type Control

type Control struct {
	Base
	Key string
}

Control action

func NewControl

func NewControl(m mgm.Model, key string) *Control

NewControl new control action

func (*Control) Handler

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

Handler action handler

func (*Control) String

func (*Control) String() string

String action name

type Delete

type Delete struct {
	Base
	Key string
}

Delete action

func NewDelete

func NewDelete(m mgm.Model, key string) *Delete

NewDelete new delete action

func (*Delete) Handler

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

Handler action handler

func (*Delete) String

func (*Delete) String() string

String action name

type Get

type Get struct {
	Base
	Key string
}

Get action

func NewGet

func NewGet(m mgm.Model, key string) *Get

NewGet new get action

func (*Get) Handler

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

Handler action handler

func (*Get) String

func (*Get) String() string

String action name

type LinkConfig

type LinkConfig struct {
	FieldName      string
	CollectionName string
	LocalField     string
	ForeignField   string
}

type Pagination

type Pagination struct {
	Page     int64 `form:"page" query:"page"`
	PageSize int64 `form:"pageSize" query:"pageSize"`
}

Pagination pagination params

func (*Pagination) GetPage

func (e *Pagination) GetPage() int64

func (*Pagination) GetPageSize

func (e *Pagination) GetPageSize() int64
type Search struct {
	Base
	Search response.Searcher
}

Search action

func NewSearch

func NewSearch(m mgm.Model, search response.Searcher) *Search

NewSearch new search action

func (*Search) Handler

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

Handler action handler

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