Documentation ¶
Index ¶
- Variables
- type Handler
- type Repository
- func (rpo *Repository) DeletePIC(ctx context.Context, tx *sql.Tx, id string)
- func (rpo *Repository) GetPIC(ctx context.Context, tx *sql.Tx, id string) (*model.PIC, error)
- func (rpo *Repository) GetPICs(ctx context.Context, tx *sql.Tx) *[]model.PIC
- func (rpo *Repository) GetPICsWithPagination(ctx context.Context, tx *sql.Tx, params *helper.PaginationParams) *[]model.PIC
- func (rpo *Repository) SavePIC(ctx context.Context, tx *sql.Tx, data *model.PIC)
- func (rpo *Repository) UpdatePIC(ctx context.Context, tx *sql.Tx, data *model.PIC)
- type Router
- type Service
- func (svc *Service) DeletePIC(ctx context.Context, id string)
- func (svc *Service) GetPIC(ctx context.Context, id string) model.PICResponse
- func (svc *Service) GetPICs(ctx context.Context) []model.PICResponse
- func (svc *Service) GetPICsWithPagination(ctx context.Context, params *helper.PaginationParams) []model.PICResponse
- func (svc *Service) SavePIC(ctx context.Context, request *model.SaveRequestPIC) model.PICResponse
- func (svc *Service) UpdatePIC(ctx context.Context, request *model.UpdateRequestPIC) model.PICResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ProviderSet = wire.NewSet( ProvideRoute, ProvideHandler, ProvideService, ProvideRepository, wire.Bind(new(model.PICHandler), new(*Handler)), wire.Bind(new(model.PICService), new(*Service)), wire.Bind(new(model.PICRepository), new(*Repository)), ) )
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func ProvideHandler ¶
func ProvideHandler(svc model.PICService, validate *validator.Validate) *Handler
func (*Handler) DeletePIC ¶
func (hdl *Handler) DeletePIC() http.HandlerFunc
func (*Handler) GetPIC ¶
func (hdl *Handler) GetPIC() http.HandlerFunc
func (*Handler) GetPICs ¶
func (hdl *Handler) GetPICs() http.HandlerFunc
func (*Handler) GetPICsWithPagination ¶
func (hdl *Handler) GetPICsWithPagination() http.HandlerFunc
func (*Handler) SavePIC ¶
func (hdl *Handler) SavePIC() http.HandlerFunc
func (*Handler) UpdatePIC ¶
func (hdl *Handler) UpdatePIC() http.HandlerFunc
type Repository ¶
type Repository struct{}
func ProvideRepository ¶
func ProvideRepository() *Repository
func (*Repository) GetPICsWithPagination ¶
func (rpo *Repository) GetPICsWithPagination(ctx context.Context, tx *sql.Tx, params *helper.PaginationParams) *[]model.PIC
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func ProvideRoute ¶
func ProvideRoute(hdl model.PICHandler) *Router
func (*Router) InitializeRoutes ¶
func (router *Router) InitializeRoutes(route chi.Router)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func ProvideService ¶
func ProvideService(rpo model.PICRepository, db *sql.DB) *Service
func (*Service) GetPICsWithPagination ¶
func (svc *Service) GetPICsWithPagination(ctx context.Context, params *helper.PaginationParams) []model.PICResponse
func (*Service) SavePIC ¶
func (svc *Service) SavePIC(ctx context.Context, request *model.SaveRequestPIC) model.PICResponse
func (*Service) UpdatePIC ¶
func (svc *Service) UpdatePIC(ctx context.Context, request *model.UpdateRequestPIC) model.PICResponse
Click to show internal directories.
Click to hide internal directories.