package libebics import ( "encoding/xml" "time" ) type H005UnsecuredRequest struct { XMLName xml.Name `xml:"ebicsUnsecuredRequest"` Xmlns string `xml:"xmlns,attr"` Version string `xml:"Version,attr"` Revision string `xml:"Revision,attr"` Header H005UnsecuredRequestHeader `xml:"header"` Body H005UnsecuredRequestBody `xml:"body"` } type H005UnsecuredRequestHeader struct { XMLName xml.Name `xml:"header"` Authenticate bool `xml:"authenticate,attr"` Static H005UnsecuredRequestStaticHeaderType `xml:"static"` Mutable H005EmptyMutableHeaderType `xml:"mutable"` } type H005UnsecuredRequestStaticHeaderType struct { XMLName xml.Name `xml:"static"` HostID string `xml:"HostID"` PartnerID string `xml:"PartnerID"` UserID string `xml:"UserID"` Product H005ProductElementType `xml:"Product"` OrderDetails H005UnsecuredReqOrderDetailsType `xml:"OrderDetails"` SecurityMedium string `xml:"SecurityMedium"` } type H005ProductElementType struct { XMLName xml.Name `xml:"Product"` Language string `xml:"Language,attr"` Name string `xml:",chardata"` } type H005UnsecuredReqOrderDetailsType struct { XMLName xml.Name `xml:"OrderDetails"` AdminOrderType string `xml:"AdminOrderType"` } type H005EmptyMutableHeaderType struct { XMLName xml.Name `xml:"mutable"` } type H005UnsecuredRequestBody struct { XMLName xml.Name `xml:"body"` DataTransfer H005UnsecuredRequestDataTransfer `xml:"DataTransfer"` } type H005UnsecuredRequestDataTransfer struct { XMLName xml.Name `xml:"DataTransfer"` OrderData string `xml:"OrderData"` // TODO Properly marshal this } type H005HIARequestOrderDataType struct { XMLName xml.Name `xml:"HIARequestOrderData"` Xmlns string `xml:"xmlns,attr"` Esig string `xml:"xmlns:esig,attr"` Ds string `xml:"xmlns:ds,attr"` AuthenticationPubKeyInfo H005AuthenticationPubKeyInfo `xml:"AuthenticationPubKeyInfo"` EncryptionPubKeyInfo H005EncryptionPubKeyInfo `xml:"EncryptionPubKeyInfo"` PartnerID string `xml:"PartnerID"` UserID string `xml:"UserID"` } type H005AuthenticationPubKeyInfo struct { XMLName xml.Name `xml:"AuthenticationPubKeyInfo"` X509Data DSIGX509Data `xml:"ds:X509Data"` AuthenticationVersion EbicsCertificateType `xml:"AuthenticationVersion"` } type H005EncryptionPubKeyInfo struct { XMLName xml.Name `xml:"EncryptionPubKeyInfo"` X509Data DSIGX509Data `xml:"ds:X509Data"` EncryptionVersion EbicsCertificateType `xml:"EncryptionVersion"` } type H005NoPubKeyDigestsRequest struct { XMLName xml.Name `xml:"ebicsNoPubKeyDigestsRequest"` Xmlns string `xml:"xmlns,attr"` Ds string `xml:"xmlns:ds,attr"` Version string `xml:"Version,attr"` Revision string `xml:"Revision,attr"` Header H005NoPubKeyDigestsRequestHeader `xml:"header"` AuthSignature DSIGSignatureType `xml:"AuthSignature"` // TODO Base64 marshalling Body H005NoPubKeyDigestsRequestBody `xml:"body"` // TODO Cannot be correct } type H005NoPubKeyDigestsRequestHeader struct { XMLName xml.Name `xml:"header"` Authenticate bool `xml:"authenticate,attr"` Static H005NoPubKeyDigestsRequestStaticHeaderType `xml:"static"` Mutable H005EmptyMutableHeaderType `xml:"mutable"` } type H005NoPubKeyDigestsRequestStaticHeaderType struct { XMLName xml.Name `xml:"static"` HostID string `xml:"HostID"` Nonce string `xml:"Nonce"` Timestamp time.Time `xml:"Timestamp"` PartnerID string `xml:"PartnerID"` UserID string `xml:"UserID"` Product H005ProductElementType `xml:"Product"` OrderDetails H005NoPubKeyDigestsReqOrderDetailsType `xml:"OrderDetails"` SecurityMedium string `xml:"SecurityMedium"` } type H005NoPubKeyDigestsReqOrderDetailsType struct { XMLName xml.Name `xml:"OrderDetails"` AdminOrderType string `xml:"AdminOrderType"` } type H005NoPubKeyDigestsRequestBody struct { XMLName xml.Name `xml:"body"` }