repository

package
v0.6.18 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository struct {
	URL     string          `yaml:"url"`
	Branch  string          `yaml:"branch"`
	Path    string          `yaml:"path"`
	Repo    *git.Repository `yaml:"repo"`
	Tree    *object.Tree    `yaml:"tree"`
	KeyRing []string
	// this is used to determine if statement signatures have to be checked
	Strict bool
	Rank   int
}

A Repository is a source of Statements

func NewRepository

func NewRepository(URL string, branch string, strict bool, rank int, targetDir string) Repository

NewRepository creates a new client and updates the appropriate path

func (*Repository) Fetch

func (r *Repository) Fetch(verbose bool)

Fetch creates and initializes a git repository if required from a given url and directory path. The clone is storage based and not memory based in order to avoid multiple clones required for consecutive executions

func (*Repository) FetchKeyRing

func (r *Repository) FetchKeyRing()

FetchKeyRing gets all available public GPG keys

func (*Repository) Pull

func (r *Repository) Pull()

Pull attempts to pull the latest version of the origin remote

func (*Repository) Statements

func (r *Repository) Statements() ([]model.Statement, error)

Statements returns a slice of statements from the commit tree of the repository

func (*Repository) VerifyCommit

func (r *Repository) VerifyCommit(o *object.Commit) bool

VerifyCommit checks if the commit signature corresponds to any available keys

Jump to

Keyboard shortcuts

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