Documentation
¶
Index ¶
- Variables
- func Compare[T archive.Archive, U Checksums[T]](ctx context.Context, localArtifact artifact.Local[T], ...) error
- func Compute[T archive.Archive](ctx context.Context, d artifact.Local[T]) (string, error)
- func Extract[T archive.Archive, U Checksums[T]](ctx context.Context, c artifact.Local[U], a T) (string, error)
- type Checksums
- type Executable
- type Source
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrChecksumMismatch = errors.New("checksum does not match") ErrChecksumsUnsupported = errors.New("version precedes checksums") )
View Source
var ( ErrChecksumNotFound = errors.New("checksum not found") ErrConflictingChecksum = errors.New("conflicting checksum") ErrUnrecognizedFormat = errors.New("unrecognized format") )
View Source
var ErrUnsupportedArtifact = errors.New("unsupported artifact")
Functions ¶
func Compare ¶
func Compare[T archive.Archive, U Checksums[T]]( ctx context.Context, localArtifact artifact.Local[T], localChecksums artifact.Local[U], ) error
Compare takes a local executable archive and a local checksums file for executable archives and validates that the executable archive's checksum matches the expected value.
Types ¶
type Checksums ¶
type Checksums[T artifact.Artifact] interface { artifact.Artifact artifact.Versioned // contains filtered or unexported methods }
An interface for an 'Artifact' representing a checksums file.
type Executable ¶
type Executable checksums
An 'Artifact' representing a Godot source archive checksums file.
func NewExecutable ¶
func NewExecutable(v version.Version) (Executable, error)
Returns a new 'Executable' struct after validating the Godot version.
func (Executable) Name ¶
func (ex Executable) Name() string
func (Executable) Version ¶
func (ex Executable) Version() version.Version
Click to show internal directories.
Click to hide internal directories.