Documentation ¶
Index ¶
- Variables
- func FillStruct(s interface{}, m map[string]interface{}) error
- func GetFields(model interface{}, search string) map[string]interface{}
- func Initialize(uri string, appname string) error
- func ReadTagAndValue(val interface{})
- func ToBSON(doc interface{}) (bsonData bson.M, err error)
- type KezQu
- type Model
- func (self *Model) Delete() (err error)
- func (self *Model) Find(q bson.M) *mgo.Query
- func (self *Model) FindAll(query KezQu, models interface{}) error
- func (self *Model) FindOne(query interface{}, model interface{}) (err error)
- func (self *Model) Remove(query interface{}) (err error)
- func (self *Model) Save() (*Model, error)
- func (self *Model) Search(query KezQu, indexes []string, models interface{}) error
- func (self *Model) SetItself(model interface{})
Constants ¶
This section is empty.
Variables ¶
View Source
var APPNAME string
View Source
var Database *mgo.Session = nil
Functions ¶
func FillStruct ¶
func Initialize ¶
func ReadTagAndValue ¶
func ReadTagAndValue(val interface{})
Types ¶
type Model ¶
type Model struct { Id bson.ObjectId `bson:"_id,omitempty" json:"id"` CreatedAt time.Time `json:"created_at" bson:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at" bson:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*Model) FindAll ¶
* @param query for specific filters * @param models needs to be pointer of model array * @return err
Click to show internal directories.
Click to hide internal directories.