Preliminary parse error handling

This commit is contained in:
Simon Martens
2024-11-10 23:44:30 +01:00
parent 1adb7122e3
commit 398ef04c3e
4 changed files with 58 additions and 94 deletions

View File

@@ -33,6 +33,7 @@ type Config struct {
WebHookEndpoint string `json:"webhook_endpoint" envconfig:"WEBHOOK_ENDPOINT"`
WebHookSecret string `json:"webhook_secret" envconfig:"WEBHOOK_SECRET"`
Debug bool `json:"debug" envconfig:"DEBUG"`
LogData bool `json:"log_data" envconfig:"LOG_DATA"`
}
func NewConfigProvider(files []string) *ConfigProvider {

View File

@@ -31,16 +31,6 @@ type IssueNumber struct {
Corrected string `xml:"korrigiert,attr"`
}
type KGPZDate struct {
XMLName xml.Name `xml:"datum"`
When string `xml:"when,attr"`
NotBefore string `xml:"notBefore,attr"`
NotAfter string `xml:"notAfter,attr"`
From string `xml:"from,attr"`
To string `xml:"to,attr"`
Value
}
type Additional struct {
XMLName xml.Name `xml:"beilage"`
Nummer string `xml:"nummer,attr"`

View File

@@ -2,6 +2,16 @@ package providers
import "encoding/xml"
type KGPZDate struct {
XMLName xml.Name `xml:"datum"`
When string `xml:"when,attr"`
NotBefore string `xml:"notBefore,attr"`
NotAfter string `xml:"notAfter,attr"`
From string `xml:"from,attr"`
To string `xml:"to,attr"`
Value
}
type AgentRef struct {
XMLName xml.Name `xml:"akteur"`
Reference