Documentation ¶
Index ¶
- func All(table string, m bson.M, out interface{}) error
- func AllPipe(table string, m []bson.M, out interface{}) error
- func Collection(collection string) (*mgo.Session, *mgo.Collection)
- func Get(table string) (*mgo.Session, *mgo.Collection)
- func Insert(table string, input ...interface{}) error
- func One(table string, m bson.M, out interface{}) error
- func OnePipe(table string, m []bson.M, out interface{}) error
- func SetRibbitItem(item CacheItem) error
- func Update(table string, query bson.M, input interface{}) error
- type CacheItem
- type Mongo
- type MongoSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Collection ¶
func Collection(collection string) (*mgo.Session, *mgo.Collection)
func SetRibbitItem ¶
Types ¶
type CacheItem ¶
type CacheItem struct { ID bson.ObjectId `bson:"_id,omitempty" json:"-"` Code string `bson:"code"` Seqn string `bson:"seqn"` File string `bson:"file"` Indexed time.Time `bson:"indexed"` Raw string `bson:"raw"` }
func GetRibbitItem ¶
func LatestSummary ¶
type Mongo ¶
type Mongo struct {
// contains filtered or unexported fields
}
func New ¶
func New(settings MongoSettings) *Mongo
func (*Mongo) Collection ¶
type MongoSettings ¶
type MongoSettings struct {
Host, Username, Password, Database string
}
Click to show internal directories.
Click to hide internal directories.