Documentation ¶
Index ¶
- Constants
- Variables
- func NewMongoDriver(name string, url string, dbname string) *mongoDBDriver
- type AutoConfigMongo
- func (this AutoConfigMongo) GetAttributeGroup(group, id string) gdb.IDBAttributeGroup
- func (this AutoConfigMongo) GetCollection(name string) *mgo.Collection
- func (this AutoConfigMongo) GetPriority() int
- func (this AutoConfigMongo) MongoDb()
- func (this AutoConfigMongo) Name() string
- func (this *AutoConfigMongo) PrepareProcess()
- func (this *AutoConfigMongo) TagProcess(bean interface{}, fType reflect.StructField, fValue reflect.Value, ...)
- func (this *AutoConfigMongo) TagProcessorName() string
- type IMongoDBDriver
- type MongoAttributeGroup
- func (this *MongoAttributeGroup) CasSetAttribute(key string, oldValue string, newValue string) bool
- func (this *MongoAttributeGroup) GetAttribute(key string) (string, error)
- func (this *MongoAttributeGroup) SetAttribute(key string, value string) error
- func (this *MongoAttributeGroup) SetAttributes(values map[string]interface{}) error
- type MongoMessageQueue
- type MongoTagProcessor
Constants ¶
View Source
const ( MONGO_KEY_ID = "_id" MONGO_OPT_SET = "$set" MONGO_OPT_UNSET = "$unset" )
View Source
const ( MongoTag = "mongo.c" MongoDomain = "mongo.domain" )
Variables ¶
View Source
var IMongoDBDriverType = reflect.TypeOf((*IMongoDBDriver)(nil)).Elem()
Functions ¶
func NewMongoDriver ¶
Types ¶
type AutoConfigMongo ¶
type AutoConfigMongo struct { // 启动条件 gioc.IBeanCondition gioc.IConfigBase // contains filtered or unexported fields }
func NewAutoConfigMongo ¶
func NewAutoConfigMongo(cfgBase, domain string) *AutoConfigMongo
func (AutoConfigMongo) GetAttributeGroup ¶
func (this AutoConfigMongo) GetAttributeGroup(group, id string) gdb.IDBAttributeGroup
func (AutoConfigMongo) GetCollection ¶
func (this AutoConfigMongo) GetCollection(name string) *mgo.Collection
func (AutoConfigMongo) GetPriority ¶
func (this AutoConfigMongo) GetPriority() int
func (*AutoConfigMongo) PrepareProcess ¶
func (this *AutoConfigMongo) PrepareProcess()
func (*AutoConfigMongo) TagProcess ¶
func (this *AutoConfigMongo) TagProcess(bean interface{}, fType reflect.StructField, fValue reflect.Value, tags map[string]string)
func (*AutoConfigMongo) TagProcessorName ¶
func (this *AutoConfigMongo) TagProcessorName() string
type IMongoDBDriver ¶
type IMongoDBDriver interface { Name() string MongoDb() GetCollection(name string) *mgo.Collection GetAttributeGroup(group, id string) gdb.IDBAttributeGroup }
type MongoAttributeGroup ¶
type MongoAttributeGroup struct {
// contains filtered or unexported fields
}
func NewMongoAttributeGroup ¶
func NewMongoAttributeGroup(collection *mgo.Collection, id string) *MongoAttributeGroup
func (*MongoAttributeGroup) CasSetAttribute ¶
func (this *MongoAttributeGroup) CasSetAttribute(key string, oldValue string, newValue string) bool
func (*MongoAttributeGroup) GetAttribute ¶
func (this *MongoAttributeGroup) GetAttribute(key string) (string, error)
func (*MongoAttributeGroup) SetAttribute ¶
func (this *MongoAttributeGroup) SetAttribute(key string, value string) error
func (*MongoAttributeGroup) SetAttributes ¶
func (this *MongoAttributeGroup) SetAttributes(values map[string]interface{}) error
type MongoMessageQueue ¶
type MongoMessageQueue struct {
// contains filtered or unexported fields
}
func NewMongoMessageQueue ¶
func NewMongoMessageQueue(queue string, session *mgo.Session) *MongoMessageQueue
func (*MongoMessageQueue) Name ¶
func (this *MongoMessageQueue) Name() string
func (*MongoMessageQueue) Pop ¶
func (this *MongoMessageQueue) Pop(num int) []string
func (*MongoMessageQueue) Push ¶
func (this *MongoMessageQueue) Push(msg string) bool
type MongoTagProcessor ¶
type MongoTagProcessor struct {
// contains filtered or unexported fields
}
func NewMongoTagProcessor ¶
func NewMongoTagProcessor(driver *mongoDBDriver) *MongoTagProcessor
func (*MongoTagProcessor) PrepareProcess ¶
func (this *MongoTagProcessor) PrepareProcess()
func (*MongoTagProcessor) TagProcess ¶
func (this *MongoTagProcessor) TagProcess(bean interface{}, fType reflect.StructField, fValue reflect.Value, tags map[string]string)
func (*MongoTagProcessor) TagProcessorName ¶
func (this *MongoTagProcessor) TagProcessorName() string
Click to show internal directories.
Click to hide internal directories.