targz

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package targz implements targz repository importer.

Index

Constants

View Source
const (
	// RepoName contains the repository name.
	RepoName = "targz"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Archive added in v1.0.3

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

Archive holds data related to targz archive.

func (*Archive) Description added in v1.0.3

func (a *Archive) Description() string

Description provides additional description for a .tar.gz file.

func (*Archive) ID added in v1.0.3

func (a *Archive) ID() string

ID returns non-unique targz Archive ID.

func (*Archive) LocalPath added in v1.0.3

func (a *Archive) LocalPath() string

LocalPath returns local path to a targz Archive .tar.gz file.

func (*Archive) Preprocess added in v1.0.3

func (a *Archive) Preprocess() (string, error)

Preprocess extracts the contents of a .tar.gz file.

func (*Archive) QuickSHA256Hash added in v1.0.3

func (a *Archive) QuickSHA256Hash() (string, error)

QuickSHA256Hash calculates sha256 hash of .tar.gz file.

func (*Archive) RemotePath added in v1.0.3

func (a *Archive) RemotePath() string

RemotePath returns non-local path to a targz Archive .tar.gz file.

func (*Archive) RepoName added in v1.0.3

func (a *Archive) RepoName() string

RepoName returns repository name.

func (*Archive) RepoPath added in v1.0.3

func (a *Archive) RepoPath() string

RepoPath returns repository path.

type Repo

type Repo struct {
	Archives []*Archive
	// contains filtered or unexported fields
}

Repo holds data related to a targz repository.

func NewRepo

func NewRepo(path string) *Repo

NewRepo returns new instance of targz repository.

func (*Repo) DiscoverRepo

func (r *Repo) DiscoverRepo() ([]hashr.Source, error)

DiscoverRepo traverses the repository and looks for files that are related to targz base Archives.

func (*Repo) RepoName

func (r *Repo) RepoName() string

RepoName returns repository name.

func (*Repo) RepoPath

func (r *Repo) RepoPath() string

RepoPath returns repository path.

Jump to

Keyboard shortcuts

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