dtviewers

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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetViewersBreadcrumbs

func GetViewersBreadcrumbs(tui *sneatnav.TUI) sneatnav.Breadcrumbs

func GetViewersListPanel

func GetViewersListPanel(tui *sneatnav.TUI, title string, focusTo sneatnav.FocusTo, o ViewersListOptions) sneatnav.Panel

func NewCloudsMenu

func NewCloudsMenu(tui *sneatnav.TUI, active ViewerID) (menu sneatnav.Panel)

func RegisterModule

func RegisterModule()

func RegisterViewer

func RegisterViewer(viewer Viewer)

Types

type CollectionContext

type CollectionContext struct {
	DbContext
	CollectionRef dal.CollectionRef
}

type DbContext

type DbContext interface {
	Name() string // A db name. For SQLite would be a file name
	Driver() Driver
	Schema() schemer.SchemaProvider
	GetDB(ctx context.Context) (db dal.DB, err error)
}

type DbContextBase

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

func (*DbContextBase) Driver

func (c *DbContextBase) Driver() Driver

func (*DbContextBase) GetDB

func (c *DbContextBase) GetDB(ctx context.Context) (db dal.DB, err error)

func (*DbContextBase) Name

func (c *DbContextBase) Name() string

func (*DbContextBase) Schema

func (c *DbContextBase) Schema() schemer.SchemaProvider

type Driver

type Driver struct {
	ID         string
	ShortTitle string
}

type SqlDBContext

type SqlDBContext struct {
	DbContextBase
	GetSqlDB SqlDBGetter
}

func GetSQLiteDbContext

func GetSQLiteDbContext(path string) *SqlDBContext

func NewSqlDBContext

func NewSqlDBContext(driver Driver, name string, getSqlDB SqlDBGetter, schema schemer.SchemaProvider) *SqlDBContext

type SqlDBGetter

type SqlDBGetter func(ctx context.Context, driverName string) (sqlDB *sql.DB, err error)

type Viewer

type Viewer struct {
	ID          ViewerID
	Name        string
	Description string
	Shortcut    rune
	Action      func(tui *sneatnav.TUI, focusTo sneatnav.FocusTo) error
}

type ViewerID

type ViewerID string

type ViewersListOptions added in v0.0.13

type ViewersListOptions struct {
	WithDescription bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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