Documentation ¶
Index ¶
- Constants
- func GetGUID(path string) (string, error)
- func GetGUIDFromConfigFile(path string) (string, error)
- func NormalizeImageName(image string) (string, error)
- func ReadRepos(repoUrls ...string) (map[string]Config, error)
- func ReadReposFromPath(repoFilePaths ...string) (map[string]Config, error)
- type Checksum
- type Config
- type GitCommitObject
- type ImageInfo
- type KeyPair
- func (conf *KeyPair) GetVerificationInfo() *VerificationInfo
- func (conf *KeyPair) InitializeRepository(repoPath string) error
- func (conf *KeyPair) Sign(data []byte) (string, error)
- func (conf *KeyPair) SignImages(repoPath string, annotations map[string]string) error
- func (conf *KeyPair) VerifyImage(image string) error
- type Keyless
- func (conf *Keyless) GetVerificationInfo() *VerificationInfo
- func (conf *Keyless) InitializeRepository(repoPath string) error
- func (conf *Keyless) Sign(msg []byte) (string, error)
- func (conf *Keyless) SignImages(repoPath string, annotations map[string]string) error
- func (conf *Keyless) VerifyImage(image string) error
- type Ledger
- type LedgerEntry
- type VerificationInfo
Constants ¶
View Source
const ( CONFIG_MODE_KEYPAIR = "keypair" CONFIG_MODE_KEYLESS = "keyless" )
View Source
const ( OICD_ISSUER = "https://oauth2.sigstore.dev/auth" REKOR_URL = "https://rekor.sigstore.dev" )
View Source
const CONFIG_FILE_NAME = "sigrun-config.json"
View Source
const LEDGER_FILE_NAME = "sigrun-ledger.json"
Variables ¶
This section is empty.
Functions ¶
func GetGUIDFromConfigFile ¶
func NormalizeImageName ¶
Types ¶
type Checksum ¶
func NewChecksum ¶
type Config ¶
type Config interface { InitializeRepository(repoPath string) error SignImages(repoPath string, annotations map[string]string) error Sign([]byte) (string, error) GetVerificationInfo() *VerificationInfo VerifyImage(image string) error }
TODO Improper abstraction - too many things in common. Abstract only what is needed.
func GetVerificationConfigFromVerificationInfo ¶
func GetVerificationConfigFromVerificationInfo(info *VerificationInfo) Config
func ReadRepositoryConfig ¶
type GitCommitObject ¶
type ImageInfo ¶
type ImageInfo struct { // Registry is the URL address of the image registry e.g. `docker.io` Registry string `json:"registry,omitempty"` // Name is the image name portion e.g. `busybox` Name string `json:"name"` // Path is the repository path and image name e.g. `some-repository/busybox` Path string `json:"path"` // Tag is the image tag e.g. `v2` Tag string `json:"tag,omitempty"` // Digest is the image digest portion e.g. `sha256:128c6e3534b842a2eec139999b8ce8aa9a2af9907e2b9269550809d18cd832a3` Digest string `json:"digest,omitempty"` }
type KeyPair ¶
func NewKeypairConfig ¶
func (*KeyPair) GetVerificationInfo ¶
func (conf *KeyPair) GetVerificationInfo() *VerificationInfo
func (*KeyPair) InitializeRepository ¶
func (*KeyPair) SignImages ¶
func (*KeyPair) VerifyImage ¶
type Keyless ¶
func NewKeylessConfig ¶
func (*Keyless) GetVerificationInfo ¶
func (conf *Keyless) GetVerificationInfo() *VerificationInfo
func (*Keyless) InitializeRepository ¶
func (*Keyless) SignImages ¶
func (*Keyless) VerifyImage ¶
type Ledger ¶
type Ledger struct {
Entries []*LedgerEntry
}
type LedgerEntry ¶
Click to show internal directories.
Click to hide internal directories.