ptr

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package ptr provides utilities for pointer operations using storage layer paths.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ptr

func Ptr(data any, path storage.Path) (any, error)

func ValidateASTArrayIndex

func ValidateASTArrayIndex(arr *ast.Array, s string, path storage.Path) (int, error)

func ValidateArrayIndex

func ValidateArrayIndex(arr []any, s string, path storage.Path) (int, error)

func ValidateArrayIndexForWrite

func ValidateArrayIndexForWrite(arr []any, s string, i int, path storage.Path) (int, error)

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.

func ValuePtr

func ValuePtr(data ast.Value, path storage.Path) (ast.Value, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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