repo

package
v0.0.0-...-cc99bfc Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: GPL-3.0, GPL-3.0-or-later Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// UpstreamTypeLocal repository upstream type
	UpstreamTypeLocal = "local"
	// UpstreamTypeDirectory repository upstream type
	UpstreamTypeDirectory = "directory"
	// UpstreamTypeGitHub repository upstream type
	UpstreamTypeGitHub = "github-release"
	// UpstreamTypeErcoleRepo repository upstream type
	UpstreamTypeErcoleRepo = "ercole-reposervice"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactInfo

type ArtifactInfo struct {
	Repository            string
	Installed             bool `json:"-"`
	Version               string
	ReleaseDate           string
	Filename              string
	Name                  string
	OperatingSystemFamily string
	OperatingSystem       string
	Arch                  string
	UpstreamType          string
	UpstreamInfo          map[string]interface{}
}

ArtifactInfo contains info about all files in repository

func (*ArtifactInfo) DirectoryPath

func (artifact *ArtifactInfo) DirectoryPath(distributedFiles string) string

DirectoryPath get the path of the directory containing the artifact file

func (*ArtifactInfo) Download

func (artifact *ArtifactInfo) Download(verbose bool, dest string)

Download the artifact

func (*ArtifactInfo) FilePath

func (artifact *ArtifactInfo) FilePath(distributedFiles string) string

FilePath get the path of the artifact file

func (*ArtifactInfo) FullName

func (artifact *ArtifactInfo) FullName() string

FullName return the fullname of the file

func (*ArtifactInfo) Install

func (artifact *ArtifactInfo) Install(verbose bool, distributedFiles string)

Install the artifact

func (*ArtifactInfo) IsInstalled

func (artifact *ArtifactInfo) IsInstalled(distributedFiles string) bool

IsInstalled return true if file is detected in the distribution directory

func (*ArtifactInfo) SetInfoFromFileName

func (artifact *ArtifactInfo) SetInfoFromFileName(filename string) error

SetInfoFromFileName sets to fileInfo informations taken from filename

func (*ArtifactInfo) Uninstall

func (artifact *ArtifactInfo) Uninstall(verbose bool, distributedFiles string)

Uninstall the artifact

type Index

type Index []*ArtifactInfo

Index is the index of all artifact in a repository

func ReadIndexFromFile

func ReadIndexFromFile(distributedFiles string) Index

ReadIndexFromFile read index from the filesystem

func (Index) SaveOnFile

func (idx Index) SaveOnFile(distributedFiles string)

SaveOnFile save index on the filesystem

func (*Index) SearchArtifactByArg

func (idx *Index) SearchArtifactByArg(arg string) *ArtifactInfo

SearchArtifactByArg get *ArtifactInfo by string

func (*Index) SearchLatestArtifactByRepositoryAndName

func (idx *Index) SearchLatestArtifactByRepositoryAndName(repo string, name string) *ArtifactInfo

SearchLatestArtifactByRepositoryAndName get latest version of a *ArtifactInfo by repo and name

func (Index) SortArtifactInfo

func (idx Index) SortArtifactInfo()

SortArtifactInfo sort artifact information inside index

Jump to

Keyboard shortcuts

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