Documentation ¶
Overview ¶
Package pusher implements the logic for push operations.
Index ¶
Constants ¶
const ( // ConfigLayerName is the name of config layers. ConfigLayerName = "config" // ArtifactsIndexName is the name of the index containing all manifests. ArtifactsIndexName = "index" )
Variables ¶
var ( // ErrInvalidPlatformFormat error when the platform is invalid. ErrInvalidPlatformFormat = errors.New("invalid platform format") // ErrMismatchFilepathAndPlatform error when the number of filepaths and platforms is not the same. ErrMismatchFilepathAndPlatform = errors.New("number of filepaths and platform should be the same") // ErrInvalidNumberRulesfiles error when the number of rulesfiles is not the one expected. ErrInvalidNumberRulesfiles = errors.New("invalid number of rulesfiles") // ErrInvalidDependenciesFormat error when the dependencies are invalid. ErrInvalidDependenciesFormat = errors.New("invalid dependency format") )
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*opts) error
Option is a functional option for pusher.
func WithAnnotationSource ¶
WithAnnotationSource sets the annotation source option.
func WithArtifactConfig ¶
func WithArtifactConfig(config oci.ArtifactConfig) Option
WithArtifactConfig sets the artifact configuration.
Dependencies and requirements can be set by oci.ArtifactConfig.
func WithFilepaths ¶
WithFilepaths sets the filepaths passed at execution time.
func WithFilepathsAndPlatforms ¶
WithFilepathsAndPlatforms sets filepaths and platforms passed at execution time. It also checks that the number of filepaths and platforms is the same.
type Pusher ¶
Pusher implements push operations.
func (*Pusher) Push ¶
func (p *Pusher) Push(ctx context.Context, artifactType oci.ArtifactType, ref string, options ...Option) (*oci.RegistryResult, error)
Push an artifact to a remote registry.
artifactType can be either a rule or plugin. artifactPath path of the artifact blob on the disk. ref format follows: REGISTRY/REPO[:TAG|@DIGEST]. Ex. localhost:5000/hello:latest.