Documentation ¶
Overview ¶
The file contains the query functions for the importer. Separate the standalone query functions from the `dao` pkg to support transaction operations and disable CACHE for the importer. The importer is no longer relying on the `dao` pkg and it's query functions.
Index ¶
- func RunExportArtrans(dao *dao.Dao, params *ExportParams) (string, error)
- func RunImportArtrans(dao *dao.Dao, params *ImportParams, outputFunc ...func(string)) error
- type Console
- func (c *Console) Confirm(s string) bool
- func (c *Console) Error(a ...any)
- func (c *Console) Fatal(a ...any)
- func (c *Console) Info(a ...any)
- func (c *Console) IsOutputFuncSet() bool
- func (c *Console) Print(a ...any)
- func (c *Console) PrintEncodeData(dataType string, val any)
- func (c *Console) PrintTable(rows [][]any)
- func (c *Console) Printf(format string, a ...any)
- func (c *Console) Println(a ...any)
- func (c *Console) SetOutputFunc(f func(string))
- func (c *Console) Warn(a ...any)
- type ExportParams
- type ImportParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunExportArtrans ¶
func RunExportArtrans(dao *dao.Dao, params *ExportParams) (string, error)
func RunImportArtrans ¶
func RunImportArtrans(dao *dao.Dao, params *ImportParams, outputFunc ...func(string)) error
Types ¶
type Console ¶
type Console struct {
// contains filtered or unexported fields
}
func NewConsole ¶
func NewConsole() *Console
func (*Console) IsOutputFuncSet ¶
func (*Console) PrintEncodeData ¶
func (*Console) PrintTable ¶
func (*Console) SetOutputFunc ¶
type ExportParams ¶
type ExportParams struct {
SiteNameScope []string `json:"site_name_scope"`
}
type ImportParams ¶
type ImportParams struct { TargetSiteName string `json:"target_site_name" form:"target_site_name" validate:"optional"` // The target site name TargetSiteURL string `json:"target_site_url" form:"target_site_url" validate:"optional"` // The target site url URLResolver bool `json:"url_resolver" form:"url_resolver" validate:"optional"` // Enable URL resolver URLKeepDomain bool `json:"url_keep_domain" form:"url_keep_domain" validate:"optional"` // Keep domain JsonFile string `json:"json_file,omitempty" form:"json_file" validate:"optional"` // The JSON file path JsonData string `json:"json_data,omitempty" form:"json_data" validate:"optional"` // The JSON data Assumeyes bool `json:"assumeyes" form:"assumeyes" validate:"optional"` // Automatically answer yes for all questions // contains filtered or unexported fields }
func (*ImportParams) Console ¶
func (p *ImportParams) Console() *Console
func (*ImportParams) SetConsole ¶
func (p *ImportParams) SetConsole(c *Console)
Click to show internal directories.
Click to hide internal directories.