project

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Name() string
	Version() string
	RetrievalFunc() retrieval.Backend
	SourceLocation() string
	LocalLocation() string
	SetLocalLocation(string) Backend
}

Backend is the minimal interface of a project.

type BackendConfig

type BackendConfig struct {
	// Name is the name or an identifier of the project.
	Name string
	// Version is the current version of the project (e.g., semantic version, Git commit hash, etc.).
	Version string
	// SourceLocation is where (e.g., local file path, remote url, etc.) the project
	// can be found and retrieved from.
	SourceLocation string
	// RetrievalFunc is the function that was or can be used to retrieve a project.
	// Examples of retrieval funcitons could be git or a local copy.
	//
	// TODO: thought - Is the Retrival func for how they _retrieved_ the project
	// or, how someone _can retrieve_ the project?
	//
	// I think it is the latter because Search returns a project, but does not
	// retrieve the project.
	RetrievalFunc retrieval.Backend

	// Config is a way to set additional, optional and/or secondary configuration values.
	Config map[string]string
}

BackendConfig is the configuration parameters for a project backend.

type Factory

type Factory func(context.Context, *BackendConfig) (Backend, error)

Factory is a factory function for creating projects.

Jump to

Keyboard shortcuts

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