Compare commits
No commits in common. "master" and "v0.0.1" have entirely different histories.
@ -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.CeduladosByCedula(ctx, cedula)
|
||||
c, err := a.api.ByCedula(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.CeduladosByNameLastName(ctx, req.Name, req.Apellido_1, req.Apellido_2, req.Page)
|
||||
cL, err := a.api.GetByNameLastName(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.CeduladosByFTS(ctx, req.Name, req.Page)
|
||||
cL, err := a.api.GetByFTS(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.CeduladosByNameAndLocation(ctx, req.Name, req.Apellido_1, req.Apellido_2, req.Municipio, req.Page)
|
||||
cL, err := a.api.ByNameAndLocation(ctx, req.Name, req.Apellido_1, req.Apellido_2, req.Municipio, req.Page)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@ -26,22 +26,22 @@ func NewApplication(infoDB, fotoDB ports.DBPorts) *Application {
|
||||
|
||||
// ByCedula
|
||||
// Query db with a cedula complete info
|
||||
func (a Application) CeduladosByCedula( ctx context.Context, cedula *domain.Cedula) (*domain.Cedulado, error) {
|
||||
func (a Application) ByCedula(ctx context.Context, cedula *domain.Cedula) (*domain.Cedulado, error) {
|
||||
return a.infoDB.ByCedula(ctx, cedula)
|
||||
}
|
||||
// GetByNameLastName
|
||||
// Query db by name, lastname
|
||||
func (a Application) CeduladosByNameLastName(ctx context.Context, nombre, apellido1, apellido2 string, page int64) (*domain.MultipleResults, error) {
|
||||
func (a Application) GetByNameLastName(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) CeduladosByFTS(ctx context.Context, parametros string, page int64) (*domain.MultipleResults, error) {
|
||||
func (a Application) GetByFTS(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) CeduladosByNameAndLocation(ctx context.Context, nombre, apellido1, apellido2, municipio string, page int64) (*domain.MultipleResults, error) {
|
||||
func (a Application) ByNameAndLocation(ctx context.Context, nombre, apellido1, apellido2, municipio string, page int64) (*domain.MultipleResults, error) {
|
||||
return a.infoDB.ByNameAndLocation(ctx, nombre, apellido1, apellido2, municipio, page)
|
||||
}
|
||||
// QueryFotoByCedula
|
||||
|
||||
@ -7,10 +7,10 @@ import (
|
||||
)
|
||||
|
||||
type APIPorts interface {
|
||||
CeduladosByCedula(ctx context.Context, cedula *domain.Cedula) (*domain.Cedulado, error)
|
||||
CeduladosByNameLastName(ctx context.Context, nombre, apellido1, apellido2 string, page int64) (*domain.MultipleResults, error)
|
||||
CeduladosByFTS(ctx context.Context, parametros string, page int64) (*domain.MultipleResults, error)
|
||||
CeduladosByNameAndLocation(ctx context.Context, nombre, apellido1, apellido2, municipio string, page int64) (*domain.MultipleResults, error)
|
||||
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)
|
||||
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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user