Documentation
¶
Index ¶
- type CopyOptions
- type Option
- type ScanOptions
- type SignOptions
- type Source
- func (s *Source) Copy(ctx context.Context, opts *CopyOptions) error
- func (s *Source) Directory() string
- func (s *Source) GetCopiedImage() *archive.Image
- func (s *Source) ImageBySet(set types.FilterSet, copyProvenance bool) *archive.Image
- func (s *Source) Init(ctx context.Context) error
- func (s *Source) InspectRAW(ctx context.Context) ([]byte, string, error)
- func (s *Source) IsSigstoreSignature() bool
- func (s *Source) MIME() string
- func (s *Source) Name() string
- func (s *Source) Project() string
- func (s *Source) Reference() (typesv5.ImageReference, error)
- func (s *Source) ReferenceName() string
- func (s *Source) ReferenceNameWithoutTransport() string
- func (s *Source) ReferenceNameWithoutTransportAndTag() string
- func (s *Source) Registry() string
- func (s *Source) Scan(ctx context.Context, opts *ScanOptions) (*scan.Result, error)
- func (s *Source) Sign(ctx context.Context, opts *SignOptions) error
- func (s *Source) SystemContext() *typesv5.SystemContext
- func (s *Source) Tag() string
- func (s *Source) Type() types.ImageType
- func (s *Source) ValidateSignature(ctx context.Context, publicKey string, repository string, set types.FilterSet) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CopyOptions ¶
type CopyOptions struct { SigstorePrivateKey string SigstorePassphrase []byte RemoveSignatures bool CopyProvenance bool Destination *destination.Destination Set types.FilterSet Policy *signaturev5.Policy }
type Option ¶
type Option struct { // Image Type. Type types.ImageType // Directory, need to provide if Type is dir / oci / docker-archive Directory string // Registry, need to provide if Type is docker, docker-daemon, docker-archive Registry string // Project (also called namespace on some public cloud providers), // need to provide if Type is docker / docker-daemon / docker-archive Project string // Image name, need to provide if Type is docker / docker-daemon / docker-archive Name string // Image tag, need to provide if Type is docker / docker-daemon / docker-archive Tag string // Digest is used to identify the Digest of the image to be copied, // only available when Type is docker. Digest digest.Digest SystemContext *typesv5.SystemContext }
Option is used for create the Source object.
type ScanOptions ¶
type SignOptions ¶
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source represents the source image to be copied or sign. The type of the source image can be: docker, docker-daemon, docker-archive, oci or dir
func NewSource ¶
NewSource is the constructor to create a Source object. Need to call Init method after creating the Source object before use.
func (*Source) GetCopiedImage ¶
func (*Source) ImageBySet ¶
func (*Source) InspectRAW ¶
func (*Source) IsSigstoreSignature ¶
IsSigstoreSignature detects whether the source image is a sigstore signature
func (*Source) ReferenceName ¶
ReferenceName returns the reference with transport of the source image.
Example: docker://docker.io/library/hello-world:latest docker-daemon://docker.io/library/nginx:1.23 oci:./path/to/oci-image
func (*Source) ReferenceNameWithoutTransport ¶
func (*Source) ReferenceNameWithoutTransportAndTag ¶
func (*Source) SystemContext ¶
func (s *Source) SystemContext() *typesv5.SystemContext
Click to show internal directories.
Click to hide internal directories.