bankinfo

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: Apache-2.0 Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BankInfo

type BankInfo struct {
	BankID        string
	BIC           string
	VersionNumber string
	URL           string
	VersionName   string
	Institute     string
	City          string
	LastChanged   string
}

BankInfo contains information about the HBCI settings and supported version of a given bank institute. The institute is referenced by its BankID.

func FindByBankID

func FindByBankID(bankID string) BankInfo

FindByBankID returns the BankInfo found for the provided bankID. If no value is found an zero value is returned.

func ParseBankInfos

func ParseBankInfos(reader io.Reader) ([]BankInfo, error)

ParseBankInfos extracts all bank information from the given reader. It expects the reader contents to be a CSV file with ';' as separator.

func (BankInfo) HbciVersion

func (b BankInfo) HbciVersion() int

HbciVersion tries to parse the HBCI version out of VersionName and VersionNumber. It panics if there is any error while getting a version out of the name or the number.

The returned number will be a 3 digit integer, like 200, 210, 220, 300, 400.

type BicInfo

type BicInfo struct {
	BIC    string
	BankID string
}

BicInfo holds the BIC data associated with a given bank institute.

func ParseBicData

func ParseBicData(reader io.Reader) ([]BicInfo, error)

ParseBicData extracts all bic information from the given reader. It expects the reader contents to be a CSV file with ';' as separator.

type SortableBankInfos

type SortableBankInfos []BankInfo

SortableBankInfos implements the sort.Interface

func (SortableBankInfos) Len

func (s SortableBankInfos) Len() int

func (SortableBankInfos) Less

func (s SortableBankInfos) Less(a, b int) bool

func (SortableBankInfos) Swap

func (s SortableBankInfos) Swap(a, b int)

Jump to

Keyboard shortcuts

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