ARMONIZE names
This commit is contained in:
parent
7a9cf2ce58
commit
caf32678b5
@ -14,7 +14,7 @@ func (a Adapter) CeduladosByCedula(ctx context.Context, req *cedulados.QueryByCe
|
|||||||
SeqCed: req.Cedula.SeqCed,
|
SeqCed: req.Cedula.SeqCed,
|
||||||
VerCed: req.Cedula.VerCed,
|
VerCed: req.Cedula.VerCed,
|
||||||
}
|
}
|
||||||
c, err := a.api.ByCedula(ctx, cedula)
|
c, err := a.api.CeduladosByCedula(ctx, cedula)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
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) {
|
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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -43,7 +43,7 @@ func (a Adapter) CeduladosGetByNameLastName(ctx context.Context, req *cedulados.
|
|||||||
return list, nil
|
return list, nil
|
||||||
}
|
}
|
||||||
func (a Adapter) CeduladosByFTS(ctx context.Context, req *cedulados.QueryByFTSRequest) (*cedulados.QueryMultipleResponse, error) {
|
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 {
|
if err != nil {
|
||||||
return nil, err
|
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) {
|
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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,22 +26,22 @@ func NewApplication(infoDB, fotoDB ports.DBPorts) *Application {
|
|||||||
|
|
||||||
// ByCedula
|
// ByCedula
|
||||||
// Query db with a cedula complete info
|
// 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)
|
return a.infoDB.ByCedula(ctx, cedula)
|
||||||
}
|
}
|
||||||
// GetByNameLastName
|
// GetByNameLastName
|
||||||
// Query db by name, lastname
|
// 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)
|
return a.infoDB.GetByNameLastName(ctx, nombre, apellido1, apellido2, page)
|
||||||
}
|
}
|
||||||
// GetByFTS
|
// GetByFTS
|
||||||
// make a full text search
|
// 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)
|
return a.infoDB.GetByFTS(ctx, parametros, page)
|
||||||
}
|
}
|
||||||
// ByNameAndLocation
|
// ByNameAndLocation
|
||||||
// search coincidents names in a location
|
// 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)
|
return a.infoDB.ByNameAndLocation(ctx, nombre, apellido1, apellido2, municipio, page)
|
||||||
}
|
}
|
||||||
// QueryFotoByCedula
|
// QueryFotoByCedula
|
||||||
|
|||||||
@ -7,10 +7,10 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type APIPorts interface {
|
type APIPorts interface {
|
||||||
ByCedula(ctx context.Context, cedula *domain.Cedula) (*domain.Cedulado, error)
|
CeduladosByCedula(ctx context.Context, cedula *domain.Cedula) (*domain.Cedulado, error)
|
||||||
GetByNameLastName(ctx context.Context, nombre, apellido1, apellido2 string, page int64) (*domain.MultipleResults, error)
|
CeduladosGetByNameLastName(ctx context.Context, nombre, apellido1, apellido2 string, page int64) (*domain.MultipleResults, error)
|
||||||
GetByFTS(ctx context.Context, parametros string, page int64) (*domain.MultipleResults, error)
|
CeduladosGetByFTS(ctx context.Context, parametros string, page int64) (*domain.MultipleResults, error)
|
||||||
ByNameAndLocation(ctx context.Context, nombre, apellido1, apellido2, municipio 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)
|
QueryFotoByCedula(ctx context.Context, cedula *domain.Cedula) (*domain.Foto, error)
|
||||||
QueryFotoById(ctx context.Context, id int64) (*domain.Foto, error)
|
QueryFotoById(ctx context.Context, id int64) (*domain.Foto, error)
|
||||||
QueryAllCedulas(ctx context.Context, cedulas []*domain.Cedula) ([]*domain.Foto, error)
|
QueryAllCedulas(ctx context.Context, cedulas []*domain.Cedula) ([]*domain.Foto, error)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user