generator

package
v0.0.0-...-bf3cf8a Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, fn NewFunc)

Register will register a generator with a given name.

Types

type Easing

type Easing int
const (
	EasingLinear Easing = iota
	EasingInQuad
	EasingOutQuad
	EasingInOutQuad
	EasingInCubic
	EasingOutCubic
	EasingInOutCubic
	EasingInQuart
	EasingOutQuart
	EasingInOutQuart
	EasingInQuint
	EasingOutQuint
	EasingInOutQuint
	EasingInSine
	EasingOutSine
	EasingInOutSine
	EasingInExp
	EasingOutExp
	EasingInOutExp
	EasingInCirc
	EasingOutCirc
	EasingInOutCirc
)

func (*Easing) String

func (e *Easing) String() string

func (*Easing) Unpack

func (e *Easing) Unpack(v interface{}) error

func (*Easing) Value

func (e *Easing) Value(t float64) float64

type Generator

type Generator interface {
	Generate(ctx *context.Context) string
}

func New

func New(cfg *ucfg.Config) (Generator, error)

New creates a new Generator from the given config.

type NewFunc

type NewFunc = func(*ucfg.Config) (Generator, error)

NewFunc is a function that creates a new Generator with the given config.

type RandReader

type RandReader struct {
	Rand *rand.Rand
}

func (*RandReader) Read

func (r *RandReader) Read(p []byte) (n int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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