dtproject

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: Apache-2.0 Imports: 30 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 GoDataTugProjectsScreen added in v0.1.0

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

func GoDatatugProjectScreen added in v0.1.0

func GoDatatugProjectScreen(projectCtx *ProjectContext)

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 struct {
	context.Context
	// contains filtered or unexported fields
}

func NewProjectContext

func NewProjectContext(
	tui *sneatnav.TUI,
	store datatug.ProjectStore,
	config dtconfig.ProjectRef,
) *ProjectContext

func (ProjectContext) Config

func (p ProjectContext) Config() *dtconfig.ProjectRef

func (ProjectContext) Project

func (p ProjectContext) Project() *datatug.Project

func (ProjectContext) TUI

func (p ProjectContext) TUI() *sneatnav.TUI

func (ProjectContext) WatchProject

func (p ProjectContext) WatchProject() <-chan error

type ProjectScreenID

type ProjectScreenID string

type ProjectTitle added in v0.1.0

type ProjectTitle struct {
	Host   string // github.com
	Owner  string
	RepoID 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