utilities

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package utilities contains helper functions for OPA.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildUserError

func BuildUserError(err *sdkerrors.StatusError) *ast.Term

BuildUserError converts StatusError into *ast.Term to return to user. Should not be called when sdkerrors.IsServiceError(err) returns true.

func ObjectsValueIntoAstTerm

func ObjectsValueIntoAstTerm(objVal *objects.Value) (*ast.Term, error)

ObjectsValueIntoAstTerm converts recursively *objects.Value into *ast.Term Duration, Identifier and Any is not supported Time is converted to string in RFC3339 format Bytes are converted to string as Base64 Standart encoded string nolint:cyclop

func ParseInputParams added in v1.3.0

func ParseInputParams(inputParams *ast.Term, pos int) (map[string]*authorizationpb.InputParam, error)

ParseInputParams parses inputParams to a map of param's name to authorizationpb.InputParam.

Types

This section is empty.

Jump to

Keyboard shortcuts

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