client

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: 18 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.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 (rpo *Repository) DeleteClient(ctx context.Context, tx *sql.Tx, id string)

func (*Repository) DeleteClientPIC

func (rpo *Repository) DeleteClientPIC(ctx context.Context, tx *sql.Tx, IDClient string, id []int)

func (*Repository) GetClient

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

func (*Repository) GetClientPIC

func (rpo *Repository) GetClientPIC(ctx context.Context, tx *sql.Tx, id string) *[]model.ClientPIC

func (*Repository) GetClients

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

func (*Repository) GetClientsWithPagination

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

func (*Repository) SaveClient

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

func (*Repository) SaveClientPIC

func (rpo *Repository) SaveClientPIC(ctx context.Context, tx *sql.Tx, data *[]model.ClientPIC)

func (*Repository) UpdateClient

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

func (*Repository) UpdateClientPIC

func (rpo *Repository) UpdateClientPIC(ctx context.Context, tx *sql.Tx, data *[]model.ClientPIC)

type Router

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

func ProvideRoute

func ProvideRoute(hdl model.ClientHandler) *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.ClientRepository, db *sql.DB) *Service

func (*Service) DeleteClient

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

func (*Service) GetClient

func (svc *Service) GetClient(ctx context.Context, id string) model.ClientResponse

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

Jump to

Keyboard shortcuts

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