door

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container = pipe.ProxyContainer

type Done

type Done = bool

type Door

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

Door is a dynamic fragment placeholder that can be rendered and then updated over time.

func (*Door) Clear

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

Clear removes all door content while keeping the container mounted. It is equivalent to Update(ctx, nil).

func (*Door) Delete

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

Delete removes the door and forgets its current content. If the door is not currently mounted, it is marked as removed and will not render later.

func (*Door) Edit

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

Edit renders d as an editable dynamic container.

func (*Door) Main

func (d *Door) Main() gox.Elem

Main returns d as a gox.Elem.

func (*Door) Proxy

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

Proxy renders d as a proxy around elem.

func (*Door) Rebase

func (d *Door) Rebase(ctx context.Context, el gox.Elem)

Rebase replaces the rendered door with el while keeping the same Go Door handle alive for later updates. Unlike Door.Replace, 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) 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) Replace

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

Replace removes the current door container and replaces it with content. Unlike Door.Update, 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) Update

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

Update 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) XClear

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

XClear tracks completion of Door.Clear. The channel receives nil on success or an error on failure, then closes. 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, do it in a hook, inside `doors.Go(...)`, or in your own goroutine with `doors.Free(ctx)`.

func (*Door) XDelete

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

XDelete tracks completion of Door.Delete. The channel receives nil on success or an error on failure, then closes. 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, do it in a hook, inside `doors.Go(...)`, or in your own goroutine with `doors.Free(ctx)`.

func (*Door) XRebase

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

XRebase tracks completion of Door.Rebase. The channel receives nil on success or an error on failure, then closes. 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, do it in a hook, inside `doors.Go(...)`, or in 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. 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, do it in a hook, inside `doors.Go(...)`, or in your own goroutine with `doors.Free(ctx)`.

func (*Door) XReplace

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

XReplace tracks completion of Door.Replace. The channel receives nil on success or an error on failure, then closes. 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, do it in a hook, inside `doors.Go(...)`, or in 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. 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, do it in a hook, inside `doors.Go(...)`, or in your own goroutine with `doors.Free(ctx)`.

func (*Door) XUpdate

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

XUpdate tracks completion of Door.Update. The channel receives nil on success or an error on failure, then closes. 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, do it in a hook, inside `doors.Go(...)`, or in your own goroutine with `doors.Free(ctx)`.

type Instance

type Instance interface {
	Conf() *common.SystemConf
	Call(call action.Call)
	core.Instance
}

type Root

type Root = *root

func NewRoot

func NewRoot(inst Instance) Root

func (Root) Context

func (r Root) Context() context.Context

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, init func()) (Stack, error)

func (Root) TriggerHook

func (i Root) TriggerHook(doorID uint64, hookId uint64, w http.ResponseWriter, r *http.Request, track uint64) bool

type Stack

type Stack = pipe.Stack

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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