Documentation
¶
Index ¶
Constants ¶
View Source
const Title = "Viewers"
Title is the title of the Viewers module and of its list.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CollectionContext ¶
type CollectionContext struct {
DbContext
CollectionRef dal.CollectionRef
}
CollectionContext is a collection of a database.
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)
}
DbContext describes a database a viewer browses.
type DbContextBase ¶
type DbContextBase struct {
// contains filtered or unexported fields
}
DbContextBase is the DbContext implementation the concrete contexts embed.
func (*DbContextBase) Driver ¶
func (c *DbContextBase) Driver() Driver
func (*DbContextBase) Name ¶
func (c *DbContextBase) Name() string
func (*DbContextBase) Schema ¶
func (c *DbContextBase) Schema() schemer.SchemaProvider
type SqlDBContext ¶
type SqlDBContext struct {
DbContextBase
GetSqlDB SqlDBGetter
}
SqlDBContext is a DbContext over database/sql.
func GetSQLiteDbContext ¶
func GetSQLiteDbContext(path string) *SqlDBContext
GetSQLiteDbContext returns the DbContext of the SQLite file at path (a leading ~ is expanded).
func NewSqlDBContext ¶
func NewSqlDBContext(driver Driver, name string, getSqlDB SqlDBGetter, schema schemer.SchemaProvider) *SqlDBContext
NewSqlDBContext creates a DbContext whose database is opened by getSqlDB.
type SqlDBGetter ¶
SqlDBGetter opens the SQL database for a driver name.
type Viewer ¶
type Viewer struct {
// ID identifies the viewer.
ID ViewerID
// Name is the label shown in the list.
Name string
// Description is shown muted under the name.
Description string
// Shortcut, when not zero, selects the viewer from the list.
Shortcut rune
// Root builds the page pushed when the viewer is chosen. An empty Title
// defaults to Name. A page that needs its own menu sets Menu; otherwise the
// main menu stays.
Root func() nav.Page
}
Viewer is one entry of the Viewers screen: a way to browse data, such as a SQL database or a cloud account.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package clouds holds what the cloud viewers (Google Cloud, AWS, Azure) share.
|
Package clouds holds what the cloud viewers (Google Cloud, AWS, Azure) share. |
|
aws/awsui
Package awsui is the Amazon Web Services viewer.
|
Package awsui is the Amazon Web Services viewer. |
|
azure/azureui
Package azureui is the Microsoft Azure viewer.
|
Package azureui is the Microsoft Azure viewer. |
|
gcloud/gcloudui
Package gcloudui is the Google Cloud viewer: projects, credentials and the Firestore databases of a project.
|
Package gcloudui is the Google Cloud viewer: projects, credentials and the Firestore databases of a project. |
|
Package dbviewer is the DB viewer of the Viewers module: a chooser of database kinds, the SQLite and inGitDB home screens, and the browser of one database (tables and views, their columns, foreign keys, referrers and content).
|
Package dbviewer is the DB viewer of the Viewers module: a chooser of database kinds, the SQLite and inGitDB home screens, and the browser of one database (tables and views, their columns, foreign keys, referrers and content). |
Click to show internal directories.
Click to hide internal directories.