init ingestion
This commit is contained in:
19
ingestion/ingest/internal/model/writekey.go
Normal file
19
ingestion/ingest/internal/model/writekey.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
// WriteKey is the auth credential supplied via Authorization header.
|
||||
// We never store the raw value — only its sha256 hash and a short prefix
|
||||
// for display in the console.
|
||||
type WriteKey struct {
|
||||
ID string
|
||||
WorkspaceID string
|
||||
SourceID string
|
||||
KeyPrefix string
|
||||
Label string
|
||||
RevokedAt *time.Time
|
||||
LastUsedAt *time.Time
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
func (k *WriteKey) Revoked() bool { return k.RevokedAt != nil }
|
||||
Reference in New Issue
Block a user