forked from prebid/prebid-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconverter_info.go
38 lines (31 loc) · 891 Bytes
/
converter_info.go
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
package currency
import "time"
// ConverterInfo holds information about converter setup
type ConverterInfo interface {
Source() string
LastUpdated() time.Time
Rates() *map[string]map[string]float64
AdditionalInfo() interface{}
}
type converterInfo struct {
source string
lastUpdated time.Time
rates *map[string]map[string]float64
additionalInfo interface{}
}
// Source returns converter's URL source
func (ci converterInfo) Source() string {
return ci.source
}
// LastUpdated returns converter's last updated time
func (ci converterInfo) LastUpdated() time.Time {
return ci.lastUpdated
}
// Rates returns converter's internal rates
func (ci converterInfo) Rates() *map[string]map[string]float64 {
return ci.rates
}
// AdditionalInfo returns converter's additional infos
func (ci converterInfo) AdditionalInfo() interface{} {
return ci.additionalInfo
}