Documentation ¶
Index ¶
- func GetFilterAllParams(all []All, query db.Map) (int, error)
- func GetFilterGeoIntersectsParams(geoIntersects []GeoIntersects, query db.Map) (int, error)
- func GetFilterGeoWithinParams(geoWithin []GeoWithin, query db.Map) (int, error)
- func GetFilterInParams(in []In, query db.Map) (int, error)
- func GetFilterNearParams(nears []Near, query db.Map) (int, error)
- func GetFilterNotInParams(in []NotIn, query db.Map) (int, error)
- func GetFilterRangeParams(ranges []Range, query db.Map) (int, error)
- func GetMatchValue(i interface{}) interface{}
- func GetMatchValueOp(i interface{}) interface{}
- func GetQueryElemMatchParams(elemMatch []*ElemMatch, query db.Map) (int, error)
- func GetQueryLikeParams(like []*Like, query db.Map) (int, error)
- func GetQueryMatchParams(match []*Match, query db.Map) (int, error)
- func GetQueryMatchParamsReturn(match []*Match) (db.Map, error)
- func ParseAllValue(i []interface{}) db.Map
- func ParseElemMatchValue(elemMatch *ElemMatch, query db.Map) (err error)
- func ParseInValue(i []interface{}) db.Map
- func ParseLikeValue(like *Like, query db.Map) error
- func ParseMatchValue(match *Match, query db.Map) error
- func ParseMatchValueReturn(match *Match) (db.Map, error)
- func ParseNotInValue(i []interface{}) db.Map
- func ParseSearchQuery(params Params, required ...bool) (db.Map, error)
- func ParseSubAttributes(i, o Attributes, key *string)
- type All
- type Attributes
- func (a *Attributes) Delete(key string) error
- func (a *Attributes) Get(key string) interface{}
- func (a *Attributes) GetArrayFloat32(key string) (values []float32)
- func (a *Attributes) GetArrayFloat64(key string) (values []float64)
- func (a *Attributes) GetArrayInt(key string) (values []int)
- func (a *Attributes) GetArrayInterface(key string) []interface{}
- func (a *Attributes) GetArrayString(key string) (values []string)
- func (a *Attributes) GetFloat64(key string) float64
- func (a *Attributes) GetInt(key string) int
- func (a *Attributes) GetString(key string) string
- func (a *Attributes) GetSubAttributes(key string) (*Attributes, error)
- func (a Attributes) KeyExists(key string) bool
- func (a *Attributes) PairKeyTo(key string, o interface{}) error
- func (a *Attributes) PairTo(o interface{}) error
- func (a Attributes) ParseKeyValSetAttributes() Attributes
- func (a *Attributes) Set(key string, val interface{}) error
- type Claims
- type ElemMatch
- type Error
- type Filter
- type GeoIntersects
- type GeoIntersectsValue
- type GeoWithin
- type GeoWithinValue
- type Geometry
- type IError
- type In
- type Like
- type Limit
- type Match
- type Near
- type NearValue
- type NotIn
- type Params
- type Query
- type Range
- type RangeValue
- type Request
- type Response
- type Sort
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFilterAllParams ¶
GetFilterAllParams function
func GetFilterGeoIntersectsParams ¶
func GetFilterGeoIntersectsParams(geoIntersects []GeoIntersects, query db.Map) (int, error)
GetFilterGeoIntersectsParams function
func GetFilterGeoWithinParams ¶
GetFilterGeoWithinParams function
func GetFilterInParams ¶
GetFilterInParams function
func GetFilterNearParams ¶
GetFilterNearParams function
func GetFilterNotInParams ¶
GetFilterNotInParams function
func GetFilterRangeParams ¶
GetFilterRangeParams function
func GetQueryElemMatchParams ¶
GetQueryElemMatchParams function
func GetQueryLikeParams ¶
GetQueryLikeParams function
func GetQueryMatchParams ¶
GetQueryMatchParams function
func GetQueryMatchParamsReturn ¶
GetQueryMatchParamsReturn function
func ParseElemMatchValue ¶
ParseElemMatchValue function
func ParseMatchValue ¶
ParseMatchValue function
func ParseMatchValueReturn ¶
ParseMatchValueReturn function
func ParseSearchQuery ¶
ParseSearchQuery function
func ParseSubAttributes ¶
func ParseSubAttributes(i, o Attributes, key *string)
ParseSubAttributes function
Types ¶
type All ¶
type All struct { Key string `json:"key" bson:"key" binding:"required"` Value []interface{} `json:"value" bson:"value"` }
All struct
type Attributes ¶
type Attributes map[string]interface{}
Attributes type
func (*Attributes) GetArrayFloat32 ¶
func (a *Attributes) GetArrayFloat32(key string) (values []float32)
GetArrayFloat32 method
func (*Attributes) GetArrayFloat64 ¶
func (a *Attributes) GetArrayFloat64(key string) (values []float64)
GetArrayFloat64 method
func (*Attributes) GetArrayInt ¶
func (a *Attributes) GetArrayInt(key string) (values []int)
GetArrayInt method
func (*Attributes) GetArrayInterface ¶
func (a *Attributes) GetArrayInterface(key string) []interface{}
GetArrayInterface method
func (*Attributes) GetArrayString ¶
func (a *Attributes) GetArrayString(key string) (values []string)
GetArrayString method
func (*Attributes) GetFloat64 ¶
func (a *Attributes) GetFloat64(key string) float64
GetFloat64 method
func (*Attributes) GetSubAttributes ¶
func (a *Attributes) GetSubAttributes(key string) (*Attributes, error)
GetSubAttributes method
func (*Attributes) PairKeyTo ¶
func (a *Attributes) PairKeyTo(key string, o interface{}) error
PairKeyTo method
func (Attributes) ParseKeyValSetAttributes ¶
func (a Attributes) ParseKeyValSetAttributes() Attributes
ParseKeyValSetAttributes method
type Claims ¶
type Claims struct { Ver string `json:"ver" bson:"ver"` Cre string `json:"cre" bson:"cre"` Id string `json:"id" bson:"id"` Jti string `json:"jti" bson:"jti"` Iss string `json:"iss" bson:"iss"` Aud string `json:"aud" bson:"aud"` ClientId string `json:"client_id" bson:"client_id"` Sub string `json:"sub" bson:"sub"` Exp int `json:"exp" bson:"exp"` Expired int `json:"expires" bson:"expires"` Iat int `json:"iat" bson:"iat"` TokenType string `json:"token_type" bson:"token_type"` Scope string `json:"scope" bson:"scope"` UserId string `json:"user_id" bson:"user_id"` CredentialId string `json:"credential_id" bson:"credential_id"` }
Claims struct
type ElemMatch ¶
type ElemMatch struct { Key string `json:"key" bson:"key" binding:"required"` Value []*Match `json:"value" bson:"value"` }
ElemMatch struct
type Error ¶
type Error struct { Level string `json:"level,omitempty" bson:"level,omitempty"` Code string `json:"code" bson:"code" binding:"required"` Type string `json:"type,omitempty" bson:"type,omitempty"` Status string `json:"status,omitempty" bson:"status,omitempty"` Message string `json:"message,omitempty" bson:"message,omitempty"` MessageDetails string `json:"message_details,omitempty" bson:"message_details,omitempty"` Refs interface{} `json:"refs,omitempty" bson:"refs,omitempty"` }
Error struct
type Filter ¶
type Filter struct { Range []Range `json:"range" bson:"range"` In []In `json:"in" bson:"in"` NotIn []NotIn `json:"nin" bson:"nin"` All []All `json:"all" bson:"all"` Near []Near `json:"near" bson:"near"` GeoIntersects []GeoIntersects `json:"geo_intersects" bson:"geo_intersects"` GeoWithin []GeoWithin `json:"geo_within" bson:"geo_within"` }
Filter struct
type GeoIntersects ¶
type GeoIntersects struct { Key string `json:"key" bson:"key" binding:"required"` Value *GeoIntersectsValue `json:"value" bson:"value"` }
GeoIntersects struct
type GeoIntersectsValue ¶
type GeoIntersectsValue struct {
Geometry *Geometry `json:"geometry,omitempty" bson:"geometry,omitempty"`
}
GeoIntersectsValue struct
type GeoWithin ¶
type GeoWithin struct { Key string `json:"key" bson:"key" binding:"required"` Value *GeoWithinValue `json:"value" bson:"value"` }
GeoWithin struct
type GeoWithinValue ¶
type GeoWithinValue struct {
Geometry *Geometry `json:"geometry,omitempty" bson:"geometry,omitempty"`
}
GeoWithinValue struct
type Geometry ¶
type Geometry struct { Type string `json:"type,omitempty" bson:"type,omitempty"` Coordinates []interface{} `json:"coordinates,omitempty" bson:"coordinates,omitempty"` }
Geometry with standard GeoJSON
type IError ¶
type IError struct { Result string `json:"result" bson:"result" binding:"required"` Message string `json:"message,omitempty" bson:"message,omitempty"` }
IError struct
type In ¶
type In struct { Key string `json:"key" bson:"key" binding:"required"` Value []interface{} `json:"value" bson:"value"` }
In struct
type Like ¶
type Like struct { Key string `json:"key" bson:"key" binding:"required"` Value string `json:"value" bson:"value"` }
Like struct
type Match ¶
type Match struct { Key string `json:"key" bson:"key" binding:"required"` Value interface{} `json:"value" bson:"value"` }
Match struct
type Near ¶
type Near struct { Key string `json:"key" bson:"key" binding:"required"` Value *NearValue `json:"value" bson:"value"` }
Near struct
type NearValue ¶
type NearValue struct { Geometry *Geometry `json:"geometry,omitempty" bson:"geometry,omitempty"` MinDistance float64 `json:"min_distance,omitempty" bson:"min_distance,omitempty"` MaxDistance float64 `json:"max_distance,omitempty" bson:"max_distance,omitempty"` }
NearValue struct
type NotIn ¶
type NotIn struct { Key string `json:"key" bson:"key" binding:"required"` Value []interface{} `json:"value" bson:"value"` }
NotIn struct
type Params ¶
type Params struct { Query Query `json:"query" bson:"query"` CustomQuery interface{} `json:"custom_query,omitempty" bson:"custom_query,omitempty"` Filter Filter `json:"filter" bson:"filter"` Sort []Sort `json:"sort" bson:"sort"` Limit Limit `json:"limit" bson:"limit"` Data interface{} `json:"data,omitempty" bson:"data,omitempty"` Options interface{} `json:"options,omitempty" bson:"options,omitempty"` }
Params struct
type Query ¶
type Query struct { Match []*Match `json:"match" bson:"match"` Like []*Like `json:"like" bson:"like"` ElemMatch []*ElemMatch `json:"elem_match" bson:"elem_match"` }
Query struct
type Range ¶
type Range struct { Key string `json:"key" bson:"key" binding:"required"` Value *RangeValue `json:"value" bson:"value"` }
Range struct
type RangeValue ¶
type RangeValue struct { Gt interface{} `json:"gt" bson:"gt"` Lt interface{} `json:"lt" bson:"lt"` Gte interface{} `json:"gte" bson:"gte"` Lte interface{} `json:"lte" bson:"lte"` }
RangeValue struct
type Request ¶
type Request struct { Kind string `json:"kind" bson:"kind" binding:"required"` Values interface{} `json:"values" bson:"values" binding:"required"` }
Request struct
type Response ¶
type Response struct { ReturnVal bool `json:"returnval" bson:"returnval" binding:"required"` RespVal string `json:"respval,omitempty" bson:"respval,omitempty"` Kind string `json:"kind,omitempty" bson:"kind,omitempty"` Values interface{} `json:"values,omitempty" bson:"values,omitempty"` Error interface{} `json:"error,omitempty" bson:"error,omitempty"` }
Response struct