Documentation ¶
Index ¶
- func APIDELETEBookCard(c *gin.Context)
- func APIDELETECard(c *gin.Context)
- func APIGETBook(c *gin.Context)
- func APIGETBookCards(c *gin.Context)
- func APIGETBooks(c *gin.Context)
- func APIGETCard(c *gin.Context)
- func APIGETPointCards(c *gin.Context)
- func APIGetBook(c *gin.Context)
- func APIPOSTBook(c *gin.Context)
- func APIPOSTBookTaxonomy(c *gin.Context)
- func APIPOSTCard(c *gin.Context)
- func APIPUTCard(c *gin.Context)
- func APIPostCard(c *gin.Context)
- func APIPostUpdateCardTree(c *gin.Context)
- func AdminGETBook(c *gin.Context)
- func DELETEBookCard(bookID uint64, cardID uint64) error
- func GETPoint(c *gin.Context)
- func GetBookEdit(c *gin.Context)
- func GetBookList() ([]model.DBBook, error)
- func InsterCard(userID uint64, bookID uint64, cardName string, cardDesc string, ...) error
- func POSTBook(userID uint64, name string, desc string) error
- func PUTCard(cardID uint64, name string, desc string, state string) (sql.Result, error)
- func Register()
- type APIDELETEBookCardForm
- type APIDELETECardForm
- type APIGETBookCardsForm
- type APIGETCardForm
- type APIPOSTBookForm
- type APIPOSTBookTaxonomyFrom
- type APIPOSTCardForm
- type APIPUTCardForm
- type Book
- type BookCards
- type Card
- type FormAPIPostCard
- type FormAPIPostUpdateCardTree
- type GetBookForm
- type SPErr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIDELETEBookCard ¶
APIDELETEBookCard 移除book下的card下的引用 @since 0.0.3
func APIDELETECard ¶
func APIGETBookCards ¶
func APIGETPointCards ¶
func APIGetBook ¶
func APIPOSTBook ¶
func APIPOSTBookTaxonomy ¶
APIPOSTBookTaxonomy 将已有的 card 添加引用到 book
func APIPostCard ¶
APIPostCard 添加卡片 bookID == 0 只添加 card !=0 关联到 book
func APIPostUpdateCardTree ¶
APIPostUpdateCardTree API 接口修改排序依赖关系
func AdminGETBook ¶
func DELETEBookCard ¶
DELETEBookCard 删除book下的card引用 @since 0.0.3
func InsterCard ¶
func InsterCard(userID uint64, bookID uint64, cardName string, cardDesc string, state model.CardState) error
InsterCard 向book插入新Card sp insert_card 先增加card再添加book的引用关系 @since 0.0.3
Types ¶
type APIDELETEBookCardForm ¶
type APIDELETECardForm ¶
type APIDELETECardForm struct {
CardID uint64 `form:"card_id" json:"card_id"`
}
type APIGETBookCardsForm ¶
type APIGETBookCardsForm struct {
BookID uint64 `form:"book_id" binding:"required"`
}
type APIGETCardForm ¶
type APIGETCardForm struct { // BookID uint64 `json:"book_id" form:"book_id"` CardID uint64 `json:"card_id" form:"card_id"` }
type APIPOSTBookForm ¶
type APIPOSTBookTaxonomyFrom ¶
type APIPOSTCardForm ¶
type APIPOSTCardForm struct { BookID uint64 `json:"book_id"` Name string `json:"name"` Desc string `json:"desc"` }
APIPOSTCardForm APIPOSTCard
type APIPUTCardForm ¶
type Book ¶
type BookCards ¶
type BookCards struct { ID uint64 // book_id Name string Desc string UserID uint64 // Book 的 user ID Cards []Card }
func GetBookCardsByBookID ¶
GetBookCardsByBookID 获取 book card 内容 @since 0.0.3
type Card ¶
type Card struct { CardID uint64 UserID uint64 Name string Desc string State model.CardState DateLastActivity time.Time ShortLink string Date time.Time Level int CardOrder uint64 Cards []Card }
func GetBookCard ¶
GetBookCard card 表没有存 bookID 且 如果同一个卡片挂载到多个 book 的时候 是复制操作 所以这里不做 book 验证
type FormAPIPostCard ¶
Click to show internal directories.
Click to hide internal directories.