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(id primitive.ObjectID) error
- func (m *Mgo) DropAnnotation(id primitive.ObjectID, annotation *Annotation) error
- func (m *Mgo) DropOperator(email string) error
- func (m *Mgo) DropRiver(name string) error
- func (m *Mgo) DropTag(name string, resourceName string) error
- func (m *Mgo) ExistsOperator(email string) bool
- func (m *Mgo) ExistsRiver(name string) bool
- func (m *Mgo) ExistsTag(name string) bool
- func (m *Mgo) InsertAlga(obj *Alga) (interface{}, error)
- func (m *Mgo) InsertAnnotation(id primitive.ObjectID, annotation *Annotation) error
- func (m *Mgo) InsertOperator(obj *Operator) error
- func (m *Mgo) InsertRiver(r *River) (interface{}, error)
- func (m *Mgo) InsertTag(t *Tag) error
- func (m *Mgo) QueryAlgaById(id primitive.ObjectID) *Alga
- func (m *Mgo) QueryAlgaByKey(id primitive.ObjectID, key string) []Alga
- func (m *Mgo) QueryAlgaByName(id primitive.ObjectID, name string) []Alga
- func (m *Mgo) QueryAnnotation(id 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) QueryRiverByIdWithoutAlgae(obj primitive.ObjectID) *River
- func (m *Mgo) QueryRiverByKeyWithoutAlgae(key string) *River
- func (m *Mgo) QueryRiverByName(obj string) *River
- func (m *Mgo) QueryRiverListByEmail(email string) ([]primitive.ObjectID, error)
- func (m *Mgo) QueryTagByName(obj string) Tag
- func (m *Mgo) QueryTags() ([]*Tag, error)
- func (m *Mgo) UpdateOperator(id primitive.ObjectID, dataSetID []primitive.ObjectID) error
- func (m *Mgo) UpdatePassword(email string, newPassword string) error
- func (m *Mgo) UpdateRiver(id primitive.ObjectID, r River) error
- func (m *Mgo) UpdateRiverAlgae(id primitive.ObjectID, algae []primitive.ObjectID) error
- func (m *Mgo) UpsertOperator(email, name, password string, access int) error
- type ModelTag
- type Operator
- type River
- type Tag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateIndex ¶
func CreateIndex()
Types ¶
type Alga ¶
type Alga struct { field.DefaultField `bson:",inline"` Name string `json:"name" bson:"name"` Src string `json:"src" bson:"src"` Annotations []Annotation `json:"annotations" bson:"annotations"` }
Alga 图片直接拥有标注
type Annotation ¶
type Annotation struct { field.DefaultField `bson:",inline"` Tag ModelTag `json:"tag" bson:"tag"` Description string `json:"description" bson:"description"` Segmentation []float64 `json:"segmentation" bson:"segmentation"` }
Annotation 标注使用Tag segmentation 为标注的多边形 Tag 为标注的类型 Description 为标注的描述
type Mgo ¶
type Mgo struct{}
func (*Mgo) DropAnnotation ¶
func (m *Mgo) DropAnnotation(id primitive.ObjectID, annotation *Annotation) error
DropAnnotation TODO 可能没有删除标注的功能
func (*Mgo) DropOperator ¶
func (*Mgo) ExistsOperator ¶
func (*Mgo) ExistsRiver ¶
func (*Mgo) InsertAlga ¶
InsertAlga 在数据集中插入一个alga
func (*Mgo) InsertAnnotation ¶
func (m *Mgo) InsertAnnotation(id primitive.ObjectID, annotation *Annotation) error
InsertAnnotation 插入标注
func (*Mgo) InsertOperator ¶
func (*Mgo) InsertRiver ¶
func (*Mgo) QueryAlgaById ¶
QueryAlgaById 数据集直接内嵌algae,所以通过数据集id获取图片
func (*Mgo) QueryAlgaByKey ¶
QueryAlgaByKey 正则查找
func (*Mgo) QueryAlgaByName ¶
QueryAlgaByName 在数据集中通过名称查找,返回alga切片(名字会重复)
func (*Mgo) QueryAnnotation ¶
func (m *Mgo) QueryAnnotation(id primitive.ObjectID) []Annotation
func (*Mgo) QueryOperatorByEmail ¶
func (*Mgo) QueryOperators ¶
func (*Mgo) QueryRiverByIdWithoutAlgae ¶
QueryRiverByIdWithoutAlgae 待测试数据没有algae是否可以被绑定
func (*Mgo) QueryRiverByKeyWithoutAlgae ¶
func (*Mgo) QueryRiverByName ¶
func (*Mgo) QueryRiverListByEmail ¶
QueryRiverListByEmail 获取用户拥有数据集
func (*Mgo) QueryTagByName ¶
func (*Mgo) UpdateOperator ¶
func (*Mgo) UpdateRiverAlgae ¶
Click to show internal directories.
Click to hide internal directories.