dtproject

package
v0.149.1 Latest Latest
Warning

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

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

Documentation

Overview

Package dtproject is the Projects module of the DataTug terminal UI: the list of local and GitHub projects, the screens of an open project, the wizard that creates a project and the flow that adds DataTug to an existing GitHub repository.

Every screen is an Elm-style nav.Screen. Work that touches the disk, the network or the keyring is a tea.Cmd returning a result message, and anything that outlives one message (a clone, the GitHub device flow) is a stream: a command that starts the work and a command per progress message. Package variables in seams.go are the only doors to the outside world, so tests replace them instead of starting real processes.

Index

Constants

View Source
const (

	// PersonalCloudNotice is the line for a personal (no Space) cloud project.
	PersonalCloudNotice = "Personal DataTug Cloud projects can't be opened in the terminal yet. Move the project to a Space to open it here."
	// ReadOnlyHint is shown for any edit of a cloud project.
	ReadOnlyHint = "Edit this project on datatug.app"
)

Notices of DataTug Cloud projects.

Variables

View Source
var CloudErrorLine = func(err error) string { return err.Error() }

CloudErrorLine is the one-line message for a failed cloud read. The commands package sets it so the UI and the exit lines word errors the same way.

View Source
var CloudLoader func(ctx context.Context, ref cloudproject.Ref) (cloudproject.Project, error)

CloudLoader reads a cloud project with the saved login. The commands package sets it; it is nil when the UI runs without one (tests).

Functions

func CreateLocalProject added in v0.59.0

func CreateLocalProject(projectID, title, location string) (dtconfig.ProjectRef, error)

CreateLocalProject is the writer of the "Locally" tab of the create screen: it writes a new project under location and registers it, and returns the registered project. It is exported so that the commands of the CLI can be tested against the project the wizard makes (the two must agree on where a project is).

func IsCloudRef added in v0.141.0

func IsCloudRef(ref dtconfig.ProjectRef) bool

IsCloudRef reports whether a settings entry is a DataTug Cloud project.

func Module added in v0.51.4

func Module() datatugui.Module

Module returns the Projects entry of the main menu.

func OpenCloudProject added in v0.141.0

func OpenCloudProject(p cloudproject.Project, page []string) tea.Cmd

OpenCloudProject returns the command that shows an already loaded cloud project at the section of page and records it as a recent project.

func OpenDeepLink(link deeplink.Link) tea.Cmd

OpenDeepLink returns the command that opens the project and page of link over the Projects screen, or nil for a link that names no project.

Types

This section is empty.

Jump to

Keyboard shortcuts

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