Documentation
¶
Index ¶
- Constants
- type AIQuery
- type BaseInfo
- type Content
- type Database
- type DatabaseTree
- type DocModifier
- func (d *DocModifier) Duplicate(ctx context.Context, db, coll string, rawDocument string) (primitive.ObjectID, error)
- func (d *DocModifier) Edit(ctx context.Context, db, coll string, _id interface{}, jsonDoc string) (string, error)
- func (d *DocModifier) Insert(ctx context.Context, db, coll string) (primitive.ObjectID, error)
- type Header
- type Index
- type InputBar
- type Peeker
- type TabBar
- func (t *TabBar) AddTab(name string, component TabBarPrimitive, defaultTab bool)
- func (t *TabBar) GetActiveComponent() TabBarPrimitive
- func (t *TabBar) GetActiveComponentAndRender() TabBarPrimitive
- func (t *TabBar) GetActiveTabIndex() int
- func (t *TabBar) NextTab()
- func (t *TabBar) PreviousTab()
- func (t *TabBar) Render()
- type TabBarComponent
- type TabBarPrimitive
- type ViewType
Constants ¶
const ( ContentId = "Content" JsonViewId = "JsonView" QueryBarId = "QueryBar" SortBarId = "SortBar" ContentDeleteModalId = "ContentDeleteModal" )
const ( DatabaseId = "Database" FilterBarId = "FilterBar" )
const ( InputModalId = "InputModal" ConfirmModalId = "ConfirmModal" DatabaseTreeId = "DatabaseTree" DatabaseDeleteModalId = "DatabaseDeleteModal" )
const ( IndexId = "Index" IndexAddFormId = "IndexAddForm" IndexDeleteModalId = "IndexDeleteModal" )
const (
AIQueryId = "AIQuery"
)
const (
DocModifierId = "DocModifier"
)
const (
HeaderId = "Header"
)
const (
PeekerId = "Peeker"
)
const (
TabBarId = "TabBar"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AIQuery ¶ added in v0.1.11
type AIQuery struct { *core.BaseElement *core.FormModal // contains filtered or unexported fields }
func NewAIQuery ¶ added in v0.1.11
func NewAIQuery() *AIQuery
func (*AIQuery) IsAIQueryFocused ¶ added in v0.1.11
type Content ¶
type Content struct { *core.BaseElement *core.Flex // contains filtered or unexported fields }
Content is a view that displays documents in a table
func NewContent ¶
func NewContent() *Content
func (*Content) HandleDatabaseSelection ¶
HandleDatabaseSelection is called when a database/collection is selected in the DatabaseTree
type Database ¶
type Database struct { *core.BaseElement *core.Flex DbTree *DatabaseTree // contains filtered or unexported fields }
Database is flex container for DatabaseTree and InputBar
func NewDatabase ¶
func NewDatabase() *Database
type DatabaseTree ¶
type DatabaseTree struct { *core.BaseElement *core.TreeView // contains filtered or unexported fields }
func NewDatabaseTree ¶
func NewDatabaseTree() *DatabaseTree
func (*DatabaseTree) RefreshStyle ¶
func (t *DatabaseTree) RefreshStyle()
func (*DatabaseTree) Render ¶
func (t *DatabaseTree) Render(ctx context.Context, dbsWitColls []mongo.DBsWithCollections, expand bool)
func (*DatabaseTree) SetSelectFunc ¶
type DocModifier ¶
type DocModifier struct {
*core.BaseElement
}
DocModifier is a view that allows editing JSON documents
func NewDocModifier ¶
func NewDocModifier() *DocModifier
func (*DocModifier) Duplicate ¶
func (d *DocModifier) Duplicate(ctx context.Context, db, coll string, rawDocument string) (primitive.ObjectID, error)
Duplicate opens the editor with the document and saves it as a new document
type Header ¶
type Header struct { *core.BaseElement *core.Table // contains filtered or unexported fields }
Header is a view that displays basic information and keybindings in the header
func (*Header) SetBaseInfo ¶
SetBaseInfo sets the basic information about the database connection
type Index ¶ added in v0.1.5
type Index struct { *core.BaseElement *core.Flex // contains filtered or unexported fields }
func (*Index) HandleDatabaseSelection ¶ added in v0.1.5
func (*Index) InsertPairedFields ¶ added in v0.1.22
func (*Index) IsAddFormFocused ¶ added in v0.1.9
type InputBar ¶
type InputBar struct { *core.BaseElement *core.InputField // contains filtered or unexported fields }
func NewInputBar ¶
func NewInputBar(barId tview.Identifier, label string) *InputBar
func (*InputBar) DoneFuncHandler ¶
DoneFuncHandler sets DoneFunc for the input bar It accepts two functions: accept and reject which are called when user accepts or rejects the input
func (*InputBar) EnableAutocomplete ¶
func (i *InputBar) EnableAutocomplete()
EnableAutocomplete enables autocomplete
func (*InputBar) EnableHistory ¶
func (i *InputBar) EnableHistory()
EnableHistory enables history modal
func (*InputBar) LoadNewKeys ¶
LoadNewKeys loads new keys for autocomplete It is used when switching databases or collections
func (*InputBar) SetDefaultText ¶
SetDefaultText sets default text for the input bar
type Peeker ¶
type Peeker struct { *core.BaseElement *core.ViewModal // contains filtered or unexported fields }
Peeker is a view that provides a modal view for peeking at a document
func (*Peeker) MoveToBottom ¶
func (p *Peeker) MoveToBottom()
func (*Peeker) SetDoneFunc ¶
func (p *Peeker) SetDoneFunc(doneFunc func())
type TabBar ¶ added in v0.1.5
type TabBar struct { *core.BaseElement *core.Table // contains filtered or unexported fields }
func (*TabBar) AddTab ¶ added in v0.1.5
func (t *TabBar) AddTab(name string, component TabBarPrimitive, defaultTab bool)
func (*TabBar) GetActiveComponent ¶ added in v0.1.5
func (t *TabBar) GetActiveComponent() TabBarPrimitive
func (*TabBar) GetActiveComponentAndRender ¶ added in v0.1.10
func (t *TabBar) GetActiveComponentAndRender() TabBarPrimitive
func (*TabBar) GetActiveTabIndex ¶ added in v0.1.5
func (*TabBar) PreviousTab ¶ added in v0.1.5
func (t *TabBar) PreviousTab()
type TabBarComponent ¶ added in v0.1.5
type TabBarComponent struct {
// contains filtered or unexported fields
}