Documentation ¶
Index ¶
- Constants
- func AlterDoc(doc *M, operator string, operation M)
- func Convert(doc M, out interface{})
- func Epoch(date time.Time) int64
- func EpochHours() int64
- func EpochNow() int64
- func InArray(key string, arrays ...[]string) bool
- func Time(timestamp int64) time.Time
- type Asset
- type M
- type MConn
- func (self *MConn) Aggregate(session *mgo.Session, table string, doc []M) *mgo.Pipe
- func (self *MConn) Count(table string, query M) int
- func (self *MConn) Delete(table string, query M) error
- func (self *MConn) DropIndex(table string, key ...string) error
- func (self *MConn) DropIndices(table string) error
- func (self *MConn) EnsureIndex(table string, index mgo.Index) error
- func (self *MConn) FindAndUpdate(table string, query M, doc M, result interface{}) error
- func (self *MConn) FindAndUpsert(table string, query M, doc M, result interface{}) error
- func (self *MConn) Get(session *mgo.Session, table string, query M) *mgo.Iter
- func (self *MConn) GetCursor(session *mgo.Session, table string, query M) *mgo.Query
- func (self *MConn) GetOne(table string, query M, result interface{}) error
- func (self *MConn) HintedCount(table string, query M, hint string) int
- func (self *MConn) HintedGetOne(table string, query M, result interface{}, hint string) error
- func (self *MConn) Insert(table string, doc interface{})
- func (self *MConn) MapReduce(session *mgo.Session, table string, query M, result interface{}, ...) (*mgo.MapReduceInfo, error)
- func (self *MConn) Update(table string, query M, doc M) error
- func (self *MConn) Upsert(table string, query M, doc M) error
- type MapReduce
Constants ¶
View Source
const ( ASSET = "asset" PENDING = "pending" PROCESSING = "processing" READY = "ready" LOST = "lost" )
Variables ¶
This section is empty.
Functions ¶
func EpochHours ¶
func EpochHours() int64
Types ¶
type Asset ¶
type Asset struct { History []string Id bson.ObjectId `json:"_id,omitempty" bson:"_id",omitempty` Size int64 `json:"size" bson:"size"` CreatedOn int64 `json:"created_on" bson:"created_on"` Name string `json:"name" bson:"name"` FileType string `json:"file_type" bson:"file_type"` MimeType string `json:"mime_type" bson:"mime_type"` Bucket string `json:"bucket" bson:"bucket"` Path string `json:"path" bson:"path"` Collection string `json:"collection" bson:"collection"` ThumbnailPath string `json:"thumbnail_path" bson:"thumbnail_path"` Status string `json:"status" bson:"status"` Thumbnails map[string]string `json:"-" bson:"thumbnails"` ReprocessedNumber int `json:"reprocessed_number" bson:"reprocessed_number"` ReprocessedStamp int64 `json:"reprocessed_stamp" bson:"reprocessed_stamp"` }
type MConn ¶
type MConn struct { Session *mgo.Session Dbname string }
var Conn *MConn
func (*MConn) DropIndices ¶
func (*MConn) EnsureIndex ¶
func (*MConn) FindAndUpdate ¶
func (*MConn) FindAndUpsert ¶
func (*MConn) HintedGetOne ¶
Click to show internal directories.
Click to hide internal directories.