Skip to content

Latest commit

 

History

History
50 lines (32 loc) · 1.02 KB

getting-started.md

File metadata and controls

50 lines (32 loc) · 1.02 KB

How does opa workload

REGO Language

What is Rego?

Rego was inspired by Datalog, which is a well understood, decades old query language. Rego extends Datalog to support structured document models such as JSON.

Datalog is a declarative logic programming language Rego is declarative so policy authors can focus on what queries should return rather than how queries should be executed. These queries are simpler and more concise than the equivalent in an imperative language.

  • Deploying OPA alongside your service
  • Pushing relevant data about your service's state into OPA's document store
  • Offloading some or all decision-making to OPA by querying it

Rego Support Primitive Types

    strings, 
    numbers, 
    booleans,  
    null

Structured Types:

    objects
    arrays

REST OPERATION

Documents: - RESTful HTTP APIs

  • created
  • read,
  • updated,
  • deleted

POLICIES

RULES

Defining RULES

OPEN the link to the rego playground https://play.openpolicyagent.org/p/pcXnGFFBb0