Documentation ¶ Index ¶ func Create(db *sql.DB, note Note) error func Delete(db *sql.DB, id string) error func InitializeTable(db *sql.DB) error func Update(db *sql.DB, id string, note Note) error type Note func Get(db *sql.DB, id string) (Note, error) func List(db *sql.DB) ([]Note, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Create ¶ func Create(db *sql.DB, note Note) error func Delete ¶ func Delete(db *sql.DB, id string) error func InitializeTable ¶ func InitializeTable(db *sql.DB) error func Update ¶ func Update(db *sql.DB, id string, note Note) error Types ¶ type Note ¶ type Note struct { ID int `json:"id"` Title string `json:"title"` Content string `json:"content"` } func Get ¶ func Get(db *sql.DB, id string) (Note, error) func List ¶ func List(db *sql.DB) ([]Note, error) Source Files ¶ View all Source files notes.go Click to show internal directories. Click to hide internal directories.