package ptr
import "github.com/open-policy-agent/opa/storage/internal/ptr"
Package ptr provides utilities for pointer operations using storage layer paths.
Index ¶
- func Ptr(data interface{}, path storage.Path) (interface{}, error)
- func ValidateArrayIndex(arr []interface{}, s string, path storage.Path) (int, error)
- func ValidateArrayIndexForWrite(arr []interface{}, s string, i int, path storage.Path) (int, error)
Functions ¶
func Ptr ¶
func ValidateArrayIndex ¶
func ValidateArrayIndexForWrite ¶
ValidateArrayIndexForWrite also checks that `s` is a valid way to address an array element like `ValidateArrayIndex`, but returns a `resource_conflict` error if it is not.
Source Files ¶
- Version
- v0.56.0
- Published
- Aug 31, 2023
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 9 minutes ago –
Tools for package owners.