shared

package
v0.220.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: Apache-2.0, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check struct {
	Name       string `json:"name"`
	Expression string `json:"expression"`
	Status     string `json:"status"`
}

Check corresponds to the Python Check model.

type Checked

type Checked[T any] struct {
	Value  T                `json:"value"`
	Checks map[string]Check `json:"checks"`
}

Checked is a generic struct that contains a value of any type T and a map of checks, where the key type CN has an underlying type string.

type StreamState

type StreamState[T any] struct {
	Value T               `json:"value"`
	State StreamStateType `json:"state"`
}

type StreamStateType

type StreamStateType string
const (
	StreamStatePending    StreamStateType = "Pending"
	StreamStateIncomplete StreamStateType = "Incomplete"
	StreamStateComplete   StreamStateType = "Complete"
)

func (StreamStateType) IsValid

func (e StreamStateType) IsValid() bool

IsValid checks whether the given AliasedEnum value is valid.

func (StreamStateType) MarshalJSON

func (e StreamStateType) MarshalJSON() ([]byte, error)

MarshalJSON customizes JSON marshaling for AliasedEnum.

func (*StreamStateType) UnmarshalJSON

func (e *StreamStateType) UnmarshalJSON(data []byte) error

UnmarshalJSON customizes JSON unmarshaling for AliasedEnum.

func (StreamStateType) Values

func (StreamStateType) Values() []StreamStateType

Values returns all allowed values for the AliasedEnum type.

Jump to

Keyboard shortcuts

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