apps

package
v0.12.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRoute

func NewRoute(dp RouteDataProvider) web.Route

NewRoute returns the page for this folder.

Types

type App

type App struct {
	Name  string
	State string
	Since string
	Stamp string // since, as RFC 3339
	URL   string
	// Problem is the code of the app's first problem.
	Problem string
}

App is one row of the apps table.

type DP

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

DP provides the apps of the workspace.

func NewDP

func NewDP(d *deps.Deps) *DP

NewDP returns the page's data provider.

func (*DP) Data

func (p *DP) Data(ctx context.Context, _ *web.Request, _ web.ResponseWriter, data *RouteData) error

Data lists the apps.

func (*DP) Subscribe

func (p *DP) Subscribe(ctx context.Context, _ *web.Request, state *ReactiveState) error

Subscribe lists the apps again at every change of the workspace.

type ReactiveState

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

ReactiveState sends new values of the page's live variables to one open page. Its Set methods may be called from any goroutine.

func (*ReactiveState) SetApps

func (rs *ReactiveState) SetApps(v []App)

SetApps stores v as apps and sends the parts of the page that show it.

type RouteData

type RouteData struct {
	Apps []App
}

RouteData holds the variables the template declares with <ssr:var>.

type RouteDataProvider

type RouteDataProvider interface {
	Data(ctx context.Context, r *web.Request, w web.ResponseWriter, data *RouteData) error
	// Subscribe runs while the page is open and must return when ctx is done.
	Subscribe(ctx context.Context, r *web.Request, state *ReactiveState) error
}

RouteDataProvider is what this page's DP implements.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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