Documentation ¶
Index ¶
- func AddAlga(obj Alga) (primitive.ObjectID, error)
- func AddAnnotation(id primitive.ObjectID, obj Annotation) error
- func AddRiver(obj River) (primitive.ObjectID, error)
- func AddTag(obj Tag) error
- func AddUser(obj Operator) error
- func BindToRiver(rId primitive.ObjectID, aId primitive.ObjectID) error
- func ChangePassword(email string, newPassword string) error
- func CheckAdmin(email string) bool
- func CheckAuth(email, password string) bool
- func DeleteAnnotation(id primitive.ObjectID, annotation Annotation) error
- func DeleteTag(name string, resouceName string) error
- func DeleteUser(email string) error
- func RiverBindToUser(userEmail string, id primitive.ObjectID) error
- func UpdateUser(obj Operator) error
- type Alga
- type AlgaUpload
- type AlgaWithId
- type Anno
- type Annotation
- type Operator
- type River
- type RiverAdd
- type RiverWithId
- type Tag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAnnotation ¶
func AddAnnotation(id primitive.ObjectID, obj Annotation) error
func ChangePassword ¶
func CheckAdmin ¶
func DeleteAnnotation ¶
func DeleteAnnotation(id primitive.ObjectID, annotation Annotation) error
func DeleteUser ¶
func RiverBindToUser ¶
RiverBindToUser 根据用户邮箱绑定数据集对应用户
func UpdateUser ¶
Types ¶
type Alga ¶
type Alga struct { Name string `json:"name" binding:"required"` Src string `json:"src" binding:"required"` Annotations []Annotation `json:"annotations" binding:"-"` }
Alga 藻类图片元数据
func GetAlgaData ¶
type AlgaUpload ¶
type AlgaUpload struct { RiverId string `json:"riverId" binding:"required"` Alga Alga `json:"alga" binding:"required"` }
AlgaUpload 上传藻类图片时使用,将图片与数据集关联
type AlgaWithId ¶
type AlgaWithId struct { Id string `json:"id" binding:"-"` Name string `json:"name" binding:"required"` Src string `json:"src" binding:"required"` Annotations []Annotation `json:"annotations" binding:"-"` }
func GetAllAlga ¶
func GetAllAlga(rId string) []*AlgaWithId
type Anno ¶
type Anno struct { AlgaId string `json:"algaId" binding:"required"` Description string `json:"description"` Tag Tag `json:"tag" binding:"required"` Segmentation []float64 `json:"segmentation" binding:"required"` }
Anno 将标注数据与藻类图片关联时使用
type Annotation ¶
type Annotation struct { Description string `json:"description"` CreateAt string `json:"createAt" binding:"-"` UpdateAt string `json:"updateAt" binding:"-"` // 坐标点 Segmentation []float64 `json:"segmentation" binding:"required"` Tag *Tag `json:"tag" binding:"required"` }
Annotation 标注数据
func DataBaseAnnoToModelAnno ¶
func DataBaseAnnoToModelAnno(annotations []database.Annotation) []Annotation
func GetAnnotations ¶
func GetAnnotations(id primitive.ObjectID) []Annotation
type Operator ¶
type Operator struct { Name string `json:"name" binding:"required"` Password string `json:"password" binding:"required"` Email string `json:"email" binding:"required"` Access int `json:"access" binding:"-"` CreateAt string `json:"createAt" binding:"-"` // 用户拥有的数据集,即river DataSet []string `json:"dataSet" binding:"-"` }
type River ¶
type River struct { Name string `json:"name" binding:"required"` Address string `json:"address" binding:"required"` Algae []string `json:"algae" binding:"-"` }
River 在本系统为数据集概念,algae 为藻类图片集
func GetRiverByID ¶
type RiverWithId ¶
type RiverWithId struct { Id string `json:"id" binding:"required"` Name string `json:"name" binding:"required"` Address string `json:"address" binding:"required"` Algae []string `json:"algae" binding:"-"` }
func GetRiversWithoutAlgae ¶
func GetRiversWithoutAlgae(userEmail string) []RiverWithId
func SearchRiverByKeyWithoutAlgae ¶
func SearchRiverByKeyWithoutAlgae(userEmail string, keyword string) []RiverWithId
SearchRiverByKeyWithoutAlgae 根据关键字搜索河流
Click to show internal directories.
Click to hide internal directories.