Skip to main content

gtars_bbcache/
consts.rs

1//! Constants for bbcache configuration and file organization.
2//!
3//! This module defines environment variable names, file extensions, directory names,
4//! and command strings used throughout the bbcache system.
5
6// Environment variable names
7
8/// Environment variable name for setting the cache directory location.
9///
10/// When set, this overrides the default cache location (`~/.bbcache/`).
11///
12/// # Example
13///
14/// ```bash
15/// export BBCLIENT_CACHE=/custom/cache/path
16/// ```
17pub const BBCLIENT_CACHE_ENV: &str = "BBCLIENT_CACHE";
18
19/// Environment variable name for setting the BEDbase API endpoint.
20///
21/// When set, this overrides the default API endpoint (`https://api.bedbase.org`).
22///
23/// # Example
24///
25/// ```bash
26/// export BEDBASE_API=https://custom.bedbase.org
27/// ```
28pub const BEDBASE_API_ENV: &str = "BEDBASE_API";
29
30// Directory structure constants
31
32/// Default subdirectory name for storing individual BED files.
33///
34/// BED files are stored in `<cache_folder>/bedfiles/`.
35pub const DEFAULT_BEDFILE_SUBFOLDER: &str = "bedfiles";
36
37/// Default subdirectory name for storing BED set metadata files.
38///
39/// BED set files are stored in `<cache_folder>/bedsets/`.
40pub const DEFAULT_BEDSET_SUBFOLDER: &str = "bedsets";
41
42// File extension constants
43
44/// Default file extension for cached BED files.
45///
46/// BED files are stored compressed as gzipped files with the `.bed.gz` extension.
47pub const DEFAULT_BEDFILE_EXT: &str = ".bed.gz";
48
49/// Default file extension for BED set metadata files.
50///
51/// BED sets are stored as plain text files with the `.txt` extension,
52/// containing a newline-separated list of BED file identifiers.
53pub const DEFAULT_BEDSET_EXT: &str = ".txt";