Class Cedarling
-
- All Implemented Interfaces:
-
java.lang.AutoCloseable,uniffi.cedarling_uniffi.CedarlingInterface,uniffi.cedarling_uniffi.Disposable
public class Cedarling implements Disposable, AutoCloseable, CedarlingInterface
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classCedarling.Companion
-
Field Summary
Fields Modifier and Type Field Description public final static Cedarling.CompanionCompanion
-
Method Summary
Modifier and Type Method Description Unitdestroy()Unitclose()final PointeruniffiClonePointer()AuthorizeResultauthorize(Map<String, String> tokens, String action, EntityData resource, String context)MultiIssuerAuthorizeResultauthorizeMultiIssuer(List<TokenInput> tokens, String action, EntityData resource, String context)AuthorizeResultauthorizeUnsigned(List<EntityData> principals, String action, EntityData resource, String context)UnitclearDataCtx()Clear all entries from the data store. StringgetDataCtx(String key)Get a value from the data store by key. DataEntrygetDataEntryCtx(String key)Get a data entry with full metadata by key. StringgetLogById(String id)List<String>getLogIds()List<String>getLogsByRequestId(String requestId)Get logs by request_id. List<String>getLogsByRequestIdAndTag(String requestId, String tag)Get log by request_id and tag, like composite key request_id+log_kind.List<String>getLogsByTag(String tag)Get logs by tag, like log_kindorlog level.DataStoreStatsgetStatsCtx()Get statistics about the data store. List<DataEntry>listDataCtx()List all entries with their metadata. List<String>popLogs()UnitpushDataCtx(String key, String value, Long ttlSecs)Push a value into the data store with an optional TTL. BooleanremoveDataCtx(String key)Remove a value from the data store by key. UnitshutDown()Closes the connections to the Lock Server and pushes all available logs. -
-
Method Detail
-
uniffiClonePointer
final Pointer uniffiClonePointer()
-
authorize
AuthorizeResult authorize(Map<String, String> tokens, String action, EntityData resource, String context)
-
authorizeMultiIssuer
MultiIssuerAuthorizeResult authorizeMultiIssuer(List<TokenInput> tokens, String action, EntityData resource, String context)
-
authorizeUnsigned
AuthorizeResult authorizeUnsigned(List<EntityData> principals, String action, EntityData resource, String context)
-
clearDataCtx
Unit clearDataCtx()
Clear all entries from the data store.
-
getDataCtx
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
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
String getLogById(String id)
-
getLogsByRequestId
List<String> getLogsByRequestId(String requestId)
Get logs by request_id. Return log entries that match the given request_id.
-
getLogsByRequestIdAndTag
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
List<String> getLogsByTag(String tag)
Get logs by tag, like
log_kindorlog level. Tag can belog_kind,log_level.
-
getStatsCtx
DataStoreStats getStatsCtx()
Get statistics about the data store.
-
listDataCtx
List<DataEntry> listDataCtx()
List all entries with their metadata. Returns a list of DataEntry objects.
-
pushDataCtx
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
Boolean removeDataCtx(String key)
Remove a value from the data store by key. Returns true if the key existed and was removed, false otherwise.
-
-
-
-