Documentation
¶
Index ¶
- Variables
- type Handler
- func (hdl *Handler) DeleteClient() http.HandlerFunc
- func (hdl *Handler) GetClient() http.HandlerFunc
- func (hdl *Handler) GetClients() http.HandlerFunc
- func (hdl *Handler) GetClientsWithPagination() http.HandlerFunc
- func (hdl *Handler) SaveClient() http.HandlerFunc
- func (hdl *Handler) UpdateClient() http.HandlerFunc
- type Repository
- func (rpo *Repository) DeleteClient(ctx context.Context, tx *sql.Tx, id string)
- func (rpo *Repository) DeleteClientPIC(ctx context.Context, tx *sql.Tx, IDClient string, id []int)
- func (rpo *Repository) GetClient(ctx context.Context, tx *sql.Tx, id string) (*model.Client, error)
- func (rpo *Repository) GetClientPIC(ctx context.Context, tx *sql.Tx, id string) *[]model.ClientPIC
- func (rpo *Repository) GetClients(ctx context.Context, tx *sql.Tx) *[]model.Client
- func (rpo *Repository) GetClientsWithPagination(ctx context.Context, tx *sql.Tx, params *helper.PaginationParams) *[]model.Client
- func (rpo *Repository) SaveClient(ctx context.Context, tx *sql.Tx, data *model.Client)
- func (rpo *Repository) SaveClientPIC(ctx context.Context, tx *sql.Tx, data *[]model.ClientPIC)
- func (rpo *Repository) UpdateClient(ctx context.Context, tx *sql.Tx, data *model.Client)
- func (rpo *Repository) UpdateClientPIC(ctx context.Context, tx *sql.Tx, data *[]model.ClientPIC)
- type Router
- type Service
- func (svc *Service) DeleteClient(ctx context.Context, id string)
- func (svc *Service) GetClient(ctx context.Context, id string) model.ClientResponse
- func (svc *Service) GetClients(ctx context.Context) []model.ClientResponse
- func (svc *Service) GetClientsWithPagination(ctx context.Context, params *helper.PaginationParams) []model.ClientResponse
- func (svc *Service) SaveClient(ctx context.Context, request *model.SaveRequestClient) model.ClientResponse
- func (svc *Service) UpdateClient(ctx context.Context, request *model.UpdateRequestClient) model.ClientResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ProviderSet = wire.NewSet( ProvideRoute, ProvideHandler, ProvideService, ProvideRepository, wire.Bind(new(model.ClientHandler), new(*Handler)), wire.Bind(new(model.ClientService), new(*Service)), wire.Bind(new(model.ClientRepository), new(*Repository)), ) )
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func ProvideHandler ¶
func ProvideHandler(svc model.ClientService, validate *validator.Validate) *Handler
func (*Handler) DeleteClient ¶
func (hdl *Handler) DeleteClient() http.HandlerFunc
func (*Handler) GetClient ¶
func (hdl *Handler) GetClient() http.HandlerFunc
func (*Handler) GetClients ¶
func (hdl *Handler) GetClients() http.HandlerFunc
func (*Handler) GetClientsWithPagination ¶
func (hdl *Handler) GetClientsWithPagination() http.HandlerFunc
func (*Handler) SaveClient ¶
func (hdl *Handler) SaveClient() http.HandlerFunc
func (*Handler) UpdateClient ¶
func (hdl *Handler) UpdateClient() http.HandlerFunc
type Repository ¶
type Repository struct{}
func ProvideRepository ¶
func ProvideRepository() *Repository
func (*Repository) DeleteClient ¶
func (*Repository) DeleteClientPIC ¶
func (*Repository) GetClientPIC ¶
func (*Repository) GetClients ¶
func (*Repository) GetClientsWithPagination ¶
func (rpo *Repository) GetClientsWithPagination(ctx context.Context, tx *sql.Tx, params *helper.PaginationParams) *[]model.Client
func (*Repository) SaveClient ¶
func (*Repository) SaveClientPIC ¶
func (*Repository) UpdateClient ¶
func (*Repository) UpdateClientPIC ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func ProvideRoute ¶
func ProvideRoute(hdl model.ClientHandler) *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.ClientRepository, db *sql.DB) *Service
func (*Service) GetClients ¶
func (svc *Service) GetClients(ctx context.Context) []model.ClientResponse
func (*Service) GetClientsWithPagination ¶
func (svc *Service) GetClientsWithPagination(ctx context.Context, params *helper.PaginationParams) []model.ClientResponse
func (*Service) SaveClient ¶
func (svc *Service) SaveClient(ctx context.Context, request *model.SaveRequestClient) model.ClientResponse
func (*Service) UpdateClient ¶
func (svc *Service) UpdateClient(ctx context.Context, request *model.UpdateRequestClient) model.ClientResponse
Click to show internal directories.
Click to hide internal directories.