constant

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValueOf

func ValueOf[T Constant[T]]() T

ValueOf gives the default value of a constant from its type. It's helpful when constructing constants as variants in a one-of. Note that empty structs are marshalled by default. Usage: constant.ValueOf[constant.Foo]()

Types

type ClassifyV2

type ClassifyV2 string // Always "classify_v2"

func (ClassifyV2) Default

func (c ClassifyV2) Default() ClassifyV2

func (ClassifyV2) MarshalJSON

func (c ClassifyV2) MarshalJSON() ([]byte, error)

type Constant

type Constant[T any] interface {
	Default() T
}

type ExtractV2

type ExtractV2 string // Always "extract_v2"

func (ExtractV2) Default

func (c ExtractV2) Default() ExtractV2

func (ExtractV2) MarshalJSON

func (c ExtractV2) MarshalJSON() ([]byte, error)

type ParseV2

type ParseV2 string // Always "parse_v2"

func (ParseV2) Default

func (c ParseV2) Default() ParseV2

func (ParseV2) MarshalJSON

func (c ParseV2) MarshalJSON() ([]byte, error)

type SplitV1

type SplitV1 string // Always "split_v1"

func (SplitV1) Default

func (c SplitV1) Default() SplitV1

func (SplitV1) MarshalJSON

func (c SplitV1) MarshalJSON() ([]byte, error)

type SpreadsheetV1

type SpreadsheetV1 string // Always "spreadsheet_v1"

func (SpreadsheetV1) Default

func (c SpreadsheetV1) Default() SpreadsheetV1

func (SpreadsheetV1) MarshalJSON

func (c SpreadsheetV1) MarshalJSON() ([]byte, error)

type Unknown

type Unknown string // Always "unknown"

func (Unknown) Default

func (c Unknown) Default() Unknown

func (Unknown) MarshalJSON

func (c Unknown) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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