-
Notifications
You must be signed in to change notification settings - Fork 344
/
types.go
30 lines (26 loc) · 900 Bytes
/
types.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
package storage
import (
"sync"
"time"
)
type GetInteractionsFunc func() []string
type CacheMetrics struct {
HitCount uint64 `json:"hit-count"`
MissCount uint64 `json:"miss-count"`
LoadSuccessCount uint64 `json:"load-success-count"`
LoadErrorCount uint64 `json:"load-error-count"`
TotalLoadTime time.Duration `json:"total-load-time"`
EvictionCount uint64 `json:"eviction-count"`
}
// CorrelationData is the data for a correlation-id.
type CorrelationData struct {
sync.Mutex
// data contains data for a correlation-id in AES encrypted json format.
Data []string `json:"data"`
// secretkey is a secret key for original user verification
SecretKey string `json:"-"`
// AESKey is the AES encryption key in encrypted format.
AESKeyEncrypted string `json:"aes-key"`
// decrypted AES key for signing
AESKey []byte `json:"-"`
}