dtproject

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProjectScreenDashboards   = "dashboards"
	ProjectScreenEnvironments = "environments"
)

Variables

This section is empty.

Functions

func AddToGitHubRepo

func AddToGitHubRepo(tui *sneatnav.TUI, client *github.Client, repo *github.Repository, repos []*github.Repository, reauth func()) error

func GetProjectShortTitle

func GetProjectShortTitle(p *dtconfig.ProjectRef) (projectTitle string)

func GetProjectTitle

func GetProjectTitle(p *dtconfig.ProjectRef) (projectTitle string)

func GoProjectScreen

func GoProjectScreen(projectCtx ProjectContext)

func GoProjectsScreen

func GoProjectsScreen(tui *sneatnav.TUI, focusTo sneatnav.FocusTo) error

func NewProjectPanel

func NewProjectPanel(tui *sneatnav.TUI, projectConfig *dtconfig.ProjectRef) sneatnav.Panel

func RegisterModule

func RegisterModule()

func ShowAddToGitHubRepo

func ShowAddToGitHubRepo(tui *sneatnav.TUI)

ShowAddToGitHubRepo - gets user credentials for GitHub api via OAuth2 Device Flow - selects repository to be used to store datatug project. - adds a `datatug` directory with config and README.md to the root of an existing GitHub repo. - adds a 'DataTug' section to the root README.md files linked to the `datatug` directory.

Types

type ProjectContext

type ProjectContext interface {
	context.Context
	TUI() *sneatnav.TUI
	Config() *dtconfig.ProjectRef
	Project() *datatug.Project
	WatchProject() <-chan error
}

func NewProjectContext

func NewProjectContext(
	tui *sneatnav.TUI,
	loader datatug.ProjectsLoader,
	config dtconfig.ProjectRef,
) ProjectContext

type ProjectScreenID

type ProjectScreenID string

type TviewProgressWriter

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

TviewProgressWriter implements io.Writer and appends text to a TextView safely via tview.Application.

func NewTviewProgressWriter

func NewTviewProgressWriter(tui *sneatnav.TUI, tv *tview.TextView) *TviewProgressWriter

func (*TviewProgressWriter) Write

func (w *TviewProgressWriter) Write(p []byte) (n int, err error)

type WithProjectConfig

type WithProjectConfig interface {
	GetProjectConfig() *dtconfig.ProjectRef
}

Jump to

Keyboard shortcuts

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