vulnerabilitysync

package
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxCheckpointBytes     = 64 << 10
	MaxSourceSnapshotBytes = 64 << 10
	MaxErrorSamples        = 32
	MaxErrorSampleBytes    = 2048
	MaxActorBytes          = 256
)

Variables

This section is empty.

Functions

func AddErrorSample

func AddErrorSample(samples []string, sample string) []string

func NormalizeCheckpoint

func NormalizeCheckpoint(checkpoint []byte) (json.RawMessage, error)

func NormalizeSourceSnapshot

func NormalizeSourceSnapshot(snapshot []byte) (json.RawMessage, error)

Types

type Counts

type Counts struct {
	Processed   int64 `json:"processed"`
	Inserted    int64 `json:"inserted"`
	Updated     int64 `json:"updated"`
	Unchanged   int64 `json:"unchanged"`
	Skipped     int64 `json:"skipped"`
	Quarantined int64 `json:"quarantined"`
}

func (Counts) Validate

func (c Counts) Validate() error

type Mode

type Mode string
const (
	ModeIncremental Mode = "incremental"
	ModeFull        Mode = "full"
)

func (Mode) Valid

func (m Mode) Valid() bool

type Run

type Run struct {
	ID                   shared.ID       `json:"id"`
	SourceID             shared.ID       `json:"source_id"`
	AdapterType          string          `json:"adapter_type"`
	SourceSnapshot       json.RawMessage `json:"source_snapshot,omitempty"`
	Mode                 Mode            `json:"mode"`
	Trigger              string          `json:"trigger"`
	Actor                string          `json:"actor"`
	ClientIdempotencyKey string          `json:"client_idempotency_key,omitempty"`
	DurableJobID         string          `json:"durable_job_id,omitempty"`
	Checkpoint           json.RawMessage `json:"checkpoint,omitempty"`
	Counts               Counts          `json:"counts"`
	ErrorSamples         []string        `json:"error_samples,omitempty"`
	State                State           `json:"state"`
	StartedAt            *time.Time      `json:"started_at,omitempty"`
	FinishedAt           *time.Time      `json:"finished_at,omitempty"`
	CreatedAt            time.Time       `json:"created_at"`
	UpdatedAt            time.Time       `json:"updated_at"`
}

func (Run) Clone

func (r Run) Clone() Run

func (Run) Validate

func (r Run) Validate() error

type State

type State string
const (
	StateQueued     State = "queued"
	StateRunning    State = "running"
	StateSucceeded  State = "succeeded"
	StatePartial    State = "partial"
	StateFailed     State = "failed"
	StateSuperseded State = "superseded"
)

func (State) Terminal

func (s State) Terminal() bool

func (State) Valid

func (s State) Valid() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL