forked from projectdiscovery/interactsh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
storage.go
25 lines (23 loc) · 1015 Bytes
/
storage.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
// storage defines a storage mechanism
package storage
import (
"github.com/JanHoffmannTU/interactsh/pkg/communication"
"time"
)
type Storage interface {
GetCacheMetrics() (*CacheMetrics, error)
SetIDPublicKey(correlationID, secretKey, publicKey, description string) error
SetID(ID string) error
AddInteraction(correlationID string, data []byte) error
AddInteractionWithId(id string, data []byte) error
GetInteractions(correlationID, secret string) ([]string, string, error)
GetInteractionsWithId(id string) ([]string, error)
RemoveID(correlationID, secret string) error
GetCacheItem(token string) (*CorrelationData, error)
Close() error
GetDescription(correlationID string) (string, error)
GetAllDescriptions() []*communication.DescriptionEntry
SetDescription(correlationID string, description string) error
GetPersistentInteractions(correlationID string) ([]string, error)
GetRegisteredSessions(activeOnly bool, from, to time.Time, desc, layout string) ([]*communication.SessionEntry, error)
}