element

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2018 License: Apache-2.0 Imports: 12 Imported by: 10

Documentation

Index

Constants

View Source
const (
	AcknowledgementAdditionalInformation     = 3040
	AcknowledgementSupportedSecurityFunction = 3920
)

These represent HBCI acknowledgement codes. Codes starting with 3 are meant to be warnings.

View Source
const (
	// SecurityHolderMessageSender represents the MessageSender as security holder
	SecurityHolderMessageSender = "MS"
	// SecurityHolderMessageReceiver represents the MessageReceiver as security holder
	SecurityHolderMessageReceiver = "MR"
)
View Source
const (
	// SecurityTimestamp defines the type of the SecurityDate
	SecurityTimestamp = "STS"
	// CertificateRevocationTime defines the type of the SecurityDate
	CertificateRevocationTime = "CRT"
)

Variables

This section is empty.

Functions

func ExtractElements

func ExtractElements(dataElementGroup []byte) ([][]byte, error)

ExtractElements extracts DataElements from a DataElementGroup

Types

type AccountConnectionDataElement

type AccountConnectionDataElement struct {
	DataElement
	AccountID                 *IdentificationDataElement
	SubAccountCharacteristics *IdentificationDataElement
	CountryCode               *CountryCodeDataElement
	BankID                    *AlphaNumericDataElement
}

AccountConnectionDataElement represents a bank account

func NewAccountConnection

func NewAccountConnection(conn domain.AccountConnection) *AccountConnectionDataElement

NewAccountConnection returns a new AccountConnectionDataElement

func (*AccountConnectionDataElement) Elements

func (a *AccountConnectionDataElement) Elements() []DataElement

Elements returns all child elements of a

func (*AccountConnectionDataElement) UnmarshalHBCI

func (a *AccountConnectionDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into a

func (*AccountConnectionDataElement) Val

Val returns the value of a as domain.AccountConnection

type AccountLimitDataElement

type AccountLimitDataElement struct {
	DataElement
	// Code | Beschreibung
	// --------------------------
	// E	| Einzelauftragslimit
	// T	| Tageslimit
	// W	| Wochenlimit
	// M	| Monatslimit
	// Z 	| Zeitlimit
	Kind   *AlphaNumericDataElement
	Amount *AmountDataElement
	Days   *NumberDataElement
}

AccountLimitDataElement defines an Account Limit

func NewAccountLimit

func NewAccountLimit(kind string, amount float64, currency string, days int) *AccountLimitDataElement

NewAccountLimit creates a new Account limit

func (*AccountLimitDataElement) GroupDataElements

func (a *AccountLimitDataElement) GroupDataElements() []DataElement

GroupDataElements returns the grouped DataElements

func (*AccountLimitDataElement) Val

Val returns the limit as domain.AccountLimit

type AcknowledgementDataElement

type AcknowledgementDataElement struct {
	DataElement
	Code                 *DigitDataElement
	ReferenceDataElement *AlphaNumericDataElement
	Text                 *AlphaNumericDataElement
	Params               *ParamsDataElement
	// contains filtered or unexported fields
}

An AcknowledgementDataElement defines a group of DataElements used to transmit information from the bank institute to the client.

func NewAcknowledgement

func NewAcknowledgement(acknowledgement domain.Acknowledgement) *AcknowledgementDataElement

NewAcknowledgement returns a new acknowledgement DataElement

func (*AcknowledgementDataElement) GroupDataElements

func (a *AcknowledgementDataElement) GroupDataElements() []DataElement

GroupDataElements returns all grouped elements within the acknowledgment.

func (*AcknowledgementDataElement) IsValid

func (a *AcknowledgementDataElement) IsValid() bool

IsValid returns true if the acknowledgment code and text is set and the underlying value is valid.

func (*AcknowledgementDataElement) SetReferencingMessage

func (a *AcknowledgementDataElement) SetReferencingMessage(reference domain.ReferencingMessage)

SetReferencingMessage is used by MessageAcknowledgements to set the reference to the previously sent message. This is needed to identify the message within an ongoing dialog.

func (*AcknowledgementDataElement) SetReferencingSegmentNumber

func (a *AcknowledgementDataElement) SetReferencingSegmentNumber(number int)

SetReferencingSegmentNumber is a setter for setting the Segment number this Acknowledgement is referring to.

func (*AcknowledgementDataElement) SetType

func (a *AcknowledgementDataElement) SetType(acknowledgementType string)

SetType sets the type of the Acknowledgement. There are only two types of Acknowledgements, message related ones and segment related ones.

See domain.MessageAcknowledgements or domain.SegmentAcknowledgement for details on semantics.

func (*AcknowledgementDataElement) UnmarshalHBCI

func (a *AcknowledgementDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals the value into an acknowledgment.

func (*AcknowledgementDataElement) Val

Val returns the underlying value of the acknowledgement.

type AddressDataElement

AddressDataElement represents an address

func NewAddress

func NewAddress(address domain.Address) *AddressDataElement

NewAddress creates a new AddressDataElement from address

func (*AddressDataElement) Address

func (a *AddressDataElement) Address() domain.Address

Address returns the address as a domain.Address

func (*AddressDataElement) Elements

func (a *AddressDataElement) Elements() []DataElement

Elements returns all child elements of a

type AllowedBusinessTransactionDataElement

type AllowedBusinessTransactionDataElement struct {
	DataElement
	BusinessTransactionID *AlphaNumericDataElement
	NeededSignatures      *NumberDataElement
	// Code | Beschreibung
	// --------------------------
	// E	| Einzelauftragslimit
	// T	| Tageslimit
	// W	| Wochenlimit
	// M	| Monatslimit
	// Z 	| Zeitlimit
	Kind   *AlphaNumericDataElement
	Amount *AmountDataElement
	Days   *NumberDataElement
}

AllowedBusinessTransactionDataElement represents an allowed business transaction for a bank institute

func NewAllowedBusinessTransaction

func NewAllowedBusinessTransaction(businessTransaction domain.BusinessTransaction) *AllowedBusinessTransactionDataElement

NewAllowedBusinessTransaction creates a new allowed business transaction

func (*AllowedBusinessTransactionDataElement) GroupDataElements

func (a *AllowedBusinessTransactionDataElement) GroupDataElements() []DataElement

GroupDataElements returns the grouped DataElements

func (*AllowedBusinessTransactionDataElement) UnmarshalHBCI

func (a *AllowedBusinessTransactionDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into a

func (*AllowedBusinessTransactionDataElement) Val

Val returns the allowed business transaction

type AllowedBusinessTransactionsDataElement

type AllowedBusinessTransactionsDataElement struct {
	// contains filtered or unexported fields
}

AllowedBusinessTransactionsDataElement represents allowed business transactions for a bank institute

func NewAllowedBusinessTransactions

func NewAllowedBusinessTransactions(transactions ...domain.BusinessTransaction) *AllowedBusinessTransactionsDataElement

NewAllowedBusinessTransactions creates a new AllowedBusinessTransactionDataElement for the given transactions

func (*AllowedBusinessTransactionsDataElement) AllowedBusinessTransactions

func (a *AllowedBusinessTransactionsDataElement) AllowedBusinessTransactions() []domain.BusinessTransaction

AllowedBusinessTransactions returns all allowed business transactions

func (AllowedBusinessTransactionsDataElement) GroupDataElements

func (a AllowedBusinessTransactionsDataElement) GroupDataElements() []DataElement

GroupDataElements returns the grouped DataElements

func (AllowedBusinessTransactionsDataElement) IsValid

func (a AllowedBusinessTransactionsDataElement) IsValid() bool

func (*AllowedBusinessTransactionsDataElement) UnmarshalHBCI

func (a *AllowedBusinessTransactionsDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into a

type AlphaNumericDataElement

type AlphaNumericDataElement struct {
	// contains filtered or unexported fields
}

An AlphaNumericDataElement represents a DataElement which contains alphanumeric characters

func NewAlphaNumeric

func NewAlphaNumeric(val string, maxLength int) *AlphaNumericDataElement

NewAlphaNumeric returns a new AlphaNumeric DataElement

func (*AlphaNumericDataElement) IsValid

func (a *AlphaNumericDataElement) IsValid() bool

IsValid returns false if a contains '\n' and '\r', true otherwise

func (AlphaNumericDataElement) Length

func (d AlphaNumericDataElement) Length() int

func (*AlphaNumericDataElement) MarshalHBCI

func (a *AlphaNumericDataElement) MarshalHBCI() ([]byte, error)

MarshalHBCI marshals a into a byte representation ready to be sent over the wire.

func (AlphaNumericDataElement) Optional

func (d AlphaNumericDataElement) Optional() bool

func (AlphaNumericDataElement) SetOptional

func (d AlphaNumericDataElement) SetOptional()

func (*AlphaNumericDataElement) String

func (a *AlphaNumericDataElement) String() string

func (AlphaNumericDataElement) Type

func (d AlphaNumericDataElement) Type() DataElementType

func (*AlphaNumericDataElement) UnmarshalHBCI

func (a *AlphaNumericDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals the given bytes into a

func (*AlphaNumericDataElement) Val

Val returns the data as string

func (AlphaNumericDataElement) Value

func (d AlphaNumericDataElement) Value() interface{}

Value returns the underlying value

type AmountDataElement

type AmountDataElement struct {
	DataElement
	Amount   *ValueDataElement
	Currency *CurrencyDataElement
}

An AmountDataElement represents a value with a currency

func NewAmount

func NewAmount(value float64, currency string) *AmountDataElement

NewAmount returns a new AmountDataElement

func (*AmountDataElement) Elements

func (a *AmountDataElement) Elements() []DataElement

Elements returns the child elements of the group

func (*AmountDataElement) UnmarshalHBCI

func (a *AmountDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into a

func (*AmountDataElement) Val

func (a *AmountDataElement) Val() domain.Amount

Val returns the value of a as a domain.Amount

type BalanceDataElement

type BalanceDataElement struct {
	DataElement
	DebitCreditIndicator *AlphaNumericDataElement
	Amount               *ValueDataElement
	Currency             *CurrencyDataElement
	TransmissionDate     *DateDataElement
	TransmissionTime     *TimeDataElement
}

A BalanceDataElement represents an account balance to a given date

func NewBalance

func NewBalance(amount domain.Amount, date time.Time, withTime bool) *BalanceDataElement

NewBalance returns a new BalanceDataElement

func (*BalanceDataElement) Balance

func (b *BalanceDataElement) Balance() domain.Balance

Balance returns the balance as domain.Balance

func (*BalanceDataElement) Date

func (b *BalanceDataElement) Date() time.Time

Date returns the transmission date of the balance

func (*BalanceDataElement) Elements

func (b *BalanceDataElement) Elements() []DataElement

Elements returns all child elements of b

func (*BalanceDataElement) UnmarshalHBCI

func (b *BalanceDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into b

type BankIdentificationDataElement

type BankIdentificationDataElement struct {
	DataElement
	CountryCode *CountryCodeDataElement
	BankID      *AlphaNumericDataElement
}

A BankIdentificationDataElement represents the identification for a bank institute

func NewBankIdentification

func NewBankIdentification(bankID domain.BankID) *BankIdentificationDataElement

NewBankIdentification returns a new BankIndentificationDataElement

func (*BankIdentificationDataElement) Elements

Elements returns all child elements of b

func (*BankIdentificationDataElement) UnmarshalHBCI

func (b *BankIdentificationDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into b

func (*BankIdentificationDataElement) Val

Val returns the value of b as domain.BankID

type BinaryDataElement

type BinaryDataElement struct {
	// contains filtered or unexported fields
}

A BinaryDataElement embodies binary data into a DataElement

func NewBinary

func NewBinary(data []byte, maxLength int) *BinaryDataElement

NewBinary returns a new BinaryDataElement

func (BinaryDataElement) IsValid

func (d BinaryDataElement) IsValid() bool

func (BinaryDataElement) Length

func (d BinaryDataElement) Length() int

func (*BinaryDataElement) MarshalHBCI

func (b *BinaryDataElement) MarshalHBCI() ([]byte, error)

MarshalHBCI marshals b into HBCI wire format

func (BinaryDataElement) Optional

func (d BinaryDataElement) Optional() bool

func (BinaryDataElement) SetOptional

func (d BinaryDataElement) SetOptional()

func (*BinaryDataElement) String

func (b *BinaryDataElement) String() string

func (BinaryDataElement) Type

func (d BinaryDataElement) Type() DataElementType

func (*BinaryDataElement) UnmarshalHBCI

func (b *BinaryDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into b

func (*BinaryDataElement) Val

func (b *BinaryDataElement) Val() []byte

Val returns b as []byte

func (BinaryDataElement) Value

func (d BinaryDataElement) Value() interface{}

Value returns the underlying value

type BooleanDataElement

type BooleanDataElement struct {
	// contains filtered or unexported fields
}

A BooleanDataElement represents a boolean in HBCI

func NewBoolean

func NewBoolean(val bool) *BooleanDataElement

NewBoolean returns a new BooleanDataElement

func (BooleanDataElement) IsValid

func (d BooleanDataElement) IsValid() bool

func (BooleanDataElement) Length

func (d BooleanDataElement) Length() int

func (*BooleanDataElement) MarshalHBCI

func (b *BooleanDataElement) MarshalHBCI() ([]byte, error)

MarshalHBCI marshals b into the HBCI wire format

func (BooleanDataElement) Optional

func (d BooleanDataElement) Optional() bool

func (BooleanDataElement) SetOptional

func (d BooleanDataElement) SetOptional()

func (*BooleanDataElement) String

func (b *BooleanDataElement) String() string

func (BooleanDataElement) Type

func (d BooleanDataElement) Type() DataElementType

func (*BooleanDataElement) UnmarshalHBCI

func (b *BooleanDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into b

func (*BooleanDataElement) Val

func (b *BooleanDataElement) Val() bool

Val returns the value of b as bool

func (BooleanDataElement) Value

func (d BooleanDataElement) Value() interface{}

Value returns the underlying value

type BusinessTransactionParameter

type BusinessTransactionParameter struct {
	DataElement
	DataElements []DataElement
}

A BusinessTransactionParameter defines parameters for a specific business transaction.

func (*BusinessTransactionParameter) GroupDataElements

func (b *BusinessTransactionParameter) GroupDataElements() []DataElement

GroupDataElements returns the grouped DataElements.

type CertificateDataElement

type CertificateDataElement struct {
	DataElement
	// "1" for ZKA
	// "2" for UN/EDIFACT
	// "3" for X.509
	CertificateType *NumberDataElement
	Content         *BinaryDataElement
}

CertificateDataElement embodies certificate bytes into a DataElement

func NewCertificate

func NewCertificate(typ int, certificate []byte) *CertificateDataElement

NewCertificate embodies a certificate into a DataElement

func (*CertificateDataElement) GroupDataElements

func (c *CertificateDataElement) GroupDataElements() []DataElement

GroupDataElements returns the grouped DataElements

type CodeDataElement

type CodeDataElement struct {
	*AlphaNumericDataElement
	// contains filtered or unexported fields
}

A CodeDataElement represents a value from a know bounded set of values

func NewCode

func NewCode(val string, maxLength int, validSet []string) *CodeDataElement

NewCode returns a new CodeDataElement

func (*CodeDataElement) IsValid

func (c *CodeDataElement) IsValid() bool

IsValid returns true if the value is in the valid set and the underlying AlphaNumericDataElement is valid, false otherwise.

func (CodeDataElement) Length

func (d CodeDataElement) Length() int

func (CodeDataElement) Optional

func (d CodeDataElement) Optional() bool

func (CodeDataElement) SetOptional

func (d CodeDataElement) SetOptional()

func (*CodeDataElement) Type

func (c *CodeDataElement) Type() DataElementType

Type returns the DataElementType of c

func (*CodeDataElement) UnmarshalHBCI

func (c *CodeDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into a. a will always be invalid, because the valid set is not known when unmarshaling

func (CodeDataElement) Value

func (d CodeDataElement) Value() interface{}

Value returns the underlying value

type CommunicationParameterDataElement

type CommunicationParameterDataElement struct {
	DataElement
	// Code | Zugang   | Protokollstack
	// ---------------------------------------------------
	// 1	| T-Online | ETSI 300 072 (CEPT), EHKP, BtxFIF
	// 2 	| TCP/IP  | SLIP/PPP
	// 3	| HTTPS	   | (für PIN/TAN-Verfahren)
	Protocol *NumberDataElement
	// Zugang  |  Adresse     | Anmerkungen
	// ---------------------------------------------------------------------------------------------------
	// T-Online | Gateway-Seite | als numerischer Wert (ohne die Steuerzeichen * und #) einzustellen.
	// TCP/IP	| IP-Adresse 	| als alphanumerischer Wert (z.B. ‘123.123.123.123’)
	// HTTPS    | Adresse       | als alphanumerischer Wert (z.B. ‚https://www.xyz.de:7000/PinTanServlet‘)
	Address *AlphaNumericDataElement
	// Zugang  | Adressenzusatz | Anmerkungen
	// ----------------------------------------------------------------------------------
	// T-Online | Regionalbereich | Für ein bundesweites Angebot ist ‘00’ ein- zustellen’
	// TCP/IP  | nicht belegt	  |
	// HTTPS   | nicht belegt	  |
	AddressAddition *AlphaNumericDataElement
	// Code | Bedeutung 
	// ------------------------
	// MIM  | MIME Base 64
	// UUE | Uuencode/Uudecode
	FilterFunction        *AlphaNumericDataElement
	FilterFunctionVersion *NumberDataElement
}

CommunicationParameterDataElement represents the supported way of communicating with a HBCI server.

func NewCommunicationParameter

func NewCommunicationParameter(params domain.CommunicationParameter) *CommunicationParameterDataElement

NewCommunicationParameter returns a new CommunicationParameterDataElement

func (*CommunicationParameterDataElement) GroupDataElements

func (c *CommunicationParameterDataElement) GroupDataElements() []DataElement

GroupDataElements returns the grouped DataElements

type CountryCodeDataElement

type CountryCodeDataElement struct {
	*DigitDataElement
}

A CountryCodeDataElement represents a Country code as defined by ISO 3166-1 (numeric code)

func NewCountryCode

func NewCountryCode(code int) *CountryCodeDataElement

NewCountryCode returns a new CountryCodeDataElement

func (CountryCodeDataElement) IsValid

func (d CountryCodeDataElement) IsValid() bool

func (CountryCodeDataElement) Length

func (d CountryCodeDataElement) Length() int

func (CountryCodeDataElement) Optional

func (d CountryCodeDataElement) Optional() bool

func (CountryCodeDataElement) SetOptional

func (d CountryCodeDataElement) SetOptional()

func (*CountryCodeDataElement) Type

Type represents the DataElement Type of c

func (*CountryCodeDataElement) UnmarshalHBCI

func (c *CountryCodeDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into c

func (CountryCodeDataElement) Value

func (d CountryCodeDataElement) Value() interface{}

Value returns the underlying value

type CurrencyDataElement

type CurrencyDataElement struct {
	*AlphaNumericDataElement
}

A CurrencyDataElement represents a currency code as defined by ISO 4217 alpha-3 in upcase letters

func NewCurrency

func NewCurrency(cur string) *CurrencyDataElement

NewCurrency returns a new CurrencyDataElement

func (*CurrencyDataElement) IsValid

func (c *CurrencyDataElement) IsValid() bool

IsValid returns true if the currency format matches ISO 4217 alpha-3

func (CurrencyDataElement) Length

func (d CurrencyDataElement) Length() int

func (CurrencyDataElement) Optional

func (d CurrencyDataElement) Optional() bool

func (CurrencyDataElement) SetOptional

func (d CurrencyDataElement) SetOptional()

func (*CurrencyDataElement) Type

Type returns the DataElementType of c

func (*CurrencyDataElement) UnmarshalHBCI

func (c *CurrencyDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into c

func (CurrencyDataElement) Value

func (d CurrencyDataElement) Value() interface{}

Value returns the underlying value

type CustomSignatureDataElement

type CustomSignatureDataElement struct {
	*PinTanDataElement
}

CustomSignatureDataElement represents a custom signature

func NewCustomSignature

func NewCustomSignature(pin, tan string) *CustomSignatureDataElement

NewCustomSignature returns a new CustomSignatureDataElement for the pin and tan

type DataElement

type DataElement interface {
	// Value returns the underlying value
	Value() interface{}
	// IsValid returns true if the DataElement and all its grouped elements
	// are valid, false otherwise
	IsValid() bool
	Length() int
	String() string
	MarshalHBCI() ([]byte, error)
	UnmarshalHBCI([]byte) error
}

DataElement represent the general interface of a DataElement used by HBCI

func New

func New(typ DataElementType, value interface{}, maxLength int) DataElement

New returns a new DataElement with the provided type, value and maxLengt for validation

func NewDataElementGroup

func NewDataElementGroup(typ DataElementType, elementCount int, group DataElementGroup) DataElement

NewDataElementGroup returns a new DataElement that embodies group

func NewGroupDataElementGroup

func NewGroupDataElementGroup(typ DataElementType, elementCount int, group GroupDataElementGroup) DataElement

NewGroupDataElementGroup returns a new DataElement which embodies group

type DataElementGroup

type DataElementGroup interface {
	DataElement
	// GroupDataElements returns the grouped DataElements
	GroupDataElements() []DataElement
}

DataElementGroup represents a DataElement which consists of subelements that represent a logical group.

type DataElementType

type DataElementType int

A DataElementType represents the type of a DataElement

func (DataElementType) String

func (d DataElementType) String() string

type DateDataElement

type DateDataElement struct {
	// contains filtered or unexported fields
}

A DateDataElement represents a date within HBCI. It does not include a time.

func NewDate

func NewDate(date time.Time) *DateDataElement

NewDate returns a new DateDataElement

func (*DateDataElement) IsValid

func (d *DateDataElement) IsValid() bool

IsValid returns true if the underlying date is not Zero.

func (DateDataElement) Length

func (d DateDataElement) Length() int

func (*DateDataElement) MarshalHBCI

func (d *DateDataElement) MarshalHBCI() ([]byte, error)

MarshalHBCI marshals d into HBCI wire format

func (DateDataElement) Optional

func (d DateDataElement) Optional() bool

func (DateDataElement) SetOptional

func (d DateDataElement) SetOptional()

func (*DateDataElement) String

func (d *DateDataElement) String() string

func (DateDataElement) Type

func (d DateDataElement) Type() DataElementType

func (*DateDataElement) UnmarshalHBCI

func (d *DateDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into d

func (*DateDataElement) Val

func (d *DateDataElement) Val() time.Time

Val returns the value of d as time.Time. The time component of it will always be zero.

func (DateDataElement) Value

func (d DateDataElement) Value() interface{}

Value returns the underlying value

type DigitDataElement

type DigitDataElement struct {
	// contains filtered or unexported fields
}

DigitDataElement represents numbers from 0 to 9 with leading zeros

func NewDigit

func NewDigit(val, maxLength int) *DigitDataElement

NewDigit returns a new DigitDataElement

func (DigitDataElement) IsValid

func (d DigitDataElement) IsValid() bool

func (DigitDataElement) Length

func (d DigitDataElement) Length() int

func (*DigitDataElement) MarshalHBCI

func (d *DigitDataElement) MarshalHBCI() ([]byte, error)

MarshalHBCI marshals d into the HBCI wire format

func (DigitDataElement) Optional

func (d DigitDataElement) Optional() bool

func (DigitDataElement) SetOptional

func (d DigitDataElement) SetOptional()

func (*DigitDataElement) String

func (d *DigitDataElement) String() string

func (DigitDataElement) Type

func (d DigitDataElement) Type() DataElementType

func (*DigitDataElement) UnmarshalHBCI

func (d *DigitDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into d

func (*DigitDataElement) Val

func (d *DigitDataElement) Val() int

Val returns the digit as int

func (DigitDataElement) Value

func (d DigitDataElement) Value() interface{}

Value returns the underlying value

type DisposalEligiblePersonDataElement

type DisposalEligiblePersonDataElement struct {
	DataElement
}

DisposalEligiblePersonDataElement represents a DataElement

type DisposalEligiblePersonsDataElement

type DisposalEligiblePersonsDataElement struct {
	DataElement
}

DisposalEligiblePersonsDataElement represents a DataElement

type DtausCharsetDataElement

type DtausCharsetDataElement struct {
	*BinaryDataElement
}

DtausCharsetDataElement represents binary data in DTAUS charset

func NewDtausCharset

func NewDtausCharset(data []byte, maxLength int) *DtausCharsetDataElement

NewDtausCharset returns a new DtausCharsetDataElement

func (DtausCharsetDataElement) IsValid

func (d DtausCharsetDataElement) IsValid() bool

func (DtausCharsetDataElement) Length

func (d DtausCharsetDataElement) Length() int

func (DtausCharsetDataElement) Optional

func (d DtausCharsetDataElement) Optional() bool

func (DtausCharsetDataElement) SetOptional

func (d DtausCharsetDataElement) SetOptional()

func (DtausCharsetDataElement) Type

func (d DtausCharsetDataElement) Type() DataElementType

func (*DtausCharsetDataElement) UnmarshalHBCI

func (d *DtausCharsetDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into d

func (DtausCharsetDataElement) Value

func (d DtausCharsetDataElement) Value() interface{}

Value returns the underlying value

type EncryptionAlgorithmDataElement

type EncryptionAlgorithmDataElement struct {
	DataElement
	// "2" for OSY, Owner Symmetric
	Usage *AlphaNumericDataElement
	// "2" for CBC, Cipher Block Chaining.
	OperationMode *AlphaNumericDataElement
	// "13" for 2-Key-Triple-DES
	Algorithm *AlphaNumericDataElement
	Key       *BinaryDataElement
	// "5" for KYE, Symmetric key, en-/decryption with a symmetric key (DDV)
	// "6" for KYP, Symmetric key, encryption with a public key (RDH).
	KeyParamID                 *AlphaNumericDataElement
	InitializationValueParamID *AlphaNumericDataElement
	InitializationValue        *BinaryDataElement
}

EncryptionAlgorithmDataElement represents an encryption algorithm

func NewPinTanEncryptionAlgorithm

func NewPinTanEncryptionAlgorithm() *EncryptionAlgorithmDataElement

NewPinTanEncryptionAlgorithm returns an EncryptionAlgorithmDataElement ready to use in pin/tan flow

func NewRDHEncryptionAlgorithm

func NewRDHEncryptionAlgorithm(pubKey []byte) *EncryptionAlgorithmDataElement

NewRDHEncryptionAlgorithm returns an EncryptionAlgorithmDataElement ready to use in CardReader flow

func (*EncryptionAlgorithmDataElement) GroupDataElements

func (e *EncryptionAlgorithmDataElement) GroupDataElements() []DataElement

GroupDataElements returns the grouped DataElements

func (*EncryptionAlgorithmDataElement) UnmarshalHBCI

func (e *EncryptionAlgorithmDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into the DataElement

type FloatDataElement

type FloatDataElement struct {
	// contains filtered or unexported fields
}

FloatDataElement represents a float in HBCI

func NewFloat

func NewFloat(val float64, maxLength int) *FloatDataElement

NewFloat returns a new FloatDataElement

func (FloatDataElement) IsValid

func (d FloatDataElement) IsValid() bool

func (FloatDataElement) Length

func (d FloatDataElement) Length() int

func (*FloatDataElement) MarshalHBCI

func (f *FloatDataElement) MarshalHBCI() ([]byte, error)

MarshalHBCI marshals f into HBCI wire format

func (FloatDataElement) Optional

func (d FloatDataElement) Optional() bool

func (FloatDataElement) SetOptional

func (d FloatDataElement) SetOptional()

func (*FloatDataElement) String

func (f *FloatDataElement) String() string

func (FloatDataElement) Type

func (d FloatDataElement) Type() DataElementType

func (*FloatDataElement) UnmarshalHBCI

func (f *FloatDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into f

func (*FloatDataElement) Val

func (f *FloatDataElement) Val() float64

Val returns the value of f as float64

func (FloatDataElement) Value

func (d FloatDataElement) Value() interface{}

Value returns the underlying value

type GroupDataElementGroup

type GroupDataElementGroup interface {
	Elements() []DataElement
}

GroupDataElementGroup represents a DataElement which is composed by subelements

type GroupExtractor

type GroupExtractor struct {
	// contains filtered or unexported fields
}

An GroupExtractor extracts DataElements from DataElementGroups

func NewElementExtractor

func NewElementExtractor(dataElementGroup []byte) *GroupExtractor

NewElementExtractor creates a new GroupExtractor ready to use

func (*GroupExtractor) Extract

func (e *GroupExtractor) Extract() ([][]byte, error)

Extract extracts DataElements from the underlying DataElementGroup

type HashAlgorithmDataElement

type HashAlgorithmDataElement struct {
	DataElement
	// "1" for OHA, Owner Hashing
	Usage *AlphaNumericDataElement
	// "999" for ZZZ (RIPEMD-160)
	Algorithm *AlphaNumericDataElement
	// "1" for IVC, Initialization value, clear text
	AlgorithmParamID *AlphaNumericDataElement
	// may not be used in versions 2.20 and below
	AlgorithmParamValue *BinaryDataElement
}

HashAlgorithmDataElement defines a hash algorithm

func NewDefaultHashAlgorithm

func NewDefaultHashAlgorithm() *HashAlgorithmDataElement

NewDefaultHashAlgorithm creates a default HashAlgorithmDataElement with values ready to use for initial dialog comm

func (*HashAlgorithmDataElement) GroupDataElements

func (h *HashAlgorithmDataElement) GroupDataElements() []DataElement

GroupDataElements returns the grouped DataElements

type IdentificationDataElement

type IdentificationDataElement struct {
	*AlphaNumericDataElement
}

An IdentificationDataElement represents unique identifier. It is only valid if the underlying id is 30 characters or less.

func NewIdentification

func NewIdentification(id string) *IdentificationDataElement

NewIdentification returns a new IdentificationDataElement

func (IdentificationDataElement) Length

func (d IdentificationDataElement) Length() int

func (IdentificationDataElement) Optional

func (d IdentificationDataElement) Optional() bool

func (IdentificationDataElement) SetOptional

func (d IdentificationDataElement) SetOptional()

func (*IdentificationDataElement) Type

Type returns the DataElementType of i

func (*IdentificationDataElement) UnmarshalHBCI

func (i *IdentificationDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into i

func (IdentificationDataElement) Value

func (d IdentificationDataElement) Value() interface{}

Value returns the underlying value

type InternationalAccountConnectionDataElement

type InternationalAccountConnectionDataElement struct {
	DataElement
	IBAN                      *AlphaNumericDataElement
	BIC                       *AlphaNumericDataElement
	AccountID                 *IdentificationDataElement
	SubAccountCharacteristics *IdentificationDataElement
	BankID                    *BankIdentificationDataElement
}

An InternationalAccountConnectionDataElement represents an international bank account

func NewInternationalAccountConnection

NewInternationalAccountConnection returns a new InternationalAccountConnectionDataElement

func (*InternationalAccountConnectionDataElement) Elements

Elements returns the child elements of i

func (*InternationalAccountConnectionDataElement) UnmarshalHBCI

func (i *InternationalAccountConnectionDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into i

func (*InternationalAccountConnectionDataElement) Val

Val returns the value of i as domain.InternationalAccountConnection

type KeyNameDataElement

type KeyNameDataElement struct {
	DataElement
	Bank   *BankIdentificationDataElement
	UserID *IdentificationDataElement
	// "S" for Signing key
	// "V" for Encryption key
	KeyType    *AlphaNumericDataElement
	KeyNumber  *NumberDataElement
	KeyVersion *NumberDataElement
}

KeyNameDataElement represents metadata for keys

func NewKeyName

func NewKeyName(keyName domain.KeyName) *KeyNameDataElement

NewKeyName creates a new KeyNameDataElement for keyName

func (*KeyNameDataElement) GroupDataElements

func (k *KeyNameDataElement) GroupDataElements() []DataElement

GroupDataElements returns the grouped DataElements

func (*KeyNameDataElement) Val

Val returns the KeyName as domain.KeyName

type NumberDataElement

type NumberDataElement struct {
	// contains filtered or unexported fields
}

A NumberDataElement represents a number containing 0 - 9 without leading zeros

func NewNumber

func NewNumber(val, maxLength int) *NumberDataElement

NewNumber returns a new NumberDataElement

func (NumberDataElement) IsValid

func (d NumberDataElement) IsValid() bool

func (NumberDataElement) Length

func (d NumberDataElement) Length() int

func (*NumberDataElement) MarshalHBCI

func (n *NumberDataElement) MarshalHBCI() ([]byte, error)

MarshalHBCI marshals n into the HBCI wire format

func (NumberDataElement) Optional

func (d NumberDataElement) Optional() bool

func (NumberDataElement) SetOptional

func (d NumberDataElement) SetOptional()

func (NumberDataElement) String

func (d NumberDataElement) String() string

func (NumberDataElement) Type

func (d NumberDataElement) Type() DataElementType

func (*NumberDataElement) UnmarshalHBCI

func (n *NumberDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into n

func (*NumberDataElement) Val

func (n *NumberDataElement) Val() int

Val returns the value of n as int

func (NumberDataElement) Value

func (d NumberDataElement) Value() interface{}

Value returns the underlying value

type OptionalDataElement

type OptionalDataElement interface {
	DataElement
	Optional() bool
}

OptionalDataElement represents a DataElement that can be marked as optional or required.

type ParamsDataElement

type ParamsDataElement struct {
	// contains filtered or unexported fields
}

ParamsDataElement defines a DataElement describing generic parameters

func NewParams

func NewParams(min, max int, params ...string) *ParamsDataElement

NewParams returns a new ParamsDataElement.

func (ParamsDataElement) GroupDataElements

func (a ParamsDataElement) GroupDataElements() []DataElement

GroupDataElements returns the grouped DataElements

func (ParamsDataElement) IsValid

func (a ParamsDataElement) IsValid() bool

func (*ParamsDataElement) UnmarshalHBCI

func (p *ParamsDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals the value into a ParamsDataElement

func (*ParamsDataElement) Val

func (p *ParamsDataElement) Val() []string

Val returns the underlying value of the DataElement.

type PinTanBusinessTransactionParameter

type PinTanBusinessTransactionParameter struct {
	DataElement
	SegmentID *AlphaNumericDataElement
	NeedsTAN  *BooleanDataElement
}

PinTanBusinessTransactionParameter defines a specific PinTanBusinessTransactionParameter DataElement

func (*PinTanBusinessTransactionParameter) Elements

Elements returns the elements of this DataElement.

func (*PinTanBusinessTransactionParameter) UnmarshalHBCI

func (p *PinTanBusinessTransactionParameter) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into p

func (*PinTanBusinessTransactionParameter) Val

Val returns the underlying PinTanBusinessTransaction

type PinTanBusinessTransactionParameters

type PinTanBusinessTransactionParameters struct {
	// contains filtered or unexported fields
}

PinTanBusinessTransactionParameters represents a slice of PinTanBusinessTransactionParameter DataElements

func NewPinTanBusinessTransactionParameters

func NewPinTanBusinessTransactionParameters(pinTanTransactions []domain.PinTanBusinessTransaction) *PinTanBusinessTransactionParameters

NewPinTanBusinessTransactionParameters returns a new PinTanBusinessTransactionParameters DataElement

func (PinTanBusinessTransactionParameters) GroupDataElements

func (a PinTanBusinessTransactionParameters) GroupDataElements() []DataElement

GroupDataElements returns the grouped DataElements

func (PinTanBusinessTransactionParameters) IsValid

func (a PinTanBusinessTransactionParameters) IsValid() bool

func (*PinTanBusinessTransactionParameters) UnmarshalHBCI

func (p *PinTanBusinessTransactionParameters) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into the PinTanBusinessTransactionParameters

func (*PinTanBusinessTransactionParameters) Val

Val returns the underlying PinTanBusinessTransactions

type PinTanDataElement

type PinTanDataElement struct {
	DataElement
	PIN *AlphaNumericDataElement
	TAN *AlphaNumericDataElement
}

PinTanDataElement represents a DataElement which contains the PIN and the TAN for a transaction

func NewPinTan

func NewPinTan(pin, tan string) *PinTanDataElement

NewPinTan returns a new PinTanDataElement for pin and tan

func (*PinTanDataElement) GroupDataElements

func (p *PinTanDataElement) GroupDataElements() []DataElement

GroupDataElements returns the grouped DataElements

type PublicKeyDataElement

type PublicKeyDataElement struct {
	DataElement
	// "5" for OCF, Owner Ciphering (Encryption key)
	// "6" for OSG, Owner Signing (Signing key)
	Usage *AlphaNumericDataElement
	// "16" for DSMR (ISO 9796)
	OperationMode *AlphaNumericDataElement
	// "10" for RSA
	Cipher  *AlphaNumericDataElement
	Modulus *BinaryDataElement
	// "12" for MOD, Modulus
	ModulusID *AlphaNumericDataElement
	// "65537"
	Exponent *BinaryDataElement
	// "13" for EXP, Exponent
	ExponentID *AlphaNumericDataElement
}

PublicKeyDataElement represents a public key

func NewPublicKey

func NewPublicKey(pubKey *domain.PublicKey) *PublicKeyDataElement

NewPublicKey creates a new PublicKeyElement from pubKey

func (*PublicKeyDataElement) GroupDataElements

func (p *PublicKeyDataElement) GroupDataElements() []DataElement

GroupDataElements returns the grouped DataElements

func (*PublicKeyDataElement) Val

Val returns the public key

type ReferencingMessageDataElement

type ReferencingMessageDataElement struct {
	DataElement
	DialogID      *IdentificationDataElement
	MessageNumber *NumberDataElement
}

ReferencingMessageDataElement represents a reference to another message for a given dialog

func NewReferencingMessage

func NewReferencingMessage(dialogID string, messageNumber int) *ReferencingMessageDataElement

NewReferencingMessage returns a new referencing message for the given dialogID and messageNumber

func (*ReferencingMessageDataElement) GroupDataElements

func (r *ReferencingMessageDataElement) GroupDataElements() []DataElement

GroupDataElements returns the grouped DataElements

func (*ReferencingMessageDataElement) IsValid

func (r *ReferencingMessageDataElement) IsValid() bool

IsValid returns true if the DialogID and MessageNumber are set and the underlying value is valid.

func (*ReferencingMessageDataElement) UnmarshalHBCI

func (r *ReferencingMessageDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into r

func (*ReferencingMessageDataElement) Val

Val returns the value of r as domain.ReferencingMessage

type SecurityDateDataElement

type SecurityDateDataElement struct {
	DataElement
	DateIdentifier *AlphaNumericDataElement
	Date           *DateDataElement
	Time           *TimeDataElement
}

SecurityDateDataElement represents a date with a context type

func NewSecurityDate

func NewSecurityDate(dateID string, date time.Time) *SecurityDateDataElement

NewSecurityDate creates a new SecurityDate for the given type

func (*SecurityDateDataElement) GroupDataElements

func (s *SecurityDateDataElement) GroupDataElements() []DataElement

GroupDataElements returns the grouped DataElements

type SecurityIdentificationDataElement

type SecurityIdentificationDataElement struct {
	DataElement
	// Bezeichner für Sicherheitspartei
	SecurityHolder *AlphaNumericDataElement
	CID            *BinaryDataElement
	ClientSystemID *IdentificationDataElement
}

SecurityIdentificationDataElement represents a security method for wire transfer

func NewRDHSecurityIdentification

func NewRDHSecurityIdentification(securityHolder, clientSystemID string) *SecurityIdentificationDataElement

NewRDHSecurityIdentification returns a new SecurityIdentificationDataElement

func (*SecurityIdentificationDataElement) GroupDataElements

func (s *SecurityIdentificationDataElement) GroupDataElements() []DataElement

GroupDataElements returns the grouped DataElements

func (*SecurityIdentificationDataElement) UnmarshalHBCI

func (s *SecurityIdentificationDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into the DataElement

type SecurityMethodVersionsDataElement

type SecurityMethodVersionsDataElement struct {
	// contains filtered or unexported fields
}

SecurityMethodVersionsDataElement represents the possible versions of a security method.

func NewSecurityMethodVersions

func NewSecurityMethodVersions(min, max int, versions ...int) *SecurityMethodVersionsDataElement

NewSecurityMethodVersions returns a new SecurityMethodVersionsDataElement

func (*SecurityMethodVersionsDataElement) Elements

Elements returns the elements within the SecurityMethodVersionsDataElement

func (SecurityMethodVersionsDataElement) GroupDataElements

func (a SecurityMethodVersionsDataElement) GroupDataElements() []DataElement

GroupDataElements returns the grouped DataElements

func (SecurityMethodVersionsDataElement) IsValid

func (a SecurityMethodVersionsDataElement) IsValid() bool

func (*SecurityMethodVersionsDataElement) UnmarshalHBCI

func (s *SecurityMethodVersionsDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals the value to a SecurityMethodVersionsDataElement

func (*SecurityMethodVersionsDataElement) Versions

Versions returns the possible versions packaged in a slice of NumberDataElements

type SecurityProfileDataElement

type SecurityProfileDataElement struct {
	DataElement
	SecurityMethod        *AlphaNumericDataElement
	SecurityMethodVersion *NumberDataElement
}

SecurityProfileDataElement defines a security method for the dialog flow

func NewPinTanSecurityProfile

func NewPinTanSecurityProfile(securityMethod int) *SecurityProfileDataElement

NewPinTanSecurityProfile returns a new SecurityProfile for the provided securityMehtod

func (*SecurityProfileDataElement) GroupDataElements

func (s *SecurityProfileDataElement) GroupDataElements() []DataElement

GroupDataElements returns the grouped DataElements

func (*SecurityProfileDataElement) UnmarshalHBCI

func (s *SecurityProfileDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into the DataElement

type SegmentHeader

type SegmentHeader struct {
	DataElement
	ID      *AlphaNumericDataElement
	Number  *NumberDataElement
	Version *NumberDataElement
	Ref     *NumberDataElement
}

A SegmentHeader represents the metadata of a given segment such as ID or version

func NewReferencingSegmentHeader

func NewReferencingSegmentHeader(id string, number, version, reference int) *SegmentHeader

NewReferencingSegmentHeader returns a new SegmentHeader with a reference to another segment

func NewSegmentHeader

func NewSegmentHeader(id string, number, version int) *SegmentHeader

NewSegmentHeader returns a new SegmentHeader for the id, number and version

func (*SegmentHeader) GroupDataElements

func (s *SegmentHeader) GroupDataElements() []DataElement

GroupDataElements returns the grouped DataElements

func (*SegmentHeader) IsValid

func (s *SegmentHeader) IsValid() bool

IsValid returns true if the DataElement and all its grouped elements are valid, false otherwise

func (*SegmentHeader) ReferencingSegment

func (s *SegmentHeader) ReferencingSegment() int

ReferencingSegment returns the reference number of the referenced segment

func (*SegmentHeader) SetNumber

func (s *SegmentHeader) SetNumber(number int)

SetNumber sets the number of the segment

func (*SegmentHeader) SetReference

func (s *SegmentHeader) SetReference(ref int)

SetReference sets the reference to another segment

func (*SegmentHeader) Type

func (s *SegmentHeader) Type() DataElementType

Type returns the DataElementType of s

func (*SegmentHeader) UnmarshalHBCI

func (s *SegmentHeader) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into s

type SignatureAlgorithmDataElement

type SignatureAlgorithmDataElement struct {
	DataElement
	// "1" for OSG, Owner Signing
	Usage *AlphaNumericDataElement
	// "1" for DES (DDV)
	// "10" for RSA (RDH)
	Algorithm *AlphaNumericDataElement
	// "16" for DSMR, Digital Signature Scheme giving Message Recovery: ISO 9796 (RDH)
	// "999" for ZZZ (DDV)
	OperationMode *AlphaNumericDataElement
}

A SignatureAlgorithmDataElement represents a signature algorithm

func NewRDHSignatureAlgorithm

func NewRDHSignatureAlgorithm() *SignatureAlgorithmDataElement

NewRDHSignatureAlgorithm creates a SignatureAlgorithm ready to use for RDH

func (*SignatureAlgorithmDataElement) GroupDataElements

func (s *SignatureAlgorithmDataElement) GroupDataElements() []DataElement

GroupDataElements returns the grouped DataElements

type SupportedCompressionMethodsDataElement

type SupportedCompressionMethodsDataElement struct {
	// contains filtered or unexported fields
}

SupportedCompressionMethodsDataElement represents the compression methods supported by the bank institute

func (SupportedCompressionMethodsDataElement) GroupDataElements

func (a SupportedCompressionMethodsDataElement) GroupDataElements() []DataElement

GroupDataElements returns the grouped DataElements

func (SupportedCompressionMethodsDataElement) IsValid

func (a SupportedCompressionMethodsDataElement) IsValid() bool

type SupportedHBCIVersionsDataElement

type SupportedHBCIVersionsDataElement struct {
	// contains filtered or unexported fields
}

SupportedHBCIVersionsDataElement represents a DataElement for supported HBCI versions

func NewSupportedHBCIVersions

func NewSupportedHBCIVersions(versions ...int) *SupportedHBCIVersionsDataElement

NewSupportedHBCIVersions returns a new SupportedHBCIVersionsDataElement

func (SupportedHBCIVersionsDataElement) GroupDataElements

func (a SupportedHBCIVersionsDataElement) GroupDataElements() []DataElement

GroupDataElements returns the grouped DataElements

func (SupportedHBCIVersionsDataElement) IsValid

func (a SupportedHBCIVersionsDataElement) IsValid() bool

func (*SupportedHBCIVersionsDataElement) UnmarshalHBCI

func (s *SupportedHBCIVersionsDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals the value to a SupportedHBCIVersionsDataElement

type SupportedLanguagesDataElement

type SupportedLanguagesDataElement struct {
	// contains filtered or unexported fields
}

SupportedLanguagesDataElement represents the supported languages by the bank institute

func NewSupportedLanguages

func NewSupportedLanguages(languages ...int) *SupportedLanguagesDataElement

NewSupportedLanguages returns a new SupportedLanguagesDataElement

func (SupportedLanguagesDataElement) GroupDataElements

func (a SupportedLanguagesDataElement) GroupDataElements() []DataElement

GroupDataElements returns the grouped DataElements

func (SupportedLanguagesDataElement) IsValid

func (a SupportedLanguagesDataElement) IsValid() bool

func (*SupportedLanguagesDataElement) Languages

Languages returns the supported languages packaged within a slice of NumberDataElements

func (*SupportedLanguagesDataElement) UnmarshalHBCI

func (s *SupportedLanguagesDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals the value into the SupportedLanguagesDataElement

type SupportedSecurityMethodDataElement

type SupportedSecurityMethodDataElement struct {
	DataElement
	// Code | Bedeutung
	// ------------------------------
	// DDV  | DES-DES-Verfahren
	// RDH  | RSA-DES-Hybridverfahren
	MethodCode *AlphaNumericDataElement
	// At the moment only "1" is allowed
	Versions *SecurityMethodVersionsDataElement
}

SupportedSecurityMethodDataElement defines a DataElement for supported security methods

func NewSupportedSecurityMethod

func NewSupportedSecurityMethod(methodCode string, versions ...int) *SupportedSecurityMethodDataElement

NewSupportedSecurityMethod returns a new SupportedSecurityMethodDataElement

func (*SupportedSecurityMethodDataElement) GroupDataElements

func (s *SupportedSecurityMethodDataElement) GroupDataElements() []DataElement

GroupDataElements returns the grouped DataElements within the SupportedSecurityMethodDataElement

func (*SupportedSecurityMethodDataElement) UnmarshalHBCI

func (s *SupportedSecurityMethodDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals the value to a SupportedSecurityMethodDataElement

type SwiftMT940DataElement

type SwiftMT940DataElement struct {
	*BinaryDataElement
	// contains filtered or unexported fields
}

SwiftMT940DataElement represents a DataElement containing SWIFT MT940 binary data

func (SwiftMT940DataElement) IsValid

func (d SwiftMT940DataElement) IsValid() bool

func (SwiftMT940DataElement) Length

func (d SwiftMT940DataElement) Length() int

func (SwiftMT940DataElement) Optional

func (d SwiftMT940DataElement) Optional() bool

func (SwiftMT940DataElement) SetOptional

func (d SwiftMT940DataElement) SetOptional()

func (SwiftMT940DataElement) Type

func (d SwiftMT940DataElement) Type() DataElementType

func (*SwiftMT940DataElement) UnmarshalHBCI

func (s *SwiftMT940DataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into s

func (*SwiftMT940DataElement) Val

Val returns the embodied transactions as []domain.AccountTransaction

func (SwiftMT940DataElement) Value

func (d SwiftMT940DataElement) Value() interface{}

Value returns the underlying value

type TextDataElement

type TextDataElement struct {
	// contains filtered or unexported fields
}

TextDataElement represents a DataElement that can hold alphanumeric characters, but also '\n' and '\r'

func NewText

func NewText(val string, maxLength int) *TextDataElement

NewText returns a new TextDataElement

func (TextDataElement) IsValid

func (d TextDataElement) IsValid() bool

func (TextDataElement) Length

func (d TextDataElement) Length() int

func (*TextDataElement) MarshalHBCI

func (a *TextDataElement) MarshalHBCI() ([]byte, error)

MarshalHBCI marshals a into the HBCI wire format

func (TextDataElement) Optional

func (d TextDataElement) Optional() bool

func (TextDataElement) SetOptional

func (d TextDataElement) SetOptional()

func (*TextDataElement) String

func (a *TextDataElement) String() string

func (TextDataElement) Type

func (d TextDataElement) Type() DataElementType

func (*TextDataElement) UnmarshalHBCI

func (a *TextDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into a

func (*TextDataElement) Val

func (a *TextDataElement) Val() string

Val returns the value of a as a string

func (TextDataElement) Value

func (d TextDataElement) Value() interface{}

Value returns the underlying value

type TimeDataElement

type TimeDataElement struct {
	// contains filtered or unexported fields
}

A TimeDataElement represents a time of a date component. It always contains a time component, but the date components will always be 0, i.e. 0000-00-00.

func NewTime

func NewTime(date time.Time) *TimeDataElement

NewTime returns a new TimeDataElement

func (*TimeDataElement) IsValid

func (t *TimeDataElement) IsValid() bool

IsValid returns true if the underlying date is not Zero.

func (TimeDataElement) Length

func (d TimeDataElement) Length() int

func (*TimeDataElement) MarshalHBCI

func (t *TimeDataElement) MarshalHBCI() ([]byte, error)

MarshalHBCI marshals t into HBCI wire format

func (TimeDataElement) Optional

func (d TimeDataElement) Optional() bool

func (TimeDataElement) SetOptional

func (d TimeDataElement) SetOptional()

func (*TimeDataElement) String

func (t *TimeDataElement) String() string

func (TimeDataElement) Type

func (d TimeDataElement) Type() DataElementType

func (*TimeDataElement) UnmarshalHBCI

func (t *TimeDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into t

func (*TimeDataElement) Val

func (t *TimeDataElement) Val() time.Time

Val returns the value of t as time.Time.

func (TimeDataElement) Value

func (d TimeDataElement) Value() interface{}

Value returns the underlying value

type ValueDataElement

type ValueDataElement struct {
	*FloatDataElement
}

A ValueDataElement represents a float which can have upto 15 characters

func NewValue

func NewValue(val float64) *ValueDataElement

NewValue returns a new ValueDataElement

func (ValueDataElement) IsValid

func (d ValueDataElement) IsValid() bool

func (ValueDataElement) Length

func (d ValueDataElement) Length() int

func (ValueDataElement) Optional

func (d ValueDataElement) Optional() bool

func (ValueDataElement) SetOptional

func (d ValueDataElement) SetOptional()

func (*ValueDataElement) Type

Type returns the DataElementType of v

func (*ValueDataElement) UnmarshalHBCI

func (v *ValueDataElement) UnmarshalHBCI(value []byte) error

UnmarshalHBCI unmarshals value into v

func (ValueDataElement) Value

func (d ValueDataElement) Value() interface{}

Value returns the underlying value

type VirtualDateDataElement

type VirtualDateDataElement struct {
	*NumberDataElement
}

VirtualDateDataElement represents a virtual date TODO: modelling a virtual date?!

func NewVirtualDate

func NewVirtualDate(date int) *VirtualDateDataElement

NewVirtualDate returns a new VirtualDateDataElement

func (VirtualDateDataElement) IsValid

func (d VirtualDateDataElement) IsValid() bool

func (VirtualDateDataElement) Length

func (d VirtualDateDataElement) Length() int

func (VirtualDateDataElement) Optional

func (d VirtualDateDataElement) Optional() bool

func (VirtualDateDataElement) SetOptional

func (d VirtualDateDataElement) SetOptional()

func (VirtualDateDataElement) String

func (d VirtualDateDataElement) String() string

func (VirtualDateDataElement) Type

func (d VirtualDateDataElement) Type() DataElementType

func (*VirtualDateDataElement) Valid

func (v *VirtualDateDataElement) Valid() bool

Valid returns true if the length of v is 8, false otherwise

func (VirtualDateDataElement) Value

func (d VirtualDateDataElement) Value() interface{}

Value returns the underlying value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL