constant

package
v0.13.3 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: Apache-2.0 Imports: 1 Imported by: 1 module, 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 Auto

type Auto string // Always "auto"

func (Auto) Default

func (c Auto) Default() Auto

func (Auto) MarshalJSON

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

type Aws

type Aws string // Always "aws"

func (Aws) Default

func (c Aws) Default() Aws

func (Aws) MarshalJSON

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

type Chunkify

type Chunkify string // Always "chunkify"

func (Chunkify) Default

func (c Chunkify) Default() Chunkify

func (Chunkify) MarshalJSON

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

type Cloudflare

type Cloudflare string // Always "cloudflare"

func (Cloudflare) Default

func (c Cloudflare) Default() Cloudflare

func (Cloudflare) MarshalJSON

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

type Constant

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

type HlsAv1

type HlsAv1 string // Always "hls_av1"

func (HlsAv1) Default

func (c HlsAv1) Default() HlsAv1

func (HlsAv1) MarshalJSON

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

type HlsH264

type HlsH264 string // Always "hls_h264"

func (HlsH264) Default

func (c HlsH264) Default() HlsH264

func (HlsH264) MarshalJSON

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

type HlsH265

type HlsH265 string // Always "hls_h265"

func (HlsH265) Default

func (c HlsH265) Default() HlsH265

func (HlsH265) MarshalJSON

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

type Jpg

type Jpg string // Always "jpg"

func (Jpg) Default

func (c Jpg) Default() Jpg

func (Jpg) MarshalJSON

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

type MP4Av1

type MP4Av1 string // Always "mp4_av1"

func (MP4Av1) Default

func (c MP4Av1) Default() MP4Av1

func (MP4Av1) MarshalJSON

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

type MP4H264

type MP4H264 string // Always "mp4_h264"

func (MP4H264) Default

func (c MP4H264) Default() MP4H264

func (MP4H264) MarshalJSON

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

type MP4H265

type MP4H265 string // Always "mp4_h265"

func (MP4H265) Default

func (c MP4H265) Default() MP4H265

func (MP4H265) MarshalJSON

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

type Success

type Success string // Always "success"

func (Success) Default

func (c Success) Default() Success

func (Success) MarshalJSON

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

type WebmVp9

type WebmVp9 string // Always "webm_vp9"

func (WebmVp9) Default

func (c WebmVp9) Default() WebmVp9

func (WebmVp9) MarshalJSON

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

Jump to

Keyboard shortcuts

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