ExCedar.Entities (ex_cedar v0.1.2)

Copy Markdown View Source

Compiled Cedar entity store handle.

Build an entity store from a list of ExCedar.Entity structs via from_list/1, or pass raw Cedar entities JSON via from_json/1. The compiled handle is immutable and thread-safe.

Summary

Functions

Parses raw Cedar entities JSON (binary string, list, or map) and returns a compiled handle. Useful as an escape hatch when working with Cedar JSON produced by other tools.

Encodes a list of ExCedar.Entity structs to Cedar entities JSON and returns a compiled handle.

Functions

from_json(json)

Parses raw Cedar entities JSON (binary string, list, or map) and returns a compiled handle. Useful as an escape hatch when working with Cedar JSON produced by other tools.

from_list(entities)

Encodes a list of ExCedar.Entity structs to Cedar entities JSON and returns a compiled handle.

Returns {:error, %ExCedar.Error.Invalid{}} if Cedar rejects the entity data (e.g. a duplicate entity UID or a malformed entity reference).