pic

package
v0.0.0-...-418667d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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) DeletePIC

func (rpo *Repository) DeletePIC(ctx context.Context, tx *sql.Tx, id string)

func (*Repository) GetPIC

func (rpo *Repository) GetPIC(ctx context.Context, tx *sql.Tx, id string) (*model.PIC, error)

func (*Repository) GetPICs

func (rpo *Repository) GetPICs(ctx context.Context, tx *sql.Tx) *[]model.PIC

func (*Repository) GetPICsWithPagination

func (rpo *Repository) GetPICsWithPagination(ctx context.Context, tx *sql.Tx, params *helper.PaginationParams) *[]model.PIC

func (*Repository) SavePIC

func (rpo *Repository) SavePIC(ctx context.Context, tx *sql.Tx, data *model.PIC)

func (*Repository) UpdatePIC

func (rpo *Repository) UpdatePIC(ctx context.Context, tx *sql.Tx, data *model.PIC)

type Router

type Router struct {
	// contains filtered or unexported fields
}

func ProvideRoute

func ProvideRoute(hdl model.PICHandler) *Router

func Wire

func Wire(validate *validator.Validate, db *sql.DB) *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) DeletePIC

func (svc *Service) DeletePIC(ctx context.Context, id string)

func (*Service) GetPIC

func (svc *Service) GetPIC(ctx context.Context, id string) model.PICResponse

func (*Service) GetPICs

func (svc *Service) GetPICs(ctx context.Context) []model.PICResponse

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL