minirepo

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package minirepo provides a client for minirepo repositories

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Minirepo

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

Minirepo client

func NewRepoClient

func NewRepoClient(localCache, url, key string) *Minirepo

NewRepoClient creates a new minirepo client.

  • localCache is expected to contain a directory where the repository downloads should be cached
  • url is expected to contain a repositories upstream
  • key is expected to contain a full ASCII-armored GPG public key which was used for signing the metadata

func (*Minirepo) GetFile

func (m *Minirepo) GetFile(filePath ...string) (string, error)

GetFile returns a local path to the file requested if possible

func (*Minirepo) GetFileLatest

func (m *Minirepo) GetFileLatest(filePath ...string) (bool, string, error)

GetFileLatest returns the *latest* version of a file, that is, it deletes a local copy before download, should it exist

func (*Minirepo) TryUpdate

func (m *Minirepo) TryUpdate() (bool, error)

TryUpdate will try to update the repository and load the metadata if either the repository was updated or a local copy is available.

Directories

Path Synopsis
Package types contains the types visible inside a repository (to avoid cyclic includes)
Package types contains the types visible inside a repository (to avoid cyclic includes)

Jump to

Keyboard shortcuts

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