ctxkey

package
v0.37.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidContextKey = fmt.Errorf("not a valid ContextKey, try [%s]", strings.Join(_ContextKeyNames, ", "))

Functions

func ContextKeyNames

func ContextKeyNames() []string

ContextKeyNames returns a list of possible string values of ContextKey.

Types

type ContextKey

type ContextKey string

ENUM(content-length)

const (
	// ContentLength is a ContextKey of type content-length.
	ContentLength ContextKey = "content-length"
)

func ContextKeyValues

func ContextKeyValues() []ContextKey

ContextKeyValues returns a list of the values for ContextKey

func ParseContextKey

func ParseContextKey(name string) (ContextKey, error)

ParseContextKey attempts to convert a string to a ContextKey.

func (*ContextKey) Get

func (x *ContextKey) Get() interface{}

Get implements the Golang flag.Getter interface func.

func (ContextKey) IsValid

func (x ContextKey) IsValid() bool

IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values

func (*ContextKey) Set

func (x *ContextKey) Set(val string) error

Set implements the Golang flag.Value interface func.

func (ContextKey) String

func (x ContextKey) String() string

String implements the Stringer interface.

func (*ContextKey) Type

func (x *ContextKey) Type() string

Type implements the github.com/spf13/pFlag Value interface.

Jump to

Keyboard shortcuts

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