| 1 |
package element |
| 2 |
|
| 3 |
import "github.com/mitch000001/go-hbci/domain" |
| 4 |
|
| 5 |
// NewCommunicationParameter returns a new CommunicationParameterDataElement |
| 6 |
func NewCommunicationParameter(params domain.CommunicationParameter) *CommunicationParameterDataElement { |
| 7 |
c := &CommunicationParameterDataElement{ |
| 8 |
Protocol: NewNumber(params.Protocol, 2), |
| 9 |
Address: NewAlphaNumeric(params.Address, 512), |
| 10 |
AddressAddition: NewAlphaNumeric(params.AddressAddition, 512), |
| 11 |
FilterFunction: NewAlphaNumeric(params.FilterFunction, 3), |
| 12 |
FilterFunctionVersion: NewNumber(params.FilterFunctionVersion, 3), |
| 13 |
} |
| 14 |
c.DataElement = NewDataElementGroup(communicationParameterDEG, 5, c) |
| 15 |
return c |
| 16 |
} |
| 17 |
|
| 18 |
// CommunicationParameterDataElement represents the supported way of |
| 19 |
// communicating with a HBCI server. |
| 20 |
type CommunicationParameterDataElement struct { |
| 21 |
DataElement |
| 22 |
// Code | Zugang | Protokollstack |
| 23 |
// --------------------------------------------------- |
| 24 |
// 1 | T-Online | ETSI 300 072 (CEPT), EHKP, BtxFIF |
| 25 |
// 2 | TCP/IP  | SLIP/PPP |
| 26 |
// 3 | HTTPS | (für PIN/TAN-Verfahren) |
| 27 |
Protocol *NumberDataElement |
| 28 |
// Zugang  | Adresse  | Anmerkungen |
| 29 |
// --------------------------------------------------------------------------------------------------- |
| 30 |
// T-Online | Gateway-Seite | als numerischer Wert (ohne die Steuerzeichen * und #) einzustellen. |
| 31 |
// TCP/IP | IP-Adresse  | als alphanumerischer Wert (z.B. ‘123.123.123.123’) |
| 32 |
// HTTPS | Adresse | als alphanumerischer Wert (z.B. ‚https://www.xyz.de:7000/PinTanServlet‘) |
| 33 |
Address *AlphaNumericDataElement |
| 34 |
// Zugang  | Adressenzusatz | Anmerkungen |
| 35 |
// ---------------------------------------------------------------------------------- |
| 36 |
// T-Online | Regionalbereich | Für ein bundesweites Angebot ist ‘00’ ein- zustellen’ |
| 37 |
// TCP/IP  | nicht belegt | |
| 38 |
// HTTPS  | nicht belegt | |
| 39 |
AddressAddition *AlphaNumericDataElement |
| 40 |
// Code | Bedeutung  |
| 41 |
// ------------------------ |
| 42 |
// MIM | MIME Base 64 |
| 43 |
// UUE | Uuencode/Uudecode |
| 44 |
FilterFunction *AlphaNumericDataElement |
| 45 |
FilterFunctionVersion *NumberDataElement |
| 46 |
} |
| 47 |
|
| 48 |
// GroupDataElements returns the grouped DataElements |
| 49 |
func (c *CommunicationParameterDataElement) GroupDataElements() []DataElement { |
| 50 |
return []DataElement{ |
| 51 |
c.Protocol, |
| 52 |
c.Address, |
| 53 |
c.AddressAddition, |
| 54 |
c.FilterFunction, |
| 55 |
c.FilterFunctionVersion, |
| 56 |
} |
| 57 |
} |