forked from projectdiscovery/interactsh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.go
38 lines (33 loc) · 1.05 KB
/
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
31
32
33
34
35
36
37
38
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:"-"`
}
type PersistentEntry struct {
data *CorrelationData
registeredAt time.Time
deregisteredAt time.Time
//Description of the connection
Description string
}