Skip to content

Latest commit

 

History

History
114 lines (53 loc) · 1.39 KB

files.md

File metadata and controls

114 lines (53 loc) · 1.39 KB

Home > @cerbos/files

files package

Load Cerbos policies from YAML or JSON files.

Functions

Function

Description

parsePolicy(contents)

Parse a policy from a YAML- or JSON-encoded string.

readDirectory(path)

Read the policy and schema files in a directory and its subdirectories.

readPolicy(path)

Read a policy from a YAML or JSON file.

readSchema(path, options)

Read a schema from a JSON file.

Interfaces

Interface

Description

DirectoryContents

The contents of a directory, returned by readDirectory().

ReadSchemaOptions

Options for readSchema().

Schema

A JSON schema to be used to validate principal or resource attributes.