Documentation ¶
Index ¶
- func APIDELETEBook(c *gin.Context)
- 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 APIOPTIONCard(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 APIPostUpdateCardsTreeNew(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(uid uint64, p *pagination.Pagination) ([]model.DBBook, uint64, 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 PUTCardInBook(tx *sql.Tx, uid uint64, cardID uint64, inBook bool) error
- func PutBookCardsTree(bookID uint64, t []TreeData, parent uint64, cardOrder *int) error
- func Register()
- type APIDELETEBookCardForm
- type APIDELETEBookForm
- type APIDELETECardForm
- type APIGETBookCardsForm
- type APIGETBooksForm
- type APIGETCardForm
- type APIGETCardsForm
- type APIPOSTBookForm
- type APIPOSTBookTaxonomyFrom
- type APIPOSTCardForm
- type APIPUTCardForm
- type Book
- type BookCards
- type Card
- type FormAPIPostCard
- type FormAPIPostUpdateCardTree
- type GetBookForm
- type SPErr
- type TreeData
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 APIPostUpdateCardsTreeNew ¶ added in v0.0.10
APIPostUpdateCardTreeNew 更新手册排序 @since 0.0.9 ant 重写
func AdminGETBook ¶
func DELETEBookCard ¶
DELETEBookCard 删除book下的card引用 @since 0.0.3
func GetBookList ¶
func GetBookList(uid uint64, p *pagination.Pagination) ([]model.DBBook, uint64, error)
GetBookList 获取图书列表 @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
func PUTCardInBook ¶ added in v0.0.10
PUTCardInBook 修改 card 的 in_book 字段状态 @since v0.0.9
func PutBookCardsTree ¶ added in v0.0.10
Types ¶
type APIDELETEBookCardForm ¶
type APIDELETEBookForm ¶ added in v0.0.11
type APIDELETEBookForm struct {
BookID uint64 `form:"book_id" binding:"required"`
}
@since 0.0.10
type APIDELETECardForm ¶
type APIDELETECardForm struct {
CardID uint64 `form:"card_id" json:"card_id"`
}
type APIGETBookCardsForm ¶
type APIGETBooksForm ¶ added in v0.0.12
type APIGETBooksForm struct {
pagination.Form
}
APIGETBooksForm 分页表单
type APIGETCardForm ¶
type APIGETCardForm struct { // BookID uint64 `json:"book_id" form:"book_id"` CardID uint64 `json:"card_id" form:"card_id"` }
type APIGETCardsForm ¶ added in v0.0.10
type APIGETCardsForm struct {
ParentCardID uint64 `form:"parent_card_id" binding:"required"`
}
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 APIPUTCardForm struct { CardID uint64 `json:"card_id"` // 主键ID //UserID uint64 `json:"user_id"` // 用户ID Name string `json:"name"` // 卡片名称 Desc string `json:"desc"` // 卡片内容 State string `json:"state"` // enum 状态 ('close','open') }
@since v0.0.9 取消了 user_id
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 // @since v0.0.9 InBook bool 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.