Documentation ¶
Index ¶
- Variables
- func Inspect(args ...interface{})
- type Config
- type Engine
- func (e *Engine) Execute(fn EngineFunc) error
- func (e *Engine) FieldCreate(fp, tp string) error
- func (e *Engine) FieldList(fp string) error
- func (e *Engine) FieldRemove(fp string) error
- func (e *Engine) IsTypePresent(name string) (bool, error)
- func (e *Engine) TypeCreate(name string) error
- func (e *Engine) TypeList() error
- func (e *Engine) TypeLoad(name string) (*Type, error)
- func (e *Engine) TypeRemove(name string) error
- type EngineFunc
- type Field
- type FieldRecord
- type MongoSessionProvider
- type Type
- type TypeRecord
Constants ¶
This section is empty.
Variables ¶
var TypeFieldRegex = regexp.MustCompile("^([a-zA-Z0-9]+):([a-zA-Z0-9]+)$")
Functions ¶
Types ¶
type Config ¶
type Config struct {
*yamlconfig.Config
}
func (*Config) GetMongoConfig ¶
/////////////////////////////////////////////////////////////////////////////////////////////
type Engine ¶
type Engine struct { MongoSessionProvider // contains filtered or unexported fields }
//////////////////////////////////////////////////////////////////////////////
func (*Engine) Execute ¶
func (e *Engine) Execute(fn EngineFunc) error
//////////////////////////////////////////////////////////////////////////////
func (*Engine) FieldCreate ¶
//////////////////////////////////////////////////////////////////////////////
func (*Engine) FieldList ¶
//////////////////////////////////////////////////////////////////////////////
func (*Engine) FieldRemove ¶
//////////////////////////////////////////////////////////////////////////////
func (*Engine) IsTypePresent ¶
//////////////////////////////////////////////////////////////////////////////
func (*Engine) TypeCreate ¶
//////////////////////////////////////////////////////////////////////////////
func (*Engine) TypeList ¶
//////////////////////////////////////////////////////////////////////////////
func (*Engine) TypeLoad ¶
//////////////////////////////////////////////////////////////////////////////
func (*Engine) TypeRemove ¶
//////////////////////////////////////////////////////////////////////////////
type EngineFunc ¶
type Field ¶
type Field struct {
FieldRecord
}
type FieldRecord ¶
type FieldRecord struct { Id bson.ObjectId `bson:"_id" json:"_id"` TypeId bson.ObjectId `bson:"tpid" json:"tpid"` Name string `bson:"nm" json:"nm"` }
///////////////////////////////////////////////////////////////////////////////////////////////////
type MongoSessionProvider ¶
type MongoSessionProvider struct {
Session *mgo.Session
}
func (MongoSessionProvider) GetSystemSession ¶
func (p MongoSessionProvider) GetSystemSession(collName string) (*mgo.Session, *mgo.Collection)
type Type ¶
type Type struct { TypeRecord Engine *Engine }
type TypeRecord ¶
type TypeRecord struct { Id bson.ObjectId `bson:"_id" json:"_id"` Name string `bson:"nm" json:"nm"` }
///////////////////////////////////////////////////////////////////////////////////////////////////