Documentation ¶
Index ¶
- Constants
- Variables
- type AccountBalance
- type AccountBalances
- type AccountConnection
- type AccountInformation
- type AccountInfos
- type AccountLimit
- type AccountTransaction
- type AccountTransactions
- type Acknowledgement
- type Address
- type Amount
- type Balance
- type BankID
- type BankParameterData
- type BusinessTransaction
- type CommunicationParameter
- type InternationalAccountConnection
- type Key
- type KeyName
- type KeyType
- type Language
- type MessageReference
- type PinKey
- func (p *PinKey) CanEncrypt() bool
- func (p *PinKey) CanSign() bool
- func (p *PinKey) Decrypt(encryptedMessage []byte) ([]byte, error)
- func (p *PinKey) Encrypt(message []byte) ([]byte, error)
- func (p *PinKey) KeyName() KeyName
- func (p *PinKey) Pin() string
- func (p *PinKey) SetKeyNumber(number int)
- func (p *PinKey) SetKeyVersion(version int)
- func (p *PinKey) Sign(message []byte) ([]byte, error)
- type PinTanBusinessTransaction
- type PinTanBusinessTransactions
- type PublicKey
- type RSAKey
- type SepaAccountBalance
- type SepaAccountBalances
- type ShortDate
- type StatusAcknowledgement
- type Timeframe
- type UserParameterData
Constants ¶
const ( // MessageAcknowledgement defines the message ack type MessageAcknowledgement = "MessageAcknowledgement" // SegmentAcknowledgement defines the segemtn ack type SegmentAcknowledgement = "SegmentAcknowledgement" )
const ( // HBCIVersion220 represents version 2.2.0 of HBCI protocol HBCIVersion220 = 220 // FINTSVersion300 represents version 3.0.0 of FINTS protocol FINTSVersion300 = 300 )
const ( KeyTypeSigning = KeyType("S") KeyTypeEncryption = KeyType("V") )
Variables ¶
var SupportedHBCIVersions = []int{ HBCIVersion220, FINTSVersion300, }
SupportedHBCIVersions provides a list of supported versions
Functions ¶
This section is empty.
Types ¶
type AccountBalance ¶
type AccountBalance struct { Account AccountConnection ProductName string Currency string BookedBalance Balance EarmarkedBalance *Balance CreditLimit *Amount AvailableAmount *Amount UsedAmount *Amount BookingDate *time.Time DueDate *time.Time }
AccountBalance represents a balance for a specific account
func (AccountBalance) String ¶
func (a AccountBalance) String() string
type AccountBalances ¶ added in v0.1.5
type AccountBalances []AccountBalance
AccountBalances represents a printable version of a slice of account balances
func (AccountBalances) String ¶ added in v0.1.5
func (ab AccountBalances) String() string
type AccountConnection ¶
type AccountConnection struct { AccountID string SubAccountCharacteristics string CountryCode int BankID string }
AccountConnection represents an identification for a bank account
type AccountInformation ¶
type AccountInformation struct { AccountConnection AccountConnection UserID string Currency string Name1 string Name2 string ProductID string Limit *AccountLimit AllowedBusinessTransactions []BusinessTransaction }
AccountInformation represents bank specific information about an account
func (AccountInformation) String ¶ added in v0.1.5
func (a AccountInformation) String() string
type AccountInfos ¶ added in v0.1.5
type AccountInfos []AccountInformation
AccountInfos represent a printable version of a slice of AccountInformation
func (AccountInfos) String ¶ added in v0.1.5
func (ai AccountInfos) String() string
type AccountLimit ¶
AccountLimit represents a limit for an account with a possible timespan
type AccountTransaction ¶
type AccountTransaction struct { Account AccountConnection Amount Amount ValutaDate time.Time BookingDate time.Time BookingText string BankID string AccountID string Name string Purpose string Purpose2 string TransactionID int AccountBalanceBefore Balance AccountBalanceAfter Balance }
AccountTransaction represents one transaction entry for a given account
func (AccountTransaction) String ¶
func (a AccountTransaction) String() string
type AccountTransactions ¶ added in v0.1.4
type AccountTransactions []AccountTransaction
AccountTransactions represents a printable version of a slice of account transactions
func (AccountTransactions) String ¶ added in v0.1.4
func (at AccountTransactions) String() string
type Acknowledgement ¶
type Acknowledgement struct { Type string Code int ReferenceDataElement string Text string Params []string ReferencingMessage MessageReference ReferencingSegmentNumber int }
Acknowledgement represents an acknowledgement from the bank institute
func NewMessageAcknowledgement ¶
func NewMessageAcknowledgement(code int, referenceDataElement, text string, params []string) Acknowledgement
NewMessageAcknowledgement creactes a new message acknowledgement
func NewSegmentAcknowledgement ¶
func NewSegmentAcknowledgement(code int, referenceDataElement, text string, params []string) Acknowledgement
NewSegmentAcknowledgement creactes a new segment acknowledgement
func (Acknowledgement) IsError ¶
func (a Acknowledgement) IsError() bool
IsError returns true if the acknowledgement represents an error
func (Acknowledgement) IsMessageAcknowledgement ¶
func (a Acknowledgement) IsMessageAcknowledgement() bool
IsMessageAcknowledgement returns true if the type is MessageAcknowledgement, false otherwise
func (Acknowledgement) IsSegmentAcknowledgement ¶
func (a Acknowledgement) IsSegmentAcknowledgement() bool
IsSegmentAcknowledgement returns true if type is SegmentAcknowledgement, false otherwise
func (Acknowledgement) IsSuccess ¶
func (a Acknowledgement) IsSuccess() bool
IsSuccess returns true if the acknowledgement represents a success
func (Acknowledgement) IsWarning ¶
func (a Acknowledgement) IsWarning() bool
IsWarning returns true if the acknowledgement represents a warning
func (Acknowledgement) String ¶
func (a Acknowledgement) String() string
type Address ¶
type Address struct { Name1 string Name2 string Street string PLZ string City string CountryCode int Phone string Fax string Email string }
Address represents an address
type BankParameterData ¶
type BankParameterData struct { Version int BankID BankID `yaml:",inline"` BankName string `yaml:"bankName"` MaxTransactionsPerMessage int `yaml:"maxTransactionsPerMessage"` MaxMessageSize int `yaml:"maxMessageSize"` MinTimeout int `yaml:"minTimeout"` MaxTimeout int `yaml:"maxTimeout"` PinTanBusinessTransactions map[string]bool `yaml:"pinTanBusinessTransactions"` }
BankParameterData represent metadata prvided by a bank institute that reflect limitations and limits when talking to that institute
type BusinessTransaction ¶
type BusinessTransaction struct { ID string NeededSignatures int Limit *AccountLimit }
BusinessTransaction provides information about a transaction and whether there is a signature needed or not
type CommunicationParameter ¶
type CommunicationParameter struct { Protocol int Address string AddressAddition string FilterFunction string FilterFunctionVersion int }
CommunicationParameter provides information about the access point to a bank institute
type InternationalAccountConnection ¶
type InternationalAccountConnection struct { IBAN string BIC string AccountID string SubAccountCharacteristics string BankID BankID }
InternationalAccountConnection represents an international identification for a bank account
func (InternationalAccountConnection) ToAccountConnection ¶ added in v0.1.4
func (i InternationalAccountConnection) ToAccountConnection() AccountConnection
ToAccountConnection transforms i into an AccountConnection
type Key ¶
type Key interface { // KeyName returns the KeyName KeyName() KeyName // SetKeyNumber sets the key number in the KeyName SetKeyNumber(number int) // SetKeyVersion sets the key version in the KeyName SetKeyVersion(version int) // Sign signs message Sign(message []byte) (signature []byte, err error) // Encrypt encrypts message Encrypt(message []byte) (encrypted []byte, err error) // CanSign returns true if the key can be used for signing CanSign() bool // CanEncrypt returns true if the key can be used for encryption CanEncrypt() bool }
Key provides an interface to an encryption/signing key
type KeyName ¶
KeyName provides data about a given key
func NewInitialKeyName ¶
NewInitialKeyName represents a KeyName ready to use for initial communication
func NewPinTanKeyName ¶
NewPinTanKeyName returns a new KeyName for the pin/tan flow
func (*KeyName) IsInitial ¶
IsInitial returns true if the KeyName represents an initial KeyName, false otherwise
func (*KeyName) SetInitial ¶
func (k *KeyName) SetInitial()
SetInitial resets the KeyName to reflect an initial KeyName
type Language ¶
type Language int
Language represents the language in which the communication from the bank institute can be accessed in
const ( // German represents the german language German Language = 1 // English represents the english language English // French represents the french language French )
type MessageReference ¶ added in v0.4.0
MessageReference represents a reference to another message within a given dialog
type PinKey ¶
type PinKey struct {
// contains filtered or unexported fields
}
PinKey represents a Key used for pin/tan flow
func (*PinKey) CanEncrypt ¶
CanEncrypt returns true if the key can be used for encryption
func (*PinKey) SetKeyNumber ¶
SetKeyNumber sets the key number in the KeyName
func (*PinKey) SetKeyVersion ¶
SetKeyVersion sets the key version in the KeyName
type PinTanBusinessTransaction ¶
type PinTanBusinessTransaction struct { SegmentID string `yaml:"segmentID"` NeedsTan bool `yaml:"needsTan"` }
PinTanBusinessTransaction provides information about whether a given Segment needs a TAN or not.
type PinTanBusinessTransactions ¶ added in v0.4.0
type PinTanBusinessTransactions []PinTanBusinessTransaction
type PublicKey ¶
type PublicKey struct { Type string Modulus []byte Exponent []byte // contains filtered or unexported fields }
PublicKey represents a key which can either embed a private or public RSA key
func GenerateSigningKey ¶
GenerateSigningKey generates a new signing key
func NewEncryptionKey ¶
NewEncryptionKey creates a new RSA encryption key
func (*PublicKey) SigningKey ¶
func (p *PublicKey) SigningKey() *rsa.PrivateKey
SigningKey returns the RSA private key to sign with, or nil when not set
type RSAKey ¶
type RSAKey struct { *PublicKey // contains filtered or unexported fields }
RSAKey represents a public RSA key which implements the Key interface
func (*RSAKey) CanEncrypt ¶
CanEncrypt returns true if the key can be used for encryption
func (*RSAKey) SetKeyNumber ¶
SetKeyNumber sets the key number in the KeyName
func (*RSAKey) SetKeyVersion ¶
SetKeyVersion sets the key version in the KeyName
type SepaAccountBalance ¶ added in v0.4.1
type SepaAccountBalance struct { Account InternationalAccountConnection ProductName string Currency string BookedBalance Balance EarmarkedBalance *Balance CreditLimit *Amount AvailableAmount *Amount UsedAmount *Amount BookingDate *time.Time DueDate *time.Time SeizableAfterMonth *Amount }
SepaAccountBalance represents a balance for a specific account
func (SepaAccountBalance) String ¶ added in v0.4.1
func (a SepaAccountBalance) String() string
type SepaAccountBalances ¶ added in v0.4.1
type SepaAccountBalances []SepaAccountBalance
SepaAccountBalances represents a printable version of a slice of account balances
func (SepaAccountBalances) String ¶ added in v0.4.1
func (ab SepaAccountBalances) String() string
type ShortDate ¶
ShortDate represents a date without a time, i.e. the time is always zero.
func NewShortDate ¶
NewShortDate creates a ShortDate from a given time
func (*ShortDate) MarshalJSON ¶
MarshalJSON marshals the date into a JSON representation
func (*ShortDate) MarshalText ¶
MarshalText marshals the date into a byte representation
func (*ShortDate) UnmarshalJSON ¶
UnmarshalJSON unmarshals the JSON representation into a date
func (*ShortDate) UnmarshalText ¶
UnmarshalText unmarshals text into a ShortDate
type StatusAcknowledgement ¶
type StatusAcknowledgement struct { Acknowledgement TransmittedAt time.Time }
StatusAcknowledgement represents an Acknowledgement with a transmission date
func (StatusAcknowledgement) String ¶
func (s StatusAcknowledgement) String() string
type Timeframe ¶
Timeframe represents a date range
func TimeframeFromDate ¶
TimeframeFromDate returns a Timeframe with the StartDate set to date and the EndDate set to today. The EndDate will use the same timezone location as provided in StartDate
func TimeframeFromQuery ¶
TimeframeFromQuery parses a timeframe from a query. The param keys are expected to be `from` for the StartDate and `to` for the EndDate
func (*Timeframe) IsZero ¶
IsZero returns true when StartDate and EndDate are both zero, i.e. when the Timeframe is uninitialized.
func (*Timeframe) MarshalJSON ¶
MarshalJSON marhsals the timeframe into a JSON string
func (*Timeframe) ToQuery ¶
ToQuery transforms a timeframe to a query. The param keys are `from` for the StartDate and `to` for the EndDate
func (*Timeframe) UnmarshalJSON ¶
UnmarshalJSON unmarshals data into a timeframe
Source Files ¶
- account_balance.go
- account_connection.go
- account_information.go
- account_limit.go
- account_transaction.go
- acknowledgement.go
- address.go
- balance.go
- bank_id.go
- bank_parameter_data.go
- business_transaction.go
- communication_parameter.go
- encryption.go
- hbci.go
- key.go
- language.go
- message.go
- time.go
- user_parameter_data.go