zero

package
v1.2.150 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2025 License: Unlicense Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Build added in v1.2.138

type Build interface {
	Pathless() *One
	Lego(class string, elements ...One) *One
	JS(js string) One
	CSS(css string) One
	AddKeybind(containerId string, keyHandlers map[string]string) *One
	AddMarkdown(file string) *One
}

func NewBuild added in v1.2.138

func NewBuild() Build

type Element added in v1.2.45

type Element interface {
	Div(class string) *One
	Link(href, text string) *One
	List(items []any, ordered bool) *One
	Img(src, alt, reference string) *One
	Video(src string) *One
	Audio(src string) *One
	Iframe(src string) *One
	Embed(src string) *One
	Source(src string) *One
	Canvas(id string) *One
	Table(cols uint8, rows uint64, data [][]string) *One

	H1(s string) *One
	H2(s string) *One
	H3(s string) *One
	H4(s string) *One
	H5(s string) *One
	H6(s string) *One
	Paragraph(s string) *One
	Span(s string) *One
	Strong(s string) *One
	Em(s string) *One
	Small(s string) *One
	Mark(s string) *One
	Del(s string) *One
	Ins(s string) *One
	Sub(s string) *One
	Sup(s string) *One
	Kbd(s string) *One
	Samp(s string) *One
	VarElem(s string) *One
	Abbr(s string) *One
	Time(s string) *One
	Button(label string) *One
	Code(code string) *One
}

func NewElement added in v1.2.47

func NewElement() Element

type One added in v1.2.45

type One template.HTML

func Tag added in v1.2.45

func Tag(tag, text string) *One

type Zero

type Zero struct {
	Build
	Element Element
	context.Context
	*mux.Router
	*sync.RWMutex
	*sync.Cond
	Frames []*One
	Map    map[string]*atomic.Value
	// contains filtered or unexported fields
}

func NewZero added in v1.2.45

func NewZero() *Zero

func (*Zero) Add added in v1.2.140

func (z *Zero) Add(key string, val int)

func (*Zero) AddFrame added in v1.2.54

func (z *Zero) AddFrame(frame *One)

func (*Zero) BroadcastAll added in v1.2.140

func (z *Zero) BroadcastAll()

BroadcastAll signals all waiting goroutines.

func (*Zero) Observe added in v1.2.140

func (z *Zero) Observe(key string) <-chan int

func (*Zero) SignalOne added in v1.2.140

func (z *Zero) SignalOne()

SignalOne signals one waiting goroutine.

func (*Zero) Subtract added in v1.2.140

func (z *Zero) Subtract(key string)

func (*Zero) WaitForCondition added in v1.2.140

func (z *Zero) WaitForCondition(condFn func() bool)

WaitForCondition waits until the provided condition function returns true. It must be called with the lock held.

Jump to

Keyboard shortcuts

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