Documentation ¶
Index ¶
- Variables
- type Book
- type BookRepository
- type BookRepositoryAdapter
- func (b BookRepositoryAdapter) Delete(id int) *errs.Error
- func (b BookRepositoryAdapter) GetAll(sortBy string) ([]Book, *errs.Error)
- func (b BookRepositoryAdapter) GetById(id int) (*Book, *errs.Error)
- func (b BookRepositoryAdapter) Save(book Book) (*Book, *errs.Error)
- func (b BookRepositoryAdapter) Update(book Book) (*Book, *errs.Error)
- type User
- type UserRepository
- type UserRepositoryAdapter
Constants ¶
This section is empty.
Variables ¶
View Source
var PERMIT = map[string][]string{
"owner": {"/", "/login", "/register", "/books"},
"user": {"/login"},
}
Functions ¶
This section is empty.
Types ¶
type Book ¶
type Book struct { Id int `json:"id"` Title string `json:"title"` Author string `json:"author"` Length int `json:"length"` }
func (Book) ToResponseDto ¶
func (b Book) ToResponseDto() *dto.BookResponse
type BookRepository ¶
type BookRepositoryAdapter ¶
type BookRepositoryAdapter struct {
// contains filtered or unexported fields
}
func NewBookRepositoryAdapter ¶
func NewBookRepositoryAdapter(client *sqlx.DB) BookRepositoryAdapter
func (BookRepositoryAdapter) GetAll ¶
func (b BookRepositoryAdapter) GetAll(sortBy string) ([]Book, *errs.Error)
func (BookRepositoryAdapter) GetById ¶
func (b BookRepositoryAdapter) GetById(id int) (*Book, *errs.Error)
type User ¶
type UserRepository ¶
type UserRepositoryAdapter ¶
type UserRepositoryAdapter struct {
// contains filtered or unexported fields
}
func NewUserRepositoryAdapter ¶
func NewUserRepositoryAdapter(client *sqlx.DB) UserRepositoryAdapter
func (UserRepositoryAdapter) Authenticate ¶
Click to show internal directories.
Click to hide internal directories.