Structs§
- Cache
Json - Host
- Json
Params - Parsed
Uri - Query
Params - Stopwatch
- A stopwatch structure for measuring elapsed time.
Enums§
Functions§
- compress
- Compress data using the specified algorithm.
- decompress
- Decompress data using the specified algorithm.
- float_
to_ fixed - Formats a floating-point number with specified precision
- from_
timestamp - Converts a Unix timestamp to a formatted local datetime string
- generate_
device_ id_ cookie - Generates a new device ID cookie
- get_
device_ id_ from_ cookie - Retrieves device ID from cookies
- get_env
- get_
header_ value - Retrieves a header value as a String
- get_
map_ string - Extracts a string value from a JSON map by key
- insert_
headers - Inserts multiple HTTP headers into a HeaderMap
- is_
development - Whether it is a development environment Used to determine whether it is a local development environment
- is_
production - Whether it is a production environment
- is_test
- Whether it is a test environment
- json_
get - Extracts a string value from JSON data by key
- json_
get_ strings - Extracts multiple string values from JSON data by keys
- nanoid
- Generates a NanoID string of specified length
- now
- Returns the current local time as a formatted string
- parse_
uri - read_
http_ body - Reads and collects an HTTP body into Bytes
- set_
header_ if_ not_ exist - Sets an HTTP header only if it doesn’t already exist
- set_
no_ cache_ if_ not_ exist - Sets Cache-Control: no-cache header if not already set
- sha256
- Computes the SHA-256 hash of the input data
- sign_
hash - Computes the SHA-256 hash of the input data and signs it with the secret key
- timestamp
- Returns the current Unix timestamp in seconds
- timestamp_
hash - Computes the SHA-256 hash of the input data and signs it with the secret key
- uuid
- Generates a UUIDv7 string
- validate_
sign_ hash - Validates the signature of the input data
- validate_
timestamp_ hash - Validates the signature of the input data