bundle

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ManifestDigest

func ManifestDigest(manifest Manifest) (string, error)

func WriteManifest

func WriteManifest(path string, manifest Manifest) error

Types

type Manifest

type Manifest struct {
	Files      []ManifestEntry            `json:"files"`
	AlgoID     string                     `json:"algo_id,omitempty"`
	SaltID     string                     `json:"salt_id,omitempty"`
	Signatures []signing.Signature        `json:"signatures,omitempty"`
	Extra      map[string]json.RawMessage `json:"-"`
}

func ReadManifest

func ReadManifest(path string) (Manifest, error)

func SignFile

func SignFile(path string, key signing.SigningKey) (*Manifest, error)

func SignFileCosign

func SignFileCosign(path string, keyPath string) (*Manifest, error)

func SignManifest

func SignManifest(manifest Manifest, key signing.SigningKey) (Manifest, error)

func SignManifestCosign

func SignManifestCosign(manifest Manifest, keyPath string) (Manifest, error)

func Verify

func Verify(path string, opts VerifyOpts) (*Manifest, error)

func (Manifest) MarshalJSON added in v0.6.0

func (manifest Manifest) MarshalJSON() ([]byte, error)

func (*Manifest) UnmarshalJSON added in v0.6.0

func (manifest *Manifest) UnmarshalJSON(raw []byte) error

type ManifestEntry

type ManifestEntry struct {
	Path   string                     `json:"path"`
	SHA256 string                     `json:"sha256"`
	Extra  map[string]json.RawMessage `json:"-"`
}

func (ManifestEntry) MarshalJSON added in v0.6.0

func (entry ManifestEntry) MarshalJSON() ([]byte, error)

func (*ManifestEntry) UnmarshalJSON added in v0.6.0

func (entry *ManifestEntry) UnmarshalJSON(raw []byte) error

type VerifyOpts

type VerifyOpts struct {
	VerifySignatures bool
	PublicKey        signing.PublicKey
	Cosign           signing.CosignVerifyOpts
	Strict           bool
}

Jump to

Keyboard shortcuts

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