forked from fourcube/goiban-data
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlib.go
More file actions
28 lines (23 loc) · 740 Bytes
/
lib.go
File metadata and controls
28 lines (23 loc) · 740 Bytes
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
package data
// BankInfo describes data associated with an IBAN
type BankInfo struct {
Bankcode string `json:"bankCode"`
Name string `json:"name"`
Zip string `json:"zip,omitempty"`
City string `json:"city,omitempty"`
Bic string `json:"bic,omitempty"`
Country string `json:"-"`
CheckAlgo string `json:"-"`
Source string `json:"-"`
}
// BankDataRepository provides storage mechanisms
type BankDataRepository interface {
// Find an entry
Find(countryCode string, bankCode string) (*BankInfo, error)
// Store bank info
Store(data BankInfo) (bool, error)
// Clear all entries from a specific source
//
// Returns the number of removed entries and an optional error
Clear(source string) (int, error)
}