MCPcopy Index your code
hub / github.com/devaccuracy/ledgerforge / Get

Method Get

internal/cache/cache.go:47–47  ·  view source on GitHub ↗

Get retrieves a value from the cache using a given key. Parameters: - ctx: The context for managing the request lifecycle. - key: The cache key to fetch the value. - data: The variable to store the fetched data. Returns an error if the key does not exist or retrieval fails.

(ctx context.Context, key string, data interface{})

Source from the content-addressed store, hash-verified

45 // - data: The variable to store the fetched data.
46 // Returns an error if the key does not exist or retrieval fails.
47 Get(ctx context.Context, key string, data interface{}) error
48
49 // Delete removes a value from the cache based on the provided key.
50 // Parameters:

Callers 15

TestGetFunction · 0.95
TestGetNonExistentKeyFunction · 0.95
TestDeleteFunction · 0.95
FetchMethod · 0.65
GetAPIKeyMethod · 0.65
GroupTransactionsMethod · 0.65
RecordTransactionMethod · 0.65

Implementers 3

mockCachedatabase/transactions_test.go
mockCacheRecondatabase/reconciliation_test.go
RedisCacheinternal/cache/cache.go

Calls

no outgoing calls

Tested by 7

TestGetFunction · 0.76
TestGetNonExistentKeyFunction · 0.76
TestDeleteFunction · 0.76
FetchMethod · 0.52
TestRedisIntegrationFunction · 0.52
TestCall_SuccessFunction · 0.52