Documentation
¶
Index ¶
- Variables
- func RegisterProxyMethod(pctx inject.ProxyContext, cf inject.CtxFunc)
- func Resolve(w io.Writer, v ...any) error
- func ResolveGraph(w io.Writer, v ...any) error
- type Field
- type ITable
- type Index
- type Mapper
- type Relation
- type Table
- func (t *Table) MakeGraph() *Table
- func (t *Table) New() *Table
- func (t *Table) Resolve(v any) *Table
- func (t *Table) SetComment(comment string) *Table
- func (t *Table) SetDescription(description string) *Table
- func (t *Table) SetMapper(f Mapper) *Table
- func (t *Table) SetTypeMapper(f Mapper) *Table
- func (t *Table) Write(w io.Writer) *Table
- type TableMock
- func (mockRecv *TableMock) MakeGraph() *Table
- func (mockRecv *TableMock) New() *Table
- func (mockRecv *TableMock) Resolve(v any) *Table
- func (mockRecv *TableMock) SetComment(comment string) *Table
- func (mockRecv *TableMock) SetDescription(description string) *Table
- func (mockRecv *TableMock) SetMapper(f Mapper) *Table
- func (mockRecv *TableMock) SetTypeMapper(f Mapper) *Table
- func (mockRecv *TableMock) Write(w io.Writer) *Table
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TableMockMakeGraphProxyContext = func() (pctx inject.ProxyContext) { pctx = tableMockCommonProxyContext pctx.MethodName = "MakeGraph" return }() TableMockNewProxyContext = func() (pctx inject.ProxyContext) { pctx = tableMockCommonProxyContext pctx.MethodName = "New" return }() TableMockResolveProxyContext = func() (pctx inject.ProxyContext) { pctx = tableMockCommonProxyContext pctx.MethodName = "Resolve" return }() TableMockSetCommentProxyContext = func() (pctx inject.ProxyContext) { pctx = tableMockCommonProxyContext pctx.MethodName = "SetComment" return }() TableMockSetDescriptionProxyContext = func() (pctx inject.ProxyContext) { pctx = tableMockCommonProxyContext pctx.MethodName = "SetDescription" return }() TableMockSetMapperProxyContext = func() (pctx inject.ProxyContext) { pctx = tableMockCommonProxyContext pctx.MethodName = "SetMapper" return }() TableMockSetTypeMapperProxyContext = func() (pctx inject.ProxyContext) { pctx = tableMockCommonProxyContext pctx.MethodName = "SetTypeMapper" return }() TableMockWriteProxyContext = func() (pctx inject.ProxyContext) { pctx = tableMockCommonProxyContext pctx.MethodName = "Write" return }() )
View Source
var ( // %s分别是多个子图,边样式和边 GraphFormat = `` /* 209-byte string literal not displayed */ EdgeStyleFormat = `edge [ arrowtail=normal, style=dashed, color="#444444" ] ` )
dot脚本
Functions ¶
func RegisterProxyMethod ¶ added in v0.12.0
func RegisterProxyMethod(pctx inject.ProxyContext, cf inject.CtxFunc)
Types ¶
type Field ¶
type Field struct {
Name string // 名字
Type string // 类型
Nullable bool // 是否可null
Primary bool // 是否主键
Description string // 描述
Index // 索引
Relation // 关系
}
Field 字段
type Table ¶
type Table struct {
Name string // 名字
Comment string // 注释
Description string // 描述
FieldList []Field // 字段列表
IndexList []Index // 索引列表
// er图
Subgraph string // 子图
Edge string // 边
// contains filtered or unexported fields
}
Table 表
func (*Table) SetDescription ¶
SetDescription 设置描述
type TableMock ¶ added in v0.5.0
type TableMock struct {
MakeGraphFunc func() *Table
NewFunc func() *Table
ResolveFunc func(v any) *Table
SetCommentFunc func(comment string) *Table
SetDescriptionFunc func(description string) *Table
SetMapperFunc func(f Mapper) *Table
SetTypeMapperFunc func(f Mapper) *Table
WriteFunc func(w io.Writer) *Table
}
func (*TableMock) SetComment ¶ added in v0.5.0
func (*TableMock) SetDescription ¶ added in v0.5.0
func (*TableMock) SetTypeMapper ¶ added in v0.5.0
Click to show internal directories.
Click to hide internal directories.