Documentation
¶
Overview ¶
Package getter provides a generalize tool for fetching data by scheme.
This provides a method by which the plugin system can load arbitrary protocol handlers based upon a URL scheme.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Constructor ¶
type Constructor func(URL, CertFile, KeyFile, CAFile string) (Getter, error)
Constructor is the function for every getter which creates a specific instance according to the configuration
type Getter ¶
type Getter interface {
//Get file content by url string
Get(url string) (*bytes.Buffer, error)
}
Getter is an interface to support GET to the specified URL.
type Provider ¶
type Provider struct {
Schemes []string
New Constructor
}
Provider represents any getter and the schemes that it supports.
For example, an HTTP provider may provide one getter that handles both 'http' and 'https' schemes.
type Providers ¶
type Providers []Provider
Providers is a collection of Provider objects.
Click to show internal directories.
Click to hide internal directories.