Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Book ¶
type Book struct { gorm.Model // An author of the book. Author string `json:"author,omitempty"` // A book title. Title string `json:"title,omitempty"` // The shelf Id ShelfId int64 `json:"shelf_id,omitempty"` }
A book resource.
type Repository ¶
type Repository interface { AddShelf(s Shelf) (*Shelf, error) AddBook(b Book) (*Book, error) FindBook(id int64) (Book, error) FindShelf(id int64) (Shelf, error) }
func NewSQLiteRepository ¶
func NewSQLiteRepository() Repository
NewSQLiteRepository return a sequence of repository
type SQLiteRepository ¶
SQLite Repository
Click to show internal directories.
Click to hide internal directories.