Documentation
¶
Overview ¶
Copyright 2022-2026 Reto Gantenbein SPDX-License-Identifier: Apache-2.0
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheConfig ¶
type FileCache ¶
type FileCache interface {
// Remove cached file for given URL
DeleteFile(string) error
// Return file system path to cached file for given URL. If the URL points
// to a path outside the cache directory return an error.
GetFilePath(string) (string, error)
// Returns a list of file suffixes that will be cached
GetFileSuffixes() []string
// Return if URL is supposed to be cached
IsCacheCandidate(string) bool
// Return if file exists in cache for given URL
IsCached(string) bool
// Save buffer as file in cache for given URL
SaveToDisk(string, *bytes.Buffer, time.Time) error
}
func New ¶
func New(cfg *CacheConfig) FileCache
Click to show internal directories.
Click to hide internal directories.