Documentation ¶
Index ¶
- Constants
- func NewFS(cfgMap map[string]interface{}, opts ...Option) (qfs.Filesystem, error)
- func NewFilesystem(_ context.Context, cfgMap map[string]interface{}) (qfs.Filesystem, error)
- type FS
- func (httpfs *FS) Delete(ctx context.Context, path string) (err error)
- func (httpfs *FS) Get(ctx context.Context, path string) (qfs.File, error)
- func (https *FS) Has(ctx context.Context, path string) (bool, error)
- func (httpfs *FS) Put(ctx context.Context, file qfs.File) (resultPath string, err error)
- func (httpfs *FS) Type() string
- type FSConfig
- type HTTPResFile
- func (rf *HTTPResFile) Close() error
- func (rf *HTTPResFile) FileName() string
- func (rf *HTTPResFile) FullPath() string
- func (rf *HTTPResFile) IsDirectory() bool
- func (rf *HTTPResFile) MediaType() string
- func (rf *HTTPResFile) ModTime() time.Time
- func (rf *HTTPResFile) NextFile() (qfs.File, error)
- func (rf *HTTPResFile) Read(p []byte) (int, error)
- type Option
Constants ¶
const FilestoreType = "http"
FilestoreType uniquely identifies this filestore
Variables ¶
This section is empty.
Functions ¶
func NewFS ¶
func NewFS(cfgMap map[string]interface{}, opts ...Option) (qfs.Filesystem, error)
NewFS creates a new local filesytem PathResolver
func NewFilesystem ¶ added in v0.4.2
NewFilesystem creates a new http filesystem PathResolver
Types ¶
type FS ¶
type FS struct {
// contains filtered or unexported fields
}
FS is a implementation of qfs.PathResolver that uses the local filesystem
func (*FS) Has ¶ added in v0.6.0
Has returns whether the store has a File with the key https has no caching strategy, so it'll always return false
type FSConfig ¶
FSConfig adjusts the behaviour of an FS instance
func DefaultFSConfig ¶
func DefaultFSConfig() *FSConfig
DefaultFSConfig is the configuration state with no additional options consumers of this package typically don't need to use this
type HTTPResFile ¶
type HTTPResFile struct {
// contains filtered or unexported fields
}
HTTPResFile implements qfs.File with a filesystem file
func (*HTTPResFile) Close ¶
func (rf *HTTPResFile) Close() error
Close proxies to the response body reader
func (*HTTPResFile) FileName ¶
func (rf *HTTPResFile) FileName() string
FileName returns a filename associated with this file
func (*HTTPResFile) FullPath ¶
func (rf *HTTPResFile) FullPath() string
FullPath returns the full path used when adding this file
func (*HTTPResFile) IsDirectory ¶
func (rf *HTTPResFile) IsDirectory() bool
IsDirectory satisfies the qfs.File interface
func (*HTTPResFile) MediaType ¶ added in v0.4.2
func (rf *HTTPResFile) MediaType() string
MediaType gets the value of the Content-Type response header
func (*HTTPResFile) ModTime ¶ added in v0.4.2
func (rf *HTTPResFile) ModTime() time.Time
ModTime gets the last time of modification. currently not implemented for HTTP TODO (b5) - finish