Documentation ¶
Index ¶
- func ServeApi(rg *gin.RouterGroup, authHandler gin.HandlerFunc, usecase *Usecase)
- func ServeWeb(rg *gin.RouterGroup, usecase *Usecase)
- type Car
- type CarCreate
- type CarPatch
- type CarUpdate
- type Repo
- type Usecase
- func (u *Usecase) Count() (int, error)
- func (u *Usecase) Create(model *entity.Car) error
- func (u *Usecase) Delete(id uint) (entity.Car, error)
- func (u *Usecase) Get(id uint) (entity.Car, error)
- func (u *Usecase) Query(offset, limit int) ([]entity.Car, error)
- func (u *Usecase) Save(model *entity.Car) error
- func (u *Usecase) Update(model *entity.Car, attrs ...string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServeApi ¶
func ServeApi(rg *gin.RouterGroup, authHandler gin.HandlerFunc, usecase *Usecase)
func ServeWeb ¶
func ServeWeb(rg *gin.RouterGroup, usecase *Usecase)
Types ¶
type CarUpdate ¶
type CarUpdate struct { ID uint `json:"id" form:"id"` Brand string `json:"brand" form:"brand"` Color string `json:"color" form:"color"` Seats uint8 `json:"seats" form:"seats"` CreatedAt string `json:"created_at" form:"created_at"` UpdatedAt string `json:"updated_at" form:"updated_at"` DeletedAt *string `json:"deleted_at" form:"deleted_at"` }
type Repo ¶
Click to show internal directories.
Click to hide internal directories.