door

package
v0.12.4 Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmptyPayload added in v0.10.0

func EmptyPayload() printer.Payload

Types

type Done

type Done = bool

type Door

type Door struct {
	// contains filtered or unexported fields
}

func (*Door) Edit

func (d *Door) Edit(cur gox.Cursor) error

Edit renders door through the gox editor pipeline.

It is a system method used by gox to support direct Door rendering, for example:

~(&doors.Door{})

func (*Door) Inner added in v0.10.0

func (d *Door) Inner(ctx context.Context, content any)

Inner replaces the door's current children while keeping the same door container mounted. If the door is not currently mounted, the content change is stored and will be applied when the door is rendered.

func (*Door) Outer added in v0.10.0

func (d *Door) Outer(ctx context.Context, outer gox.Elem)

Outer replaces the rendered door with outer while keeping the same Go Door handle alive for later updates. Unlike Door.Static, the result remains a live door that can be updated further. If the door is not currently mounted, the change is stored and will be applied when the door is rendered.

func (*Door) Proxy

func (d *Door) Proxy(cur gox.Cursor, el gox.Elem) error

Proxy renders door through the gox proxy pipeline.

It is a system method used by gox to support Door proxy syntax, for example:

~>(&doors.Door{}) <div>content</div>

func (*Door) Reload

func (d *Door) Reload(ctx context.Context)

Reload re-renders the door with its current content. If the door is not currently mounted, the operation completes immediately without a visual effect.

func (*Door) Static added in v0.10.0

func (d *Door) Static(ctx context.Context, content any)

Static removes the current door container and replaces it with static content. Unlike Door.Outer, this removes the door's DOM element entirely. If the door is not currently mounted, the change is stored and will be applied when the door is rendered.

func (*Door) Unmount

func (d *Door) Unmount(ctx context.Context)

Unmount removes the door from the page but keeps its current content for a future mount.

func (*Door) XInner added in v0.10.0

func (d *Door) XInner(ctx context.Context, content any) <-chan error

XInner tracks completion of Door.Inner. The channel receives nil on success or an error on failure, then closes. It receives context.Canceled if the operation is overwritten by a newer update, unmount, or other door operation. If the door is not mounted, it closes immediately without sending a value.

Do not wait on it during rendering. If you need to wait, use doors.Go(...), or your own goroutine with doors.Free(ctx).

func (*Door) XOuter added in v0.10.0

func (d *Door) XOuter(ctx context.Context, outer gox.Elem) <-chan error

XOuter tracks completion of Door.Outer. The channel receives nil on success or an error on failure, then closes. It receives context.Canceled if the operation is overwritten by a newer update, unmount, or other door operation. If the door is not mounted, it closes immediately without sending a value.

Do not wait on it during rendering. If you need to wait, use doors.Go(...), or your own goroutine with doors.Free(ctx).

func (*Door) XReload

func (d *Door) XReload(ctx context.Context) <-chan error

XReload tracks completion of Door.Reload. The channel receives nil on success or an error on failure, then closes. It receives context.Canceled if the operation is overwritten by a newer update, unmount, or other door operation. If the door is not mounted, it closes immediately without sending a value.

Do not wait on it during rendering. If you need to wait, use doors.Go(...), or your own goroutine with doors.Free(ctx).

func (*Door) XStatic added in v0.10.0

func (d *Door) XStatic(ctx context.Context, content any) <-chan error

XStatic tracks completion of Door.Static. The channel receives nil on success or an error on failure, then closes. It receives context.Canceled if the operation is overwritten by a newer update, unmount, or other door operation. If the door is not mounted, it closes immediately without sending a value.

Do not wait on it during rendering. If you need to wait, use doors.Go(...), or your own goroutine with doors.Free(ctx).

func (*Door) XUnmount

func (d *Door) XUnmount(ctx context.Context) <-chan error

XUnmount tracks completion of Door.Unmount. The channel receives nil on success or an error on failure, then closes. It receives context.Canceled if the operation is overwritten by a newer update, unmount, or other door operation. If the door is not mounted, it closes immediately without sending a value.

Do not wait on it during rendering. If you need to wait, use doors.Go(...), or your own goroutine with doors.Free(ctx).

type Error added in v0.10.0

type Error struct {
	// contains filtered or unexported fields
}

func (Error) Error added in v0.10.0

func (e Error) Error() string

func (Error) Main added in v0.10.0

func (e Error) Main() gox.Elem

func (Error) Payload added in v0.10.0

func (e Error) Payload() action.Payload

func (Error) Release added in v0.10.0

func (e Error) Release()

type Instance

type Instance interface {
	Call(call action.Call)
	core.Instance
}

type Pipe added in v0.10.0

type Pipe = *pipe

type Root

type Root = *root

func NewRoot

func NewRoot(inst Instance) Root

func (Root) ID

func (r Root) ID() uint64

func (Root) IsStatic

func (r Root) IsStatic() bool

func (Root) Kill

func (r Root) Kill()

func (Root) Render

func (r Root) Render(requestCtx context.Context, comp gox.Comp) (Stack, error)

type Stack

type Stack []*deque.Deque[any]

func (*Stack) Print added in v0.10.0

func (p *Stack) Print(pr gox.Printer) error

Jump to

Keyboard shortcuts

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