starvalue

package
v0.1.0-dev.20260305000737 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package starvalue defines interfaces for custom Starlark value serialization. Types that implement Marshaler or Unmarshaler control how they are converted to and from starlark.Value representations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Marshaler

type Marshaler interface {
	MarshalStarvalue() (starlark.Value, error)
}

Marshaler is implemented by types that can marshal themselves into a Starlark value. marshalReflect checks for this interface before walking struct fields via reflection — same pattern as encoding/json.Marshaler.

type Unmarshaler

type Unmarshaler interface {
	UnmarshalStarvalue(starlark.Value) error
}

Unmarshaler is implemented by types that can unmarshal a Starlark value into themselves. Unmarshal checks for this interface before assigning fields via reflection.

Jump to

Keyboard shortcuts

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