Documentation
¶
Index ¶
- type Container
- type Done
- type Door
- func (d *Door) Clear(ctx context.Context)
- func (d *Door) Delete(ctx context.Context)
- func (d *Door) Edit(cur gox.Cursor) error
- func (d *Door) Main() gox.Elem
- func (d *Door) Proxy(cur gox.Cursor, elem gox.Elem) error
- func (d *Door) Rebase(ctx context.Context, el gox.Elem)
- func (d *Door) Reload(ctx context.Context)
- func (d *Door) Replace(ctx context.Context, content any)
- func (d *Door) Unmount(ctx context.Context)
- func (d *Door) Update(ctx context.Context, content any)
- func (d *Door) XClear(ctx context.Context) <-chan error
- func (d *Door) XDelete(ctx context.Context) <-chan error
- func (d *Door) XRebase(ctx context.Context, el gox.Elem) <-chan error
- func (d *Door) XReload(ctx context.Context) <-chan error
- func (d *Door) XReplace(ctx context.Context, content any) <-chan error
- func (d *Door) XUnmount(ctx context.Context) <-chan error
- func (d *Door) XUpdate(ctx context.Context, content any) <-chan error
- type Instance
- type Root
- func (r Root) Context() context.Context
- func (r Root) ID() uint64
- func (r Root) IsStatic() bool
- func (r Root) Kill()
- func (r Root) Render(requestCtx context.Context, comp gox.Comp, init func()) (Stack, error)
- func (i Root) TriggerHook(doorID uint64, hookId uint64, w http.ResponseWriter, r *http.Request, ...) bool
- type Stack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container = pipe.ProxyContainer
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 ¶
Clear removes all door content while keeping the container mounted. It is equivalent to Update(ctx, nil).
func (*Door) Delete ¶
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) Rebase ¶
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 ¶
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 ¶
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 ¶
Unmount removes the door from the page but keeps its current content for a future mount.
func (*Door) Update ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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)`.