enum

package
v0.0.0-...-58c2bd7 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValid

func IsValid[T1 comparable](enum Enum[T1], input T1) bool

func IsValidApiError

func IsValidApiError[T1 comparable](enum Enum[T1], input T1) error

func Markdown

func Markdown[T1 comparable](enum Enum[T1], value T1) string

func TcIsValidTest

func TcIsValidTest[T1 comparable](enum Enum[T1]) tc.Test[T1, bool]

func TcRequestInvalidEnum

func TcRequestInvalidEnum[T1 comparable](enum Enum[T1], url string) tc.Request

func TcRequestValidEnum

func TcRequestValidEnum[T1 comparable](enum Enum[T1], id string, url string, responsePerson map[string]interface{}) tc.Request

Types

type Enum

type Enum[T1 comparable] struct {
	Values  []T1
	Invalid T1
}

func NewEnum

func NewEnum[T1 comparable](invalid T1, values ...T1) Enum[T1]

Jump to

Keyboard shortcuts

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