integrity

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDigest added in v1.7.0

func CheckDigest[E Digest](e E, digest string) error

func CompareNameDigest

func CompareNameDigest(a, b NameDigest) int

func FormatString added in v1.7.0

func FormatString(nd NameDigest) (string, error)

FormatString formats the entity as a valid "name@digest".

func GetDigest added in v1.7.0

func GetDigest[E Spec](e E) (string, error)

func HasDigest added in v1.7.0

func HasDigest(d Digest) bool

func HasName added in v1.7.0

func HasName(n Name) bool

func SetCheckDigest added in v1.7.0

func SetCheckDigest[E CheckDigestable](e E, digest string) error

func SetCheckNameDigest added in v1.8.0

func SetCheckNameDigest[E CheckDigestable](e E, name, digest string) error

func SetDigest added in v1.7.0

func SetDigest[E Digestable](e E) error

func SetName added in v1.7.0

func SetName[E Nameable](e E, name string)

func SetNameDigest added in v1.7.0

func SetNameDigest[E NameDigestable](e E, name string) error

Types

type CheckDigestable added in v1.7.0

type CheckDigestable interface {
	NameDigestable
	Digest
}

type Digest added in v1.7.0

type Digest interface {
	GetDigest() string
}

type Digestable added in v1.7.0

type Digestable interface {
	Spec
	SetDigest(string)
}

type DummySpec added in v1.8.1

type DummySpec struct{ X any }

func (DummySpec) GetSpec added in v1.8.1

func (d DummySpec) GetSpec() any

type Name added in v1.7.0

type Name interface {
	GetName() string
}

type NameDigest

type NameDigest interface {
	Name
	Digest
}

func Key added in v1.7.0

func Key[E NameDigest](e E) NameDigest

func KeyLit added in v1.7.0

func KeyLit(name, digest string) NameDigest

func ParseNameDigest

func ParseNameDigest(s string) (nameDigest NameDigest, err error)

type NameDigestable added in v1.7.0

type NameDigestable interface {
	Nameable
	Digestable
}

type Nameable added in v1.7.0

type Nameable interface {
	SetName(string)
}

type Spec added in v1.7.0

type Spec interface {
	GetSpec() any
}

Jump to

Keyboard shortcuts

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