demoworkspace

package
v1.3.0 Latest Latest
Warning

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

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

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