Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorProviderNoSuch = errors.New("[Provider] No Such Provider.") ErrorProviderInvalid = errors.New("[Provider] Provider Invalid.") ErrorProviderMissing = errors.New("[Provider] Please specifiy a provider.") ErrorLabelEmpty = errors.New("[Provider] The Label is empty.") ErrorLabelInvalid = errors.New("[Provider] Invalid Label. Require 'provider:location package'") )
Functions ¶
func SetDefault ¶
Types ¶
type Provider ¶
type Provider interface { //This method sets the location when it applies. //Return an error on invalid location, ignore if it //doesn't applies. SetLocation(string) error //This method parses a Label //into Locatoin and Version, returns an error if //invalid Label. Parse(string) (*Label, error) //Used for remote providers to update their repository list. //Providers MUST attempt to reconnect and only return an error if connection //fails after reasonable number of retrys. Update() error //List all packages, accepts a filter. Packages(string) ([]string, error) //List all version of a package, accepts a product name. Versions(string) ([]string, error) //Fetches a specific package. Fetch(*Label) (io.Reader, error) // Provides the location for the source of a specific version. // The location must be a location on the local file system, preferably under /tmp/ when possible. // It is the stevenhong: responsiblity of the provider to fetch and extract the source. Source(*Label) (string, error) }
Click to show internal directories.
Click to hide internal directories.