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

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

func GetRawParams

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