Documentation
¶
Index ¶
- func AddAlga(obj Alga) (interface{}, error)
- func AddAnnotation(obj Anno) (interface{}, error)
- func AddRiver(obj River) error
- func AddUser(obj Operator) error
- func BindToAlga(algaName string, id primitive.ObjectID) error
- func BindToRiver(riverName string, id primitive.ObjectID) error
- func BindToUser(userEmail string, id primitive.ObjectID) error
- func ChangePassword(email string, newPassword string) error
- func CheckAdmin(email string) bool
- func CheckAuth(email, password string) bool
- func DeleteAnnotation(id string) error
- func DeleteUser(email string) error
- func UpdateAnnotation(obj Annotation) error
- func UpdateUser(obj Operator) error
- type Alga
- type Anno
- type Annotation
- type Operator
- type River
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAnnotation ¶
func BindToAlga ¶
BindToAlga 根据藻类名称绑定对应藻类图像
func BindToUser ¶
BindToUser 根据用户邮箱绑定对应用户
func ChangePassword ¶
func CheckAdmin ¶
func DeleteAnnotation ¶
func DeleteUser ¶
func UpdateAnnotation ¶
func UpdateAnnotation(obj Annotation) error
func UpdateUser ¶
Types ¶
type Alga ¶
type Alga struct {
Name string `json:"name" binding:"required"`
Src string `json:"src" binding:"required"`
River string `json:"river" binding:"required"`
}
func SearchAlga ¶
type Annotation ¶
type Annotation struct {
Description string `json:"description" binding:"required"`
Format string `json:"format" binding:"required"`
Url string `json:"url" binding:"required"`
CreateAt string `json:"createAt" binding:"-"`
UpdateAt string `json:"updateAt" binding:"-"`
Id string `json:"id" binding:"-"`
}
func GetAnnotationByAlga ¶
func GetAnnotationByAlga(algaName string) []Annotation
func GetAnnotationByUser ¶
func GetAnnotationByUser(userEmail string) []Annotation
Click to show internal directories.
Click to hide internal directories.