ast

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2020 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Overview

Package ast implements policies Abstract Syntax Tree (AST) parsers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser interface {
	// Unmarshal parses policies representation to PDP's internal
	// representation and returns pointer to PolicyStorage with the policies.
	// It sets given tag to the policies. Policies with no tag can't be updated
	// incrementally.
	Unmarshal(in io.Reader, tag *uuid.UUID) (*pdp.PolicyStorage, error)

	// UnmarshalUpdate parses policies update representation to PDP's internal
	// representation. Requires attribute symbols table as attrs argument which maps
	// attribute name to its specification. Argument oldTag should match current
	// policies tag to make update applicable. Value of newTag is set to policies
	// when update is applied.
	UnmarshalUpdate(in io.Reader, s pdp.Symbols, oldTag, newTag uuid.UUID) (*pdp.PolicyUpdate, error)
}

Parser is interface that wraps the AST parser methods.

func NewJSONParser

func NewJSONParser() Parser

NewJSONParser is a JSON AST parser constructor.

func NewYAMLParser

func NewYAMLParser() Parser

NewYAMLParser is a YAML AST parser constructor.

Directories

Path Synopsis
Package jast implements policies JSON AST (JAST) parser.
Package jast implements policies JSON AST (JAST) parser.
Package yast implements policies YAML AST (YAST) parser.
Package yast implements policies YAML AST (YAST) parser.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL