common

package
v0.0.0-...-8ef0ebb Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ById

func ById(id bson.ObjectId) bson.M

func ByScope

func ByScope(scopes ...Scope) bson.M

func SoftDelete

func SoftDelete(query bson.M) bson.M

Types

type AssetRef

type AssetRef struct {
	URL         string
	UseOriginal bool
}

type AssetRefsMap

type AssetRefsMap map[bson.ObjectId]AssetRef

type Query

type Query func(col *mgo.Collection) *mgo.Query

type Scope

type Scope func(bson.M) bson.M

func FieldExists

func FieldExists(field string, exists bool) Scope

func FulltextSearch

func FulltextSearch(search string) Scope

func WithinID

func WithinID(list []bson.ObjectId) Scope

type UsersStringMap

type UsersStringMap map[bson.ObjectId]string

UsersStringMap is just map of id -> username (cache purposes).

Jump to

Keyboard shortcuts

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