demoworkspace

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: AGPL-3.0 Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package demoworkspace loads the Acme sample into a separate workspace from the first-run Overview: "Explore with demo data" (review PR-13).

Index

Constants

View Source
const Name = "Acme Newsletter (demo)"

Name is the sample workspace's name; one per person.

Variables

This section is empty.

Functions

func Register

func Register(h huma.API, s *Service)

Register adds the endpoint.

Types

type DemoWorkspace

type DemoWorkspace struct {
	ID   string `json:"id"`
	Slug string `json:"slug"`
	Name string `json:"name"`
	// Created is false when the caller already had one (it opens that one).
	Created bool `json:"created"`
}

DemoWorkspace is the sample workspace to open.

type Service

type Service struct {
	Pool  *pgxpool.Pool
	Q     *store.Queries
	Audit *audit.Logger
	Box   *secrets.Box
	Now   func() time.Time
}

Service creates sample workspaces.

func (*Service) Create

func (s *Service) Create(ctx context.Context) (DemoWorkspace, error)

Create makes the caller a sample workspace, or returns the one they made before. Its connections are demo connections: nothing is sent.

Jump to

Keyboard shortcuts

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