feat: add missing xml tags
This commit is contained in:
parent
4075a2c39b
commit
ae76938f48
|
@ -11,14 +11,18 @@ import (
|
|||
"gitea.urkob.com/urko/ess-etl-go/internal/api/http"
|
||||
"gitea.urkob.com/urko/ess-etl-go/internal/services"
|
||||
"gitea.urkob.com/urko/ess-etl-go/pkg/adapter/repository/mongodb/employee_wi"
|
||||
"gitea.urkob.com/urko/ess-etl-go/pkg/crono"
|
||||
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/mongo/options"
|
||||
)
|
||||
|
||||
func main() {
|
||||
cr := crono.New()
|
||||
defer cr.Table()
|
||||
cfg := config.NewConfig(".env")
|
||||
ctx := context.Background()
|
||||
ctx, cancel := context.WithCancel(signalContext(context.Background()))
|
||||
defer cancel()
|
||||
|
||||
dbOpts := options.Client()
|
||||
dbOpts.ApplyURI(cfg.DbAddress)
|
||||
|
@ -41,12 +45,16 @@ func main() {
|
|||
NewRestServer(cfg).
|
||||
WithProfessionalHandler(services.NewEmployeeWIService(ctx, professionalRepo))
|
||||
|
||||
cr.MarkAndRestart("dependencies loaded")
|
||||
go func() {
|
||||
cr.Restart()
|
||||
if err = restServer.Start(cfg.ApiPort, ""); err != nil {
|
||||
log.Fatalln("restServer.Start", err)
|
||||
cancel()
|
||||
}
|
||||
cr.MarkAndRestart("server up")
|
||||
}()
|
||||
|
||||
ctx, cancel := context.WithCancel(signalContext(context.Background()))
|
||||
defer cancel()
|
||||
<-ctx.Done()
|
||||
restServer.Shutdown()
|
||||
log.Println("gracefully shutdown")
|
||||
|
|
|
@ -38,8 +38,8 @@ type EmployeeWorkInformation struct {
|
|||
EmployeeNumber int `xml:"EmployeeNumber" json:"employee_number" bson:"employee_number"`
|
||||
Date string `xml:"Date" json:"date"`
|
||||
WorkInformation WorkInfo `xml:"WorkInformation" json:"work_information" bson:"work_information"`
|
||||
Baselines []Baseline `json:"baselines" bson:"baselines"`
|
||||
CustomFields []CustomField `json:"custom_fields" bson:"custom_fields"`
|
||||
Baselines []Baseline `xml:"Baselines>Baseline" json:"baselines" bson:"baselines"`
|
||||
CustomFields []CustomField `xml:"CustomFields>CustomField" json:"custom_fields" bson:"custom_fields"`
|
||||
}
|
||||
|
||||
type ArrayOfEmployeeWorkInformation struct {
|
||||
|
|
Loading…
Reference in New Issue