installer

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcChecksum

func CalcChecksum(r io.Reader, alg string) ([]byte, error)

func CalcFileChecksum

func CalcFileChecksum(path string, alg string) ([]byte, error)

func DetectChecksumAlgorithm added in v0.2.0

func DetectChecksumAlgorithm(checksum []byte) string

func NewHasher added in v0.2.0

func NewHasher(alg string) hash.Hash

Types

type ChecksumEntry added in v0.2.0

type ChecksumEntry struct {
	Checksum []byte
	Filename string
}

type Checksums added in v0.2.0

type Checksums struct {
	Algorithm string
	Entries   []*ChecksumEntry
}

func ReadFileChecksums

func ReadFileChecksums(algorithm string, r io.Reader) (*Checksums, error)

func ReadFileChecksumsFromFile

func ReadFileChecksumsFromFile(algorithm string, path string) (*Checksums, error)

func (*Checksums) Check added in v0.2.0

func (checksums *Checksums) Check(directory string) (int, error)

type Expecter

type Expecter struct {
	// contains filtered or unexported fields
}

func NewExpecter

func NewExpecter(s string) *Expecter

func (*Expecter) ExpectString

func (expecter *Expecter) ExpectString(s string) bool

func (*Expecter) ExpectStrings

func (expecter *Expecter) ExpectStrings(ss []string) bool

func (*Expecter) IsEmpty

func (expecter *Expecter) IsEmpty() bool

func (*Expecter) Matched

func (expecter *Expecter) Matched() string

func (*Expecter) PeekString

func (expecter *Expecter) PeekString(s string) bool

func (*Expecter) PeekStrings

func (expecter *Expecter) PeekStrings(ss []string) bool

type Installer added in v0.2.0

type Installer struct {
	// contains filtered or unexported fields
}

func NewInstaller added in v0.2.0

func NewInstaller(baseDirectory string, githubClient *github.Client) *Installer

func (*Installer) Install added in v0.2.0

func (installer *Installer) Install(packageSpec string) (bool, error)

type PackageSpec

type PackageSpec struct {
	Owner   string
	Project string
	Version string
}

func ParsePackageSpec

func ParsePackageSpec(packageSpec string) (*PackageSpec, error)

func (*PackageSpec) String added in v0.2.0

func (pkgSpec *PackageSpec) String() string

Jump to

Keyboard shortcuts

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