filter

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Find

func Find(params Params, v interface{}) (bson.M, error)

func FindOne

func FindOne(params Params, v interface{}) (bson.M, error)

func GetPathParam

func GetPathParam(params Params, v interface{}) (bson.M, error)

func GetQueryParam

func GetQueryParam(params Params, v interface{}) (bson.M, error)

func Option

func Option(params Params) db.FindOption

func UnmarshalPathParams

func UnmarshalPathParams(params map[string]string, v interface{}) (map[string]interface{}, error)

func UnmarshalQueryParam

func UnmarshalQueryParam(query string, v interface{}) (map[string]interface{}, error)

func ValidateRegex

func ValidateRegex(v string) (*primitive.Regex, error)

func ValidateText

func ValidateText(v map[string]interface{}) (map[string]interface{}, error)

Types

type Params added in v0.2.4

type Params struct {
	QueryParams map[string]string
	PathParams  map[string]string
}

func GetRawParams added in v0.2.4

func GetRawParams(c echo.Context) Params

type ValueType

type ValueType int
const (
	Value ValueType = iota
	Array
	Map
	Bool
	Regex
	String
	Any
)

func (ValueType) String

func (me ValueType) String() string

Jump to

Keyboard shortcuts

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