graphingest

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrForbidden       = errors.New("forbidden")
	ErrNotIndexed      = errors.New("not_indexed")
	ErrInvalidArtifact = errors.New("invalid_artifact")
	ErrUnavailable     = errors.New("unavailable")
	// ErrConflict means the active generation or indexed commit no longer
	// matches the publisher's preflight; ErrProducerConflict means the active
	// generation came from another producer and replacement was not requested.
	ErrConflict         = errors.New("conflict")
	ErrProducerConflict = errors.New("producer_conflict")
	ErrUnauthenticated  = errors.New("unauthenticated")
)

Functions

This section is empty.

Types

type Publication added in v0.7.0

type Publication struct {
	ExpectedGeneration int64
	ReplaceProducer    bool
}

Publication is a v2 publisher's replacement intent from its preflight. ExpectedGeneration 0 means no generation was active.

type Service

type Service struct {
	Store  Store
	Limits graphartifact.Limits
	// MaxUploadBytes is reported to publishers; the transport enforces it.
	MaxUploadBytes int64
}

func (*Service) Publish added in v0.7.0

func (service *Service) Publish(ctx context.Context, principal authn.Principal, repositoryID int64, commit string, data []byte, intent Publication) (api.GraphPublicationResult, error)

Publish activates a v2 artifact. Administrators need no grant; everyone else needs a repository publication grant on top of read access. The credential, grant and indexed commit are rechecked after parsing, and storage compares the expected generation under the repository lock.

func (*Service) Status

func (service *Service) Status(ctx context.Context, principal authn.Principal, repositoryID int64) (api.GraphStatus, error)

func (*Service) UploadExternal

func (service *Service) UploadExternal(ctx context.Context, principal authn.Principal, repositoryID int64, commit string, data []byte) (api.GraphStatus, error)

func (*Service) ValidateExternalUpload

func (service *Service) ValidateExternalUpload(ctx context.Context, principal authn.Principal, repositoryID int64, commit string) error

func (*Service) ValidatePublication added in v0.7.0

func (service *Service) ValidatePublication(ctx context.Context, principal authn.Principal, repositoryID int64, commit string) error

ValidatePublication checks, before the body is read, that the principal may publish a v2 generation for the repository's indexed commit.

Jump to

Keyboard shortcuts

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