Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrEventNotFound = errors.New("event record not found")
)
Functions ¶
This section is empty.
Types ¶
type Record ¶
type Record struct { Id uint64 // A common ID generally agreed upon. For example, a money movement flow using // multiple intents may want to standardize on which intent ID is used to add // additional metadata as it becomes available. EventId string EventType EventType // Involved accounts SourceCodeAccount string DestinationCodeAccount *string ExternalTokenAccount *string // Involved identities SourceIdentity string DestinationIdentity *string // Involved IP addresses, and associated metadata // // todo: Requires MaxMind data set. IP metadata be missing until we do. // todo: May add additional "interesting" IP metadata after reviewing MaxMind data set. SourceClientIp *string SourceClientCity *string SourceClientCountry *string DestinationClientIp *string DestinationClientCity *string DestinationClientCountry *string UsdValue *float64 // Could be a good way to trigger human reviews, or automated ban processes, // for example. Initially, this will always be zero until we learn more about // good rulesets. SpamConfidence float64 // [0, 1] CreatedAt time.Time }
type Store ¶
type Store interface { // Save creates or updates an event record. For updates, only fields that can // be reasonably changed or provided at a later time are supported. Save(ctx context.Context, record *Record) error // Get gets an event record by its event ID Get(ctx context.Context, id string) (*Record, error) }
Click to show internal directories.
Click to hide internal directories.