Documentation
¶
Index ¶
- type Exporter
- type ExporterManager
- func (m *ExporterManager) Export(fileName string, atlas *model.AtlasInfo) error
- func (m *ExporterManager) Import(fileName string) (*model.AtlasInfo, error)
- func (m *ExporterManager) Init() *ExporterManager
- func (m *ExporterManager) Register(ext string, exporter Exporter)
- func (m *ExporterManager) RegisterTemplate(ext string, templateStr string, parseFunc ParseFunc)
- type GodotExporter
- type JsonExporter
- type ParseFunc
- type TemplateExporter
- func (e *TemplateExporter) AddTemplateFunc(name string, fn interface{})
- func (e *TemplateExporter) Export(atlas *model.AtlasInfo) ([]byte, error)
- func (e *TemplateExporter) Ext() string
- func (e *TemplateExporter) Import(data []byte) (*model.AtlasInfo, error)
- func (e *TemplateExporter) SetExt(ext string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExporterManager ¶
type ExporterManager struct {
// contains filtered or unexported fields
}
func NewExportManager ¶
func NewExportManager() *ExporterManager
func (*ExporterManager) Export ¶
func (m *ExporterManager) Export(fileName string, atlas *model.AtlasInfo) error
func (*ExporterManager) Import ¶
func (m *ExporterManager) Import(fileName string) (*model.AtlasInfo, error)
func (*ExporterManager) Init ¶
func (m *ExporterManager) Init() *ExporterManager
func (*ExporterManager) Register ¶
func (m *ExporterManager) Register(ext string, exporter Exporter)
func (*ExporterManager) RegisterTemplate ¶
func (m *ExporterManager) RegisterTemplate(ext string, templateStr string, parseFunc ParseFunc)
type GodotExporter ¶
type GodotExporter struct {
// contains filtered or unexported fields
}
func (*GodotExporter) Export ¶
func (g *GodotExporter) Export(atlasInfo *model.AtlasInfo) ([]byte, error)
func (*GodotExporter) Ext ¶
func (g *GodotExporter) Ext() string
func (*GodotExporter) Import ¶
func (g *GodotExporter) Import(data []byte) (*model.AtlasInfo, error)
Import TODO test
func (*GodotExporter) SetExt ¶
func (g *GodotExporter) SetExt(ext string)
type JsonExporter ¶
type JsonExporter struct {
// contains filtered or unexported fields
}
func (*JsonExporter) Ext ¶
func (j *JsonExporter) Ext() string
func (*JsonExporter) SetExt ¶
func (j *JsonExporter) SetExt(ext string)
type TemplateExporter ¶
type TemplateExporter struct {
// contains filtered or unexported fields
}
TemplateExporter 模板导出器 提供了一个通用的导出器,可以通过模板字符串来导出数据 模板字符串中可以使用 {{.Atlas}} 来访问 AtlasInfo
func NewTemplateExporter ¶
func NewTemplateExporter(templateStr string, parseFunc ParseFunc) *TemplateExporter
func (*TemplateExporter) AddTemplateFunc ¶
func (e *TemplateExporter) AddTemplateFunc(name string, fn interface{})
func (*TemplateExporter) Export ¶
func (e *TemplateExporter) Export(atlas *model.AtlasInfo) ([]byte, error)
func (*TemplateExporter) Ext ¶
func (e *TemplateExporter) Ext() string
func (*TemplateExporter) Import ¶
func (e *TemplateExporter) Import(data []byte) (*model.AtlasInfo, error)
func (*TemplateExporter) SetExt ¶
func (e *TemplateExporter) SetExt(ext string)
Click to show internal directories.
Click to hide internal directories.