Documentation
¶
Index ¶
- func Clean(_ *utils.Params, c *hermes.Cache) []byte
- func Delete(p *utils.Params, c *hermes.Cache) []byte
- func Exists(p *utils.Params, c *hermes.Cache) []byte
- func FTClean(_ *utils.Params, c *hermes.Cache) []byte
- func FTInit(p *utils.Params, c *hermes.Cache) []byte
- func FTInitJson(p *utils.Params, c *hermes.Cache) []byte
- func FTIsInitialized(_ *utils.Params, c *hermes.Cache) []byte
- func FTSequenceIndices(_ *utils.Params, c *hermes.Cache) []byte
- func FTSetMaxBytes(p *utils.Params, c *hermes.Cache) []byte
- func FTSetMaxSize(p *utils.Params, c *hermes.Cache) []byte
- func FTStorage(_ *utils.Params, c *hermes.Cache) []byte
- func FTStorageLength(_ *utils.Params, c *hermes.Cache) []byte
- func FTStorageSize(_ *utils.Params, c *hermes.Cache) []byte
- func Get(p *utils.Params, c *hermes.Cache) []byte
- func GetAll(_ *utils.Params, c *hermes.Cache) []byte
- func Info(_ *utils.Params, c *hermes.Cache) []byte
- func InfoForTesting(_ *utils.Params, c *hermes.Cache) []byte
- func Keys(_ *utils.Params, c *hermes.Cache) []byte
- func Length(_ *utils.Params, c *hermes.Cache) []byte
- func Search(p *utils.Params, c *hermes.Cache) []byte
- func SearchOneWord(p *utils.Params, c *hermes.Cache) []byte
- func SearchValues(p *utils.Params, c *hermes.Cache) []byte
- func SearchWithKey(p *utils.Params, c *hermes.Cache) []byte
- func Set(p *utils.Params, c *hermes.Cache) []byte
- func Values(_ *utils.Params, c *hermes.Cache) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Clean ¶
Clean is a handler function that returns a fiber context handler function for cleaning the cache. Parameters:
- _ (*utils.Params): A pointer to a utils.Params struct (unused).
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- []byte: A JSON-encoded byte slice containing a success message or an error message if the cleaning fails.
func Delete ¶
Delete is a handler function that returns a fiber context handler function for deleting a key from the cache. Parameters:
- p (*utils.Params): A pointer to a utils.Params struct.
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- []byte: A JSON-encoded byte slice containing a success message or an error message if the key is not provided or the deletion fails.
func Exists ¶
Exists is a handler function that returns a fiber context handler function for checking if a key exists in the cache. Parameters:
- p (*utils.Params): A pointer to a utils.Params struct.
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- []byte: A JSON-encoded byte slice containing a boolean value indicating whether the key exists in the cache or an error message if the key is not provided.
func FTClean ¶
FTClean is a handler function that returns a fiber context handler function for cleaning the full-text storage. Parameters:
- _ (*utils.Params): A pointer to a utils.Params struct (unused).
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- []byte: A JSON-encoded byte slice containing 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:
- p (*utils.Params): A pointer to a utils.Params struct.
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- []byte: A JSON-encoded byte slice containing a success message or an error message 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:
- p (*utils.Params): A pointer to a utils.Params struct.
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- []byte: A JSON-encoded byte slice containing a success message or an error message if the initialization fails.
func FTIsInitialized ¶
FTIsInitialized is a handler function that returns a fiber context handler function for checking if the full-text storage is initialized. Parameters:
- _ (*utils.Params): A pointer to a utils.Params struct (unused).
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- []byte: A JSON-encoded byte slice containing a boolean value indicating whether the full-text storage is initialized.
func FTSequenceIndices ¶
FTSequenceIndices is a handler function that returns a fiber context handler function for sequencing the full-text storage indices. Parameters:
- _ (*utils.Params): A pointer to a utils.Params struct (unused).
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- []byte: A JSON-encoded byte slice containing 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 the full-text storage. Parameters:
- p (*utils.Params): A pointer to a utils.Params struct.
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- []byte: A JSON-encoded byte slice containing a success message or an error message if the value is invalid or the setting fails.
func FTSetMaxSize ¶
FTSetMaxSize is a handler function that returns a fiber context handler function for setting the maximum length for the full-text storage. Parameters:
- p (*utils.Params): A pointer to a utils.Params struct.
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- []byte: A JSON-encoded byte slice containing a success message or an error message if the value is invalid or the setting fails.
func FTStorage ¶
FTStorage is a handler function that returns a fiber context handler function for retrieving the full-text storage. Parameters:
- _ (*utils.Params): A pointer to a utils.Params struct (unused).
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- []byte: A JSON-encoded byte slice containing the full-text storage or an error message if the retrieval fails.
func FTStorageLength ¶
FTStorageLength is a handler function that returns a fiber context handler function for retrieving the length of the full-text storage. Parameters:
- _ (*utils.Params): A pointer to a utils.Params struct (unused).
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- []byte: A JSON-encoded byte slice containing the length of the full-text storage or an error message if the retrieval fails.
func FTStorageSize ¶
FTStorageSize is a handler function that returns a fiber context handler function for retrieving the size of the full-text storage. Parameters:
- _ (*utils.Params): A pointer to a utils.Params struct (unused).
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- []byte: A JSON-encoded byte slice containing the size of the full-text storage or an error message if the retrieval fails.
func Get ¶
Get is a handler function that returns a fiber context handler function for retrieving a key from the cache. Parameters:
- p (*utils.Params): A pointer to a utils.Params struct.
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- []byte: A JSON-encoded byte slice containing the value of the key or an error message if the key is not provided or the retrieval fails.
func GetAll ¶
GetAll is a handler function that returns a fiber context handler function for retrieving all data from the cache. Parameters:
- _ (*utils.Params): A pointer to a utils.Params struct (unused).
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- []byte: A JSON-encoded byte slice containing all data from the cache or an error message if the retrieval fails.
func Info ¶
Info is a function that returns information about the cache.
Parameters:
- _ : A pointer to a utils.Params struct representing the parameters of the request. This parameter is ignored.
- c: A pointer to a hermes.Cache struct representing the cache to get information from.
Returns:
- A byte slice representing the information about the cache.
func InfoForTesting ¶
InfoForTesting is a function that returns information about the cache for testing purposes.
Parameters:
- _ : A pointer to a utils.Params struct representing the parameters of the request. This parameter is ignored.
- c: A pointer to a hermes.Cache struct representing the cache to get information from.
Returns:
- A byte slice representing the information about the cache for testing purposes.
func Keys ¶
Keys is a handler function that returns a fiber context handler function for retrieving all keys from the cache. Parameters:
- _ (*utils.Params): A pointer to a utils.Params struct (unused).
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- []byte: A JSON-encoded byte slice containing all keys from the cache or an error message if the retrieval fails.
func Length ¶
Length is a handler function that returns a fiber context handler function for retrieving the length of the cache. Parameters:
- _ (*utils.Params): A pointer to a utils.Params struct (unused).
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- []byte: A JSON-encoded byte slice containing the length of the cache.
func Search ¶
Search is a handler function that returns a fiber context handler function for searching the cache for a query. Parameters:
- p (*utils.Params): A pointer to a utils.Params struct.
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- []byte: A JSON-encoded byte slice containing the search results or an error message if the search fails.
func SearchOneWord ¶
SearchOneWord is a handler function that returns a fiber context handler function for searching the cache for a single word query. Parameters:
- p (*utils.Params): A pointer to a utils.Params struct.
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- []byte: A JSON-encoded byte slice containing the search results or an error message if the search fails.
func SearchValues ¶
SearchValues is a handler function that returns a fiber context handler function for searching the cache for a query in values. Parameters:
- p (*utils.Params): A pointer to a utils.Params struct.
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- []byte: A JSON-encoded byte slice containing the search results or an error message if the search fails.
func SearchWithKey ¶
SearchWithKey is a handler function that returns a fiber context handler function for searching the cache for a query with a specific key. Parameters:
- p (*utils.Params): A pointer to a utils.Params struct.
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- []byte: A JSON-encoded byte slice containing the search results or an error message if the search fails.
func Set ¶
Set is a handler function that returns a fiber context handler function for setting a value in the cache. Parameters:
- p (*utils.Params): A pointer to a utils.Params struct.
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- []byte: A JSON-encoded byte slice containing a success message or an error message if the set operation fails.
func Values ¶
Values is a handler function that returns a fiber context handler function for retrieving all values from the cache. Parameters:
- _ (*utils.Params): A pointer to a utils.Params struct (unused).
- c (*hermes.Cache): A pointer to a hermes.Cache struct.
Returns:
- []byte: A JSON-encoded byte slice containing all values from the cache or an error message if the retrieval fails.
Types ¶
This section is empty.