Interface CedarlingInterface
-
- All Implemented Interfaces:
public interface CedarlingInterface
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classCedarlingInterface.Companion
-
Method Summary
Modifier and Type Method Description abstract AuthorizeResultauthorize(Map<String, String> tokens, String action, EntityData resource, String context)abstract MultiIssuerAuthorizeResultauthorizeMultiIssuer(List<TokenInput> tokens, String action, EntityData resource, String context)abstract AuthorizeResultauthorizeUnsigned(List<EntityData> principals, String action, EntityData resource, String context)abstract UnitclearDataCtx()Clear all entries from the data store. abstract StringgetDataCtx(String key)Get a value from the data store by key. abstract DataEntrygetDataEntryCtx(String key)Get a data entry with full metadata by key. abstract StringgetLogById(String id)abstract List<String>getLogIds()abstract List<String>getLogsByRequestId(String requestId)Get logs by request_id. abstract List<String>getLogsByRequestIdAndTag(String requestId, String tag)Get log by request_id and tag, like composite key request_id+log_kind.abstract List<String>getLogsByTag(String tag)Get logs by tag, like log_kindorlog level.abstract DataStoreStatsgetStatsCtx()Get statistics about the data store. abstract List<DataEntry>listDataCtx()List all entries with their metadata. abstract List<String>popLogs()abstract UnitpushDataCtx(String key, String value, Long ttlSecs)Push a value into the data store with an optional TTL. abstract BooleanremoveDataCtx(String key)Remove a value from the data store by key. abstract UnitshutDown()Closes the connections to the Lock Server and pushes all available logs. -
-
Method Detail
-
authorize
abstract AuthorizeResult authorize(Map<String, String> tokens, String action, EntityData resource, String context)
-
authorizeMultiIssuer
abstract MultiIssuerAuthorizeResult authorizeMultiIssuer(List<TokenInput> tokens, String action, EntityData resource, String context)
-
authorizeUnsigned
abstract AuthorizeResult authorizeUnsigned(List<EntityData> principals, String action, EntityData resource, String context)
-
clearDataCtx
abstract Unit clearDataCtx()
Clear all entries from the data store.
-
getDataCtx
abstract String getDataCtx(String key)
Get a value from the data store by key. Returns None if the key doesn't exist or the entry has expired.
-
getDataEntryCtx
abstract DataEntry getDataEntryCtx(String key)
Get a data entry with full metadata by key. Returns None if the key doesn't exist or the entry has expired.
-
getLogById
abstract String getLogById(String id)
-
getLogsByRequestId
abstract List<String> getLogsByRequestId(String requestId)
Get logs by request_id. Return log entries that match the given request_id.
-
getLogsByRequestIdAndTag
abstract List<String> getLogsByRequestIdAndTag(String requestId, String tag)
Get log by request_id and tag, like composite key
request_id+log_kind. Tag can belog_kind,log_level. Return log entries that match the given request_id and tag.
-
getLogsByTag
abstract List<String> getLogsByTag(String tag)
Get logs by tag, like
log_kindorlog level. Tag can belog_kind,log_level.
-
getStatsCtx
abstract DataStoreStats getStatsCtx()
Get statistics about the data store.
-
listDataCtx
abstract List<DataEntry> listDataCtx()
List all entries with their metadata. Returns a list of DataEntry objects.
-
pushDataCtx
abstract Unit pushDataCtx(String key, String value, Long ttlSecs)
Push a value into the data store with an optional TTL. If the key already exists, the value will be replaced. If TTL is not provided, the default TTL from configuration is used.
-
removeDataCtx
abstract Boolean removeDataCtx(String key)
Remove a value from the data store by key. Returns true if the key existed and was removed, false otherwise.
-
-
-
-