artifact

package
v0.0.74 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package artifact provides the artifact ingestion engine

Package artifact provides the artifact ingestion engine

Index

Constants

View Source
const (
	// ArtifactRuleDataIngestType is the type of the artifact rule data ingest engine
	ArtifactRuleDataIngestType = "artifact"
)

Variables

View Source
var (
	// ArtifactTypeContainerRetentionPeriod represents the retention period for container artifacts
	ArtifactTypeContainerRetentionPeriod = time.Now().AddDate(0, -6, 0)
)

Functions

This section is empty.

Types

type Ingest

type Ingest struct {
	// contains filtered or unexported fields
}

Ingest is the engine for a rule type that uses artifact data ingest Implements enginer.ingester.Ingester

func NewArtifactDataIngest

func NewArtifactDataIngest(prov provifv1.Provider) (*Ingest, error)

NewArtifactDataIngest creates a new artifact rule data ingest engine

func (*Ingest) GetConfig

func (*Ingest) GetConfig() proto.Message

GetConfig returns the config for the artifact rule data ingest engine

func (*Ingest) GetType

func (*Ingest) GetType() string

GetType returns the type of the artifact rule data ingest engine

func (*Ingest) Ingest

func (i *Ingest) Ingest(
	ctx context.Context,
	ent proto.Message,
	params map[string]any,
) (*interfaces.Result, error)

Ingest checks the passed in artifact, makes sure it is applicable to the current rule and if it is, returns the appropriately marshalled data.

Jump to

Keyboard shortcuts

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