constant

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: Apache-2.0 Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 Assistant

type Assistant string // Always "assistant"

func (Assistant) Default

func (c Assistant) Default() Assistant

func (Assistant) MarshalJSON

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

type Completed

type Completed string // Always "completed"

func (Completed) Default

func (c Completed) Default() Completed

func (Completed) MarshalJSON

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

type Constant

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

type Cron

type Cron string // Always "cron"

func (Cron) Default

func (c Cron) Default() Cron

func (Cron) MarshalJSON

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

type Delayed

type Delayed string // Always "delayed"

func (Delayed) Default

func (c Delayed) Default() Delayed

func (Delayed) MarshalJSON

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

type Interval

type Interval string // Always "interval"

func (Interval) Default

func (c Interval) Default() Interval

func (Interval) MarshalJSON

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

type Message

type Message string // Always "message"

func (Message) Default

func (c Message) Default() Message

func (Message) MarshalJSON

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

type OutputText

type OutputText string // Always "output_text"

func (OutputText) Default

func (c OutputText) Default() OutputText

func (OutputText) MarshalJSON

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

type Scheduled

type Scheduled string // Always "scheduled"

func (Scheduled) Default

func (c Scheduled) Default() Scheduled

func (Scheduled) MarshalJSON

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

type URL

type URL string // Always "url"

func (URL) Default

func (c URL) Default() URL

func (URL) MarshalJSON

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

type Worker

type Worker string // Always "worker"

func (Worker) Default

func (c Worker) Default() Worker

func (Worker) MarshalJSON

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

Jump to

Keyboard shortcuts

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