scope

package
v0.3.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package scope defines validated consumer-owned execution identifiers used to isolate data, authorization, plans, idempotency records, and audit events. Modary assigns no domain meaning to the identifier values.

Stability: alpha. Consumers should pin an exact pre-v1 Modary version.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Execution

type Execution struct {
	Kind string `json:"kind"`
	ID   string `json:"id"`
}

Execution identifies a consumer-defined isolation boundary. Kind names the boundary type, while ID is opaque to Modary.

func Must

func Must(kind, id string) Execution

Must is New for programmer-owned literals and panics on an invalid value.

func New

func New(kind, id string) (Execution, error)

New validates and returns a consumer-defined execution scope.

func (Execution) IsZero

func (execution Execution) IsZero() bool

IsZero reports whether both scope fields are empty.

func (Execution) Key

func (execution Execution) Key() string

Key is collision-safe for persistence and in-memory composite keys.

func (Execution) String

func (execution Execution) String() string

String returns a human-readable kind/ID form and never serves as a composite persistence key.

func (Execution) Validate

func (execution Execution) Validate() error

Validate checks the portable kind grammar and bounded opaque identifier.

Jump to

Keyboard shortcuts

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