Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidURL is returns when the URL of the remote file is not a URL // with an HTTPS scheme. ErrInvalidURL = errors.New("invalid url") // ErrUnsuccessfulRequest is returned when the ErrUnsuccessfulRequest = errors.New("unsuccessful request") )
View Source
var ErrBadTargetFile = errors.New("target file should be a filename not a directory")
ErrBadTargetFile is returned when the target file is not a hint for a file but a directory.
Functions ¶
func IsRemoteFile ¶
Types ¶
type Loader ¶
type Loader interface { // Root returns the root location for this Loader. Path() string // Load returns the bytes read from the location or an error. Load(ctx context.Context) ([]byte, error) }
Loader is an interface implemented by a struct that can resolve a path or a URI and return the contents as a byte slice.
Click to show internal directories.
Click to hide internal directories.