Documentation
¶
Index ¶
Constants ¶
View Source
const SchemaVersion = 1
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Envelope ¶
type Envelope struct {
OK bool `json:"ok" yaml:"ok"`
SchemaVersion int `json:"schema_version" yaml:"schema_version"`
Error *ErrorObject `json:"error,omitempty" yaml:"error,omitempty"`
Data any `json:"data,omitempty" yaml:"data,omitempty"`
}
type ErrorObject ¶
type ProfileListFormatter ¶ added in v0.0.5
type ProfileListFormatter interface {
ToProfileListData() (configPath string, profiles []profileListItem, ok bool)
}
ProfileListFormatter 接口:支持 profile list 输出的结构实现此接口
type SchemaColumn ¶ added in v0.0.8
type SchemaColumn struct {
Name string
Type string
Nullable bool
Default string
Comment string
PrimaryKey bool
}
SchemaColumn schema 列输出的简化结构
type SchemaFormatter ¶ added in v0.0.8
type SchemaFormatter interface {
ToSchemaData() (database string, tables []SchemaTable, ok bool)
}
SchemaFormatter 接口:支持 schema 输出的结构实现此接口
type SchemaTable ¶ added in v0.0.8
type SchemaTable struct {
Schema string
Name string
Comment string
Columns []SchemaColumn
}
SchemaTable schema 表格输出的简化结构
type TableFormatter ¶ added in v0.0.5
TableFormatter 接口:支持表格输出的数据结构实现此接口
Click to show internal directories.
Click to hide internal directories.