Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTTPProvider ¶
Provides access to resources through a http.Client.
func (*HTTPProvider) NewInstance ¶
func (me *HTTPProvider) NewInstance(urlStr string) (r Instance, err error)
type Instance ¶
type Instance interface { Get() (io.ReadCloser, error) Put(io.Reader) error Stat() (os.FileInfo, error) ReadAt([]byte, int64) (int, error) WriteAt([]byte, int64) (int, error) Delete() error }
An Instance represents the content at some location accessed through some Provider. It's the data at some URL.
type OSFileProvider ¶
type OSFileProvider struct{}
Provides access to resources through the native OS filesystem.
func (OSFileProvider) NewInstance ¶
func (me OSFileProvider) NewInstance(filePath string) (r Instance, err error)
type TranslatedProvider ¶
type TranslatedProvider struct { // The underlying Provider. BaseProvider Provider // Some location used in calculating final locations. BaseLocation string // Function that takes BaseLocation, and the caller location and returns // the location to be used with the BaseProvider. JoinLocations func(base, rel string) string }
TranslatedProvider manipulates resource locations, so as to allow sandboxing, or relative paths for example.
func (TranslatedProvider) NewInstance ¶
func (me TranslatedProvider) NewInstance(rel string) (Instance, error)
Click to show internal directories.
Click to hide internal directories.