File: data_element_type.go

package info (click to toggle)
golang-github-mitch000001-go-hbci 0.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,468 kB
  • sloc: java: 1,092; makefile: 5
file content (129 lines) | stat: -rw-r--r-- 3,847 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
package element

import "fmt"

// A DataElementType represents the type of a DataElement
type DataElementType int

const (
	// DataElements

	alphaNumericDE DataElementType = iota + 1
	textDE
	numberDE
	digitDE
	floatDE
	dtausCharsetDE
	binaryDE

	// Derived types

	booleanDE
	codeDE
	dateDE
	virtualDateDE
	timeDE
	identificationDE
	countryCodeDE
	currencyDE
	valueDE

	// Multiple used element

	amountGDEG
	bankIdentificationGDEG
	accountConnectionGDEG
	internationalAccountConnectionGDEG
	balanceGDEG
	addressGDEG
	securityMethodVersionGDEG
	acknowlegdementParamsGDEG
	pinTanBusinessTransactionParameterGDEG

	// DataElementGroups

	segmentHeaderDEG
	referenceMessageDEG
	acknowledgementDEG
	securityIdentificationDEG
	securityDateDEG
	hashAlgorithmDEG
	signatureAlgorithmDEG
	encryptionAlgorithmDEG
	keyNameDEG
	certificateDEG
	publicKeyDEG
	supportedLanguagesDEG
	supportedHBCIVersionDEG
	communicationParameterDEG
	supportedSecurityMethodDEG
	pinTanDEG
	accountLimitDEG
	allowedBusinessTransactionDEG
	disposalEligiblePersonDEG
	securityProfileDEG
	tan2StepSubmissionParameterDEG
	tan2StepSubmissionProcessParameterDEG
	pinTanSpecificParamDataElementDEG
)

var typeName = map[DataElementType]string{
	alphaNumericDE: "an",
	textDE:         "txt",
	numberDE:       "num",
	digitDE:        "dig",
	floatDE:        "float",
	dtausCharsetDE: "dta",
	binaryDE:       "bin",
	// Derived types
	booleanDE:        "jn",
	codeDE:           "code",
	dateDE:           "dat",
	virtualDateDE:    "vdat",
	timeDE:           "tim",
	identificationDE: "id",
	countryCodeDE:    "ctr",
	currencyDE:       "cur",
	valueDE:          "wrt",
	// Multiple used elements or GroupDataElementGroups
	amountGDEG:                             "btg",
	bankIdentificationGDEG:                 "kik",
	accountConnectionGDEG:                  "ktv",
	internationalAccountConnectionGDEG:     "kti",
	balanceGDEG:                            "sdo",
	addressGDEG:                            "addr",
	securityMethodVersionGDEG:              "Unterstützte Sicherheitsverfahren",
	acknowlegdementParamsGDEG:              "Rückmeldungsparameter",
	pinTanBusinessTransactionParameterGDEG: "Geschäftsvorfallspezifische PIN-TAN-Informationen",
	// DataElementGroups
	segmentHeaderDEG:                      "Segmentkopf",
	referenceMessageDEG:                   "Bezugsnachricht",
	acknowledgementDEG:                    "Rückmeldung",
	securityIdentificationDEG:             "Sicherheitsidentifikation, Details",
	securityDateDEG:                       "Sicherheitsdatum und -uhrzeit",
	hashAlgorithmDEG:                      "Hashalgorithmus",
	signatureAlgorithmDEG:                 "Signaturalgorithmus",
	encryptionAlgorithmDEG:                "Verschlüsselungsalgorithmus",
	keyNameDEG:                            "Schlüsselname",
	certificateDEG:                        "Zertifikat",
	publicKeyDEG:                          "Öffentlicher Schlüssel",
	supportedLanguagesDEG:                 "Unterstützte Sprachen",
	supportedHBCIVersionDEG:               "Unterstützte HBCI-Versionen",
	communicationParameterDEG:             "Kommunikationsparameter",
	pinTanDEG:                             "PIN-TAN",
	accountLimitDEG:                       "Kontolimit",
	allowedBusinessTransactionDEG:         "Erlaubte Geschäftsvorfälle",
	disposalEligiblePersonDEG:             "Verfügungsberechtigte",
	securityProfileDEG:                    "Sicherheitsprofil",
	tan2StepSubmissionParameterDEG:        "Parameter Zwei-Schritt-TAN-Einreichung",
	tan2StepSubmissionProcessParameterDEG: "Verfahrensparameter Zwei-Schritt-Verfahren",
	pinTanSpecificParamDataElementDEG:     "Parameter PIN/TAN-spezifische Informationen",
}

func (d DataElementType) String() string {
	s := typeName[d]
	if s == "" {
		return fmt.Sprintf("DataElementType%d", int(d))
	}
	return s
}