ARMONIZE names
Some checks failed
dev test / test (push) Failing after 14s
dev test / vulnCheck (push) Has been skipped
dev test / Ci-Lint (push) Has been skipped

This commit is contained in:
maximo tejeda 2024-12-15 15:18:32 -04:00
parent 7a9cf2ce58
commit caf32678b5
3 changed files with 12 additions and 12 deletions

View File

@ -14,7 +14,7 @@ func (a Adapter) CeduladosByCedula(ctx context.Context, req *cedulados.QueryByCe
SeqCed: req.Cedula.SeqCed,
VerCed: req.Cedula.VerCed,
}
c, err := a.api.ByCedula(ctx, cedula)
c, err := a.api.CeduladosByCedula(ctx, cedula)
if err != nil {
return nil, err
}
@ -26,7 +26,7 @@ func (a Adapter) CeduladosByCedula(ctx context.Context, req *cedulados.QueryByCe
}
func (a Adapter) CeduladosGetByNameLastName(ctx context.Context, req *cedulados.QueryByNameLastNameRequest) (*cedulados.QueryMultipleResponse, error) {
cL, err := a.api.GetByNameLastName(ctx, req.Name, req.Apellido_1, req.Apellido_2, req.Page)
cL, err := a.api.CeduladosGetByNameLastName(ctx, req.Name, req.Apellido_1, req.Apellido_2, req.Page)
if err != nil {
return nil, err
}
@ -43,7 +43,7 @@ func (a Adapter) CeduladosGetByNameLastName(ctx context.Context, req *cedulados.
return list, nil
}
func (a Adapter) CeduladosByFTS(ctx context.Context, req *cedulados.QueryByFTSRequest) (*cedulados.QueryMultipleResponse, error) {
cL, err := a.api.GetByFTS(ctx, req.Name, req.Page)
cL, err := a.api.CeduladosGetByFTS(ctx, req.Name, req.Page)
if err != nil {
return nil, err
}
@ -61,7 +61,7 @@ func (a Adapter) CeduladosByFTS(ctx context.Context, req *cedulados.QueryByFTSRe
}
func (a Adapter) CeduladosByNameAndLocation(ctx context.Context, req *cedulados.QueryByNamesLocationRequest) (*cedulados.QueryMultipleResponse, error) {
cL, err := a.api.ByNameAndLocation(ctx, req.Name, req.Apellido_1, req.Apellido_2, req.Municipio, req.Page)
cL, err := a.api.CeduladosByNameAndLocation(ctx, req.Name, req.Apellido_1, req.Apellido_2, req.Municipio, req.Page)
if err != nil {
return nil, err
}

View File

@ -26,22 +26,22 @@ func NewApplication(infoDB, fotoDB ports.DBPorts) *Application {
// ByCedula
// Query db with a cedula complete info
func (a Application) ByCedula(ctx context.Context, cedula *domain.Cedula) (*domain.Cedulado, error) {
func (a Application) CeduladosByCedula( ctx context.Context, cedula *domain.Cedula) (*domain.Cedulado, error) {
return a.infoDB.ByCedula(ctx, cedula)
}
// GetByNameLastName
// Query db by name, lastname
func (a Application) GetByNameLastName(ctx context.Context, nombre, apellido1, apellido2 string, page int64) (*domain.MultipleResults, error) {
func (a Application) CeduladosGetByNameLastName(ctx context.Context, nombre, apellido1, apellido2 string, page int64) (*domain.MultipleResults, error) {
return a.infoDB.GetByNameLastName(ctx, nombre, apellido1, apellido2, page)
}
// GetByFTS
// make a full text search
func (a Application) GetByFTS(ctx context.Context, parametros string, page int64) (*domain.MultipleResults, error) {
func (a Application) CeduladosByFTS(ctx context.Context, parametros string, page int64) (*domain.MultipleResults, error) {
return a.infoDB.GetByFTS(ctx, parametros, page)
}
// ByNameAndLocation
// search coincidents names in a location
func (a Application) ByNameAndLocation(ctx context.Context, nombre, apellido1, apellido2, municipio string, page int64) (*domain.MultipleResults, error) {
func (a Application) CeduladosByNameAndLocation(ctx context.Context, nombre, apellido1, apellido2, municipio string, page int64) (*domain.MultipleResults, error) {
return a.infoDB.ByNameAndLocation(ctx, nombre, apellido1, apellido2, municipio, page)
}
// QueryFotoByCedula

View File

@ -7,10 +7,10 @@ import (
)
type APIPorts interface {
ByCedula(ctx context.Context, cedula *domain.Cedula) (*domain.Cedulado, error)
GetByNameLastName(ctx context.Context, nombre, apellido1, apellido2 string, page int64) (*domain.MultipleResults, error)
GetByFTS(ctx context.Context, parametros string, page int64) (*domain.MultipleResults, error)
ByNameAndLocation(ctx context.Context, nombre, apellido1, apellido2, municipio string, page int64) (*domain.MultipleResults, error)
CeduladosByCedula(ctx context.Context, cedula *domain.Cedula) (*domain.Cedulado, error)
CeduladosGetByNameLastName(ctx context.Context, nombre, apellido1, apellido2 string, page int64) (*domain.MultipleResults, error)
CeduladosGetByFTS(ctx context.Context, parametros string, page int64) (*domain.MultipleResults, error)
CeduladosByNameAndLocation(ctx context.Context, nombre, apellido1, apellido2, municipio string, page int64) (*domain.MultipleResults, error)
QueryFotoByCedula(ctx context.Context, cedula *domain.Cedula) (*domain.Foto, error)
QueryFotoById(ctx context.Context, id int64) (*domain.Foto, error)
QueryAllCedulas(ctx context.Context, cedulas []*domain.Cedula) ([]*domain.Foto, error)