MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / GetAPIKeyByKey

Method GetAPIKeyByKey

apikey.go:61–63  ·  view source on GitHub ↗

GetAPIKeyByKey retrieves an API key by its key string Parameters: - ctx: The context for the operation - key: The API key string Returns: - *model.APIKey: The API key if found - error: An error if the operation fails

(ctx context.Context, key string)

Source from the content-addressed store, hash-verified

59// - *model.APIKey: The API key if found
60// - error: An error if the operation fails
61func (l *LedgerForge) GetAPIKeyByKey(ctx context.Context, key string) (*model.APIKey, error) {
62 return l.datasource.GetAPIKey(ctx, key)
63}
64
65// UpdateLastUsed updates the last used timestamp of an API key
66//

Callers 2

TestGetAPIKeyByKey_MockFunction · 0.95
AuthenticateMethod · 0.80

Calls 1

GetAPIKeyMethod · 0.65

Tested by 1

TestGetAPIKeyByKey_MockFunction · 0.76