Total Lines | 22 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | package smobilpay |
||
2 | |||
3 | import ( |
||
4 | "fmt" |
||
5 | "time" |
||
6 | |||
7 | "github.com/google/uuid" |
||
8 | ) |
||
9 | |||
10 | type requestConfig struct { |
||
11 | nonce string |
||
12 | timestamp time.Time |
||
13 | } |
||
14 | |||
15 | func (config *requestConfig) timestampString() string { |
||
16 | return fmt.Sprintf("%d", config.timestamp.Unix()) |
||
17 | } |
||
18 | |||
19 | func defaultRequestConfig() *requestConfig { |
||
20 | return &requestConfig{ |
||
21 | nonce: uuid.NewString(), |
||
22 | timestamp: time.Now(), |
||
23 | } |
||
25 |