Documentation ¶
Index ¶
- Variables
- func NewController(restful Crud, resource Resource) *controller
- func StdRoutes(group *gin.RouterGroup, rest GinRest)
- type Crud
- type Error
- type GinRest
- type Repository
- type Resource
- type SqliteRepository
- func (r SqliteRepository) Create(resource interface{}) (interface{}, error)
- func (r SqliteRepository) Delete(id int) error
- func (r SqliteRepository) Get(id int) (interface{}, error)
- func (r SqliteRepository) List(params url.Values) (interface{}, error)
- func (r SqliteRepository) Update(id int, resource interface{}) (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
func NewController ¶
func StdRoutes ¶
func StdRoutes(group *gin.RouterGroup, rest GinRest)
Types ¶
type Repository ¶
type SqliteRepository ¶
type SqliteRepository struct {
Repository
}
func (SqliteRepository) Create ¶
func (r SqliteRepository) Create(resource interface{}) (interface{}, error)
func (SqliteRepository) Delete ¶
func (r SqliteRepository) Delete(id int) error
func (SqliteRepository) Get ¶
func (r SqliteRepository) Get(id int) (interface{}, error)
func (SqliteRepository) List ¶
func (r SqliteRepository) List(params url.Values) (interface{}, error)
func (SqliteRepository) Update ¶
func (r SqliteRepository) Update(id int, resource interface{}) (interface{}, error)
Click to show internal directories.
Click to hide internal directories.