Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterRoute ¶
func RegisterRoute(s server.Server, c IController)
Types ¶
type IController ¶
type IController interface { GetAll(ctx echo.Context) error GetDetail(ctx echo.Context) error Create(ctx echo.Context) error Update(ctx echo.Context) error Delete(ctx echo.Context) error }
func NewController ¶
func NewController(s IService, l *logrus.Logger) IController
type IRepository ¶
type IRepository interface { GetAll(ctx context.Context, p getAllRepoParams) ([]Food, error) GetDetail(ctx context.Context, id int) (Food, error) Create(ctx context.Context, f Food) (Food, error) Update(ctx context.Context, f Food, id int) (Food, error) Delete(ctx context.Context, id int) (Food, error) }
func NewRepository ¶
func NewRepository(db *sqlx.DB, l *logrus.Logger) IRepository
type IService ¶
type IService interface { GetAll(ctx context.Context, p getAllRepoParams) ([]Food, error) GetDetail(ctx context.Context, id int) (Food, error) Create(ctx context.Context, f Food) (Food, error) Update(ctx context.Context, f Food, id int) (Food, error) Delete(ctx context.Context, id int) (Food, error) }
func NewService ¶
func NewService(r IRepository, l *logrus.Logger) IService
Click to show internal directories.
Click to hide internal directories.