ptr

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 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 interface{}, path storage.Path) (interface{}, error)

func ValidateASTArrayIndex

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

func ValidateArrayIndex

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

func ValidateArrayIndexForWrite

func ValidateArrayIndexForWrite(arr []interface{}, 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