Documentation ¶
Index ¶
- func Clean(c *hermes.Cache) func(ctx *fiber.Ctx) error
- func Delete(c *hermes.Cache) func(ctx *fiber.Ctx) error
- func Exists(c *hermes.Cache) func(ctx *fiber.Ctx) error
- func FTClean(c *hermes.Cache) func(ctx *fiber.Ctx) error
- func FTInit(c *hermes.Cache) func(ctx *fiber.Ctx) error
- func FTInitJson(c *hermes.Cache) func(ctx *fiber.Ctx) error
- func FTIsInitialized(c *hermes.Cache) func(ctx *fiber.Ctx) error
- func FTSequenceIndices(c *hermes.Cache) func(ctx *fiber.Ctx) error
- func FTSetMaxBytes(c *hermes.Cache) func(ctx *fiber.Ctx) error
- func FTSetMaxSize(c *hermes.Cache) func(ctx *fiber.Ctx) error
- func FTSetMinWordLength(c *hermes.Cache) func(ctx *fiber.Ctx) error
- func FTStorage(c *hermes.Cache) func(ctx *fiber.Ctx) error
- func FTStorageLength(c *hermes.Cache) func(ctx *fiber.Ctx) error
- func FTStorageSize(c *hermes.Cache) func(ctx *fiber.Ctx) error
- func Get(c *hermes.Cache) func(ctx *fiber.Ctx) error
- func GetAll(c *hermes.Cache) func(ctx *fiber.Ctx) error
- func Info(c *hermes.Cache) func(ctx *fiber.Ctx) error
- func InfoForTesting(c *hermes.Cache) func(ctx *fiber.Ctx) error
- func Keys(c *hermes.Cache) func(ctx *fiber.Ctx) error
- func Length(c *hermes.Cache) func(ctx *fiber.Ctx) error
- func Search(c *hermes.Cache) func(ctx *fiber.Ctx) error
- func SearchOneWord(c *hermes.Cache) func(ctx *fiber.Ctx) error
- func SearchValues(c *hermes.Cache) func(ctx *fiber.Ctx) error
- func SearchWithKey(c *hermes.Cache) func(ctx *fiber.Ctx) error
- func Set(c *hermes.Cache) func(ctx *fiber.Ctx) error
- func Values(c *hermes.Cache) func(ctx *fiber.Ctx) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Clean ¶
Clean is a function that returns a fiber context handler function for cleaning the regular cache. Parameters:
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- func(ctx *fiber.Ctx) error: A fiber context handler function that cleans the regular cache and returns a success message.
func Delete ¶
Delete is a handler function that returns a fiber context handler function for deleting a key from the cache. Parameters:
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- func(ctx *fiber.Ctx) error: A fiber context handler function that deletes a key from the cache and returns a success message or an error message if the key is not provided.
func Exists ¶
Exists is a handler function that returns a fiber context handler function for checking if a key exists in the cache. Parameters:
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- func(ctx *fiber.Ctx) error: A fiber context handler function that checks if a key exists in the cache and returns a success message with a boolean value indicating whether the key exists or an error message if the key is not provided.
func FTClean ¶
FTClean is a function that returns a fiber context handler function for cleaning the full-text cache. Parameters:
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- func(ctx *fiber.Ctx) error: A fiber context handler function that cleans the full-text cache and returns a success message or an error message if the cleaning fails.
func FTInit ¶
FTInit is a handler function that returns a fiber context handler function for initializing the full-text search cache. Parameters:
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- func(ctx *fiber.Ctx) error: A fiber context handler function that initializes the full-text search cache using the max length, max bytes, and min word length parameters provided in the query string and returns a success message or an error message if the parameters are not provided or if the initialization fails.
func FTInitJson ¶
FTInitJson is a handler function that returns a fiber context handler function for initializing the full-text search cache with a JSON object. Parameters:
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- func(ctx *fiber.Ctx) error: A fiber context handler function that initializes the full-text search cache using a JSON object, max length, max bytes, and min word length parameters provided in the query string and returns a success message or an error message if the parameters are not provided or if the initialization fails.
func FTIsInitialized ¶
FTIsInitialized is a handler function that returns a fiber context handler function for checking if the full-text search is initialized. Parameters:
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- func(ctx *fiber.Ctx) error: A fiber context handler function that checks if the full-text search is initialized and returns a success message with a boolean value indicating whether it is initialized.
func FTSequenceIndices ¶
FTSequenceIndices is a handler function that returns a fiber context handler function for sequencing the full-text storage indices. Parameters:
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- func(ctx *fiber.Ctx) error: A fiber context handler function that sequences the full-text storage indices and returns a success message or an error message if the sequencing fails.
func FTSetMaxBytes ¶
FTSetMaxBytes is a handler function that returns a fiber context handler function for setting the maximum number of bytes for full-text search. Parameters:
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- func(ctx *fiber.Ctx) error: A fiber context handler function that sets the maximum number of bytes for full-text search and returns a success message or an error message if the value is not provided or if the setting fails.
func FTSetMaxSize ¶
FTSetMaxSize is a handler function that returns a fiber context handler function for setting the maximum length for full-text search. Parameters:
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- func(ctx *fiber.Ctx) error: A fiber context handler function that sets the maximum length for full-text search and returns a success message or an error message if the value is not provided or if the setting fails.
func FTSetMinWordLength ¶
FTSetMinWordLength is a handler function that returns a fiber context handler function for setting the minimum word length for full-text search. Parameters:
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- func(ctx *fiber.Ctx) error: A fiber context handler function that sets the minimum word length for full-text search and returns a success message or an error message if the value is not provided or if the setting fails.
func FTStorage ¶
FTStorage is a handler function that returns a fiber context handler function for getting the full-text storage. Parameters:
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- func(ctx *fiber.Ctx) error: A fiber context handler function that gets the full-text storage and returns a JSON-encoded string of the data or an error message if the retrieval or encoding fails.
func FTStorageLength ¶
FTStorageLength is a handler function that returns a fiber context handler function for getting the length of the full-text storage. Parameters:
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- func(ctx *fiber.Ctx) error: A fiber context handler function that gets the length of the full-text storage and returns a success message with the length or an error message if the retrieval fails.
func FTStorageSize ¶
FTStorageSize is a handler function that returns a fiber context handler function for getting the size of the full-text storage. Parameters:
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- func(ctx *fiber.Ctx) error: A fiber context handler function that gets the size of the full-text storage and returns a success message with the size or an error message if the retrieval fails.
func Get ¶
Get is a handler function that returns a fiber context handler function for getting a value from the cache. Parameters:
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- func(ctx *fiber.Ctx) error: A fiber context handler function that gets a value from the cache using a key provided in the query string and returns a JSON-encoded string of the value or an error message if the key is not provided or if the retrieval or encoding fails.
func GetAll ¶
GetAll is a handler function that returns a fiber context handler function for getting all the data from the cache. Parameters:
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- func(ctx *fiber.Ctx) error: A fiber context handler function that gets all the data from the cache and returns a success message with a JSON-encoded string of the data or an error message if the retrieval or encoding fails.
func Info ¶
Info is a function that returns information about the cache.
Parameters:
- c: A pointer to a hermes.Cache struct representing the cache to get information from.
Returns:
- A function that takes a pointer to a fiber.Ctx struct and returns an error. The function returns information about the cache.
func InfoForTesting ¶
InfoForTesting is a function that returns information about the cache for testing purposes.
Parameters:
- c: A pointer to a hermes.Cache struct representing the cache to get information from.
Returns:
- A function that takes a pointer to a fiber.Ctx struct and returns an error. The function returns information about the cache for testing purposes.
func Keys ¶
Keys is a handler function that returns a fiber context handler function for getting all the keys from the cache. Parameters:
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- func(ctx *fiber.Ctx) error: A fiber context handler function that gets all the keys from the cache and returns a JSON-encoded string of the keys or an error message if the retrieval or encoding fails.
func Length ¶
Length is a handler function that returns a fiber context handler function for getting the length of the cache. Parameters:
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- func(ctx *fiber.Ctx) error: A fiber context handler function that gets the length of the cache and returns a success message with the length or an error message if the retrieval fails.
func Search ¶
Search is a handler function that returns a fiber context handler function for searching the cache. Parameters:
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- func(ctx *fiber.Ctx) error: A fiber context handler function that searches the cache using the query, limit, strict, and schema parameters provided in the query string and returns a JSON-encoded string of the search results or an error message if the search fails or if the parameters are not provided.
func SearchOneWord ¶
SearchOneWord is a handler function that returns a fiber context handler function for searching the cache for a single word. Parameters:
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- func(ctx *fiber.Ctx) error: A fiber context handler function that searches the cache for a single word using the query, limit, and strict parameters provided in the query string and returns a JSON-encoded string of the search results or an error message if the search fails or if the parameters are not provided.
func SearchValues ¶
SearchValues is a handler function that returns a fiber context handler function for searching the cache for values. Parameters:
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- func(ctx *fiber.Ctx) error: A fiber context handler function that searches the cache for values using the query, limit, and schema parameters provided in the query string and returns a JSON-encoded string of the search results or an error message if the search fails or if the parameters are not provided.
func SearchWithKey ¶
SearchWithKey is a handler function that returns a fiber context handler function for searching the cache with a specific key. Parameters:
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- func(ctx *fiber.Ctx) error: A fiber context handler function that searches the cache with a specific key using the query and limit parameters provided in the query string and returns a JSON-encoded string of the search results or an error message if the search fails or if the parameters are not provided.
func Set ¶
Set is a handler function that returns a fiber context handler function for setting a value in the cache. Parameters:
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- func(ctx *fiber.Ctx) error: A fiber context handler function that sets a value in the cache using the key and value parameters provided in the query string and returns a success message or an error message if the set fails or if the parameters are not provided.
func Values ¶
Values is a handler function that returns a fiber context handler function for getting all values from the cache. Parameters:
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- func(ctx *fiber.Ctx) error: A fiber context handler function that gets all values from the cache and returns a JSON-encoded string of the values or an error message if the retrieval fails.
Types ¶
This section is empty.