artifacts

package
v0.20.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package artifacts stores content-addressed policy evaluation artifacts.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("artifact not found")

ErrNotFound means no artifact has the requested digest.

Functions

This section is empty.

Types

type Service

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

func NewService

func NewService(db *gorm.DB) *Service

func (*Service) Get

func (s *Service) Get(ctx context.Context, digest string) (*relational.Artifact, error)

Get returns the artifact with digest, content included.

func (*Service) Head

func (s *Service) Head(ctx context.Context, digest string) (*artifact.Info, error)

Head returns an artifact's metadata without its content.

func (*Service) Put

func (s *Service) Put(ctx context.Context, mediaType string, canonical []byte, agentID *uuid.UUID) (*artifact.Info, bool, error)

Put stores canonical content of mediaType under its digest and reports whether this call created it. Storing content that is already present changes nothing.

Jump to

Keyboard shortcuts

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