Documentation
¶
Index ¶
- func AddBookAuthor(dbx *sqlx.DB, bookID, authorID int) error
- func CreateAuthor(dbx *sqlx.DB, name, url string) error
- func CreateEpisode(dbx *sqlx.DB, title string, bookID, indexnum int) error
- func CreateSection(dbx *sqlx.DB, content string, episodeID, indexNum int) error
- func RemoveBookAuthor(dbx *sqlx.DB, bookID, authorID int) error
- type Author
- type Book
- type BookEpi
- type Episode
- type Section
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBookAuthor ¶
AddBookAuthor registers an existing Author as an author of an existing Book.
func CreateAuthor ¶
CreateAuthor creates an author.
func CreateEpisode ¶
CreateEpisode creates a new episode.
func CreateSection ¶
CreateSection creates a new section.
Types ¶
type Author ¶
type Author struct { ID int `json:"id"` Name string `json:"name"` URL string `json:"url"` CreatedAt time.Time `db:"created_at" json:"createdAt"` }
Author is a novelist, which is eligible to be the author of books.
type Book ¶
type Book struct { ID int `json:"id"` Title string `json:"title"` CreatedAt time.Time `db:"created_at" json:"createdAt"` Authors []Author `json:"authors"` Episodes []Episode `json:"episodes"` }
Book is a nutritious book.
type Episode ¶
type Episode struct { ID int `json:"id"` Title string `json:"title"` BookID int `db:"book_id" json:"bookID"` IndexNum int `json:"index"` CreatedAt time.Time `db:"created_at" json:"createdAt"` Sections []Section `json:"sections"` }
Episode is an episode in a book.
Click to show internal directories.
Click to hide internal directories.