Documentation
¶
Index ¶
- func DirInfo(name string, modTime time.Time) fs.FileInfo
- func FileInfo(name string, size int64, mode fs.FileMode, modTime time.Time, ...) fs.FileInfo
- func FileInfoDirEntry(fi fs.FileInfo) fs.DirEntry
- func SubURL(base *url.URL, name string) (*url.URL, error)
- func ValidPath(name string) bool
- type ContentTypeFileInfo
- type WithContexter
- type WithHTTPClienter
- type WithHeaderer
- type WithIMDSFSer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DirInfo ¶
DirInfo creates a fs.FileInfo for a directory with the given name. Use FileInfo to set other values.
func FileInfo ¶
func FileInfo(name string, size int64, mode fs.FileMode, modTime time.Time, contentType string) fs.FileInfo
FileInfo creates a static fs.FileInfo with the given properties. The result is also a fs.DirEntry and can be safely cast.
func FileInfoDirEntry ¶
FileInfoDirEntry adapts a fs.FileInfo into a fs.DirEntry. If it doesn't already implement fs.DirEntry, it will be wrapped to always return the same fs.FileInfo.
Types ¶
type ContentTypeFileInfo ¶
ContentTypeFileInfo is an fs.FileInfo that can also report its content type
type WithContexter ¶
WithContexter is an fs.FS that can be configured with a custom context
type WithHTTPClienter ¶
WithHTTPClienter is an fs.FS that can be configured with a custom http.Client
type WithHeaderer ¶
WithHeaderer is an fs.FS that can be configured to send a custom http.Header
type WithIMDSFSer ¶ added in v0.2.1
WithIMDSFSer overrides the IMDS filesystem used by fs, if the filesystem supports it (i.e. has a WithIMDSFS method). This can be used for overriding the IMDS filesystem used by the fs to discover the region.
Directories
¶
Path | Synopsis |
---|---|
Package env contains functions that retrieve data from the environment
|
Package env contains functions that retrieve data from the environment |