Documentation ¶
Index ¶
- func Close()
- func CreateIndex()
- type Alga
- type Annotation
- type Mgo
- func (m *Mgo) CheckOperator(email, password string) (*Operator, error)
- func (m *Mgo) DropAlga(name string) error
- func (m *Mgo) DropOperator(email string) error
- func (m *Mgo) DropRiver(name string) error
- func (m *Mgo) ExistsOperator(email string) bool
- func (m *Mgo) ExistsRiver(name string) bool
- func (m *Mgo) InsertAlga(obj *Alga) (interface{}, error)
- func (m *Mgo) InsertAnnotation(obj *Annotation) (interface{}, error)
- func (m *Mgo) InsertOperator(obj *Operator) error
- func (m *Mgo) InsertRiver(r *River) error
- func (m *Mgo) QueryAlgaByKey(key string) ([]*Alga, error)
- func (m *Mgo) QueryAlgaByName(name string) (*Alga, error)
- func (m *Mgo) QueryAlgae() ([]*Alga, error)
- func (m *Mgo) QueryAnnotationById(obj primitive.ObjectID) *Annotation
- func (m *Mgo) QueryOperatorByEmail(email string) (*Operator, error)
- func (m *Mgo) QueryOperators() ([]*Operator, error)
- func (m *Mgo) QueryRiverById(obj primitive.ObjectID) River
- func (m *Mgo) QueryRiverByName(obj string) River
- func (m *Mgo) QueryRivers() ([]*River, error)
- func (m *Mgo) UpdateAlga(id primitive.ObjectID, annotations []primitive.ObjectID) error
- func (m *Mgo) UpdateOperator(id primitive.ObjectID, annotations []primitive.ObjectID) error
- func (m *Mgo) UpdatePassword(email string, newPassword string) error
- func (m *Mgo) UpdateRiver(id primitive.ObjectID, algae []primitive.ObjectID) error
- func (m *Mgo) UpsertAnnotation(obj *Annotation) error
- func (m *Mgo) UpsertOperator(email, name, password string, access int) error
- type Operator
- type River
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateIndex ¶
func CreateIndex()
Types ¶
type Annotation ¶
type Annotation struct { field.DefaultField `bson:",inline"` Description string `json:"description" bson:"description"` Format string `json:"format" bson:"format"` Url string `json:"url" bson:"url"` }
type Mgo ¶
type Mgo struct{}
func (*Mgo) DropOperator ¶
func (*Mgo) ExistsOperator ¶
func (*Mgo) ExistsRiver ¶
func (*Mgo) InsertAlga ¶
func (*Mgo) InsertAnnotation ¶
func (m *Mgo) InsertAnnotation(obj *Annotation) (interface{}, error)
func (*Mgo) InsertOperator ¶
func (*Mgo) InsertRiver ¶
func (*Mgo) QueryAlgaByKey ¶
QueryAlgaByKey 正则查找
func (*Mgo) QueryAlgaByName ¶
QueryAlgaByName 通过名称查找
func (*Mgo) QueryAlgae ¶
func (*Mgo) QueryAnnotationById ¶
func (m *Mgo) QueryAnnotationById(obj primitive.ObjectID) *Annotation
func (*Mgo) QueryOperatorByEmail ¶
func (*Mgo) QueryOperators ¶
func (*Mgo) QueryRiverByName ¶
func (*Mgo) QueryRivers ¶
func (*Mgo) UpdateAlga ¶
func (*Mgo) UpdateOperator ¶
func (*Mgo) UpdateRiver ¶
func (*Mgo) UpsertAnnotation ¶
func (m *Mgo) UpsertAnnotation(obj *Annotation) error
type Operator ¶
type Operator struct { field.DefaultField `bson:",inline"` Name string `json:"name" bson:"name"` Password string `json:"password" bson:"password"` Email string `json:"email" bson:"email"` Access int `json:"access" bson:"access"` Annotations []primitive.ObjectID `json:"annotations" bson:"annotations"` }
Click to show internal directories.
Click to hide internal directories.