namegen

package
v5.24.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Builtins holds all possible values.

Types holds all possible values.

Functions

This section is empty.

Types

type Builtin

type Builtin byte

Builtin holds a built-in name data type.

const (
	None Builtin = iota
	AmericanMale
	AmericanFemale
	AmericanLast
	UnweightedAmericanMale
	UnweightedAmericanFemale
	UnweightedAmericanLast
)

Possible values.

const LastBuiltin Builtin = UnweightedAmericanLast

LastBuiltin is the last valid value.

func ExtractBuiltin

func ExtractBuiltin(str string) Builtin

ExtractBuiltin extracts the value from a string.

func (Builtin) EnsureValid

func (enum Builtin) EnsureValid() Builtin

EnsureValid ensures this is of a known value.

func (Builtin) Key

func (enum Builtin) Key() string

Key returns the key used in serialization.

func (Builtin) MarshalText

func (enum Builtin) MarshalText() (text []byte, err error)

MarshalText implements the encoding.TextMarshaler interface.

func (Builtin) String

func (enum Builtin) String() string

String implements fmt.Stringer.

func (*Builtin) UnmarshalText

func (enum *Builtin) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface.

type Type

type Type byte

Type holds a name generation type.

const (
	Simple Type = iota
	MarkovLetter
	MarkovRun
	Compound
)

Possible values.

const LastType Type = Compound

LastType is the last valid value.

func ExtractType

func ExtractType(str string) Type

ExtractType extracts the value from a string.

func (Type) EnsureValid

func (enum Type) EnsureValid() Type

EnsureValid ensures this is of a known value.

func (Type) Key

func (enum Type) Key() string

Key returns the key used in serialization.

func (Type) MarshalText

func (enum Type) MarshalText() (text []byte, err error)

MarshalText implements the encoding.TextMarshaler interface.

func (Type) String

func (enum Type) String() string

String implements fmt.Stringer.

func (*Type) UnmarshalText

func (enum *Type) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface.

Jump to

Keyboard shortcuts

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