data

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DankDir  = ".dank" // DankDir is the directory where dank-mcp stores its data.
	CacheDir = "cache" // CacheDir is the directory under DankDir where dank-mcp stores its cache files.
)

Variables

This section is empty.

Functions

func CheckCacheFile

func CheckCacheFile(filename string, maxAge time.Duration) ([]byte, error)

ChaekCacheFile checks DankDir/cache for a file. Returns its bytes and error, if any. If the file is not found, it returns an error. If the file is older than maxAge, it returns an error.

func GetDankCacheDir

func GetDankCacheDir() string

GetDankCacheDir returns the path to the CacheDir directory.

func GetDankCachePathname

func GetDankCachePathname(filename string) string

GetDankCachePathname returns the path to the given filename within the CacheDir.

func GetDankDir

func GetDankDir() string

GetDankDir returns the path to the DankDir directory.

func MakeCacheFile

func MakeCacheFile(filename string) (*os.File, error)

MakeCacheFile creates a cache file in the DankDir/cache directory and returns its handles. Returns nil with any error.

func SetDankRoot

func SetDankRoot(root string)

SetDankRoot sets the root directory for dank-mcp data.

Types

This section is empty.

Directories

Path Synopsis
us
ct

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL