artransfer

package
v0.0.0-...-9cc3252 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 23 Imported by: 0

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

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) Confirm

func (c *Console) Confirm(s string) bool

func (*Console) Error

func (c *Console) Error(a ...any)

func (*Console) Fatal

func (c *Console) Fatal(a ...any)

func (*Console) Info

func (c *Console) Info(a ...any)

func (*Console) IsOutputFuncSet

func (c *Console) IsOutputFuncSet() bool

func (*Console) Print

func (c *Console) Print(a ...any)

func (*Console) PrintEncodeData

func (c *Console) PrintEncodeData(dataType string, val any)

func (*Console) PrintTable

func (c *Console) PrintTable(rows [][]any)

func (*Console) Printf

func (c *Console) Printf(format string, a ...any)

func (*Console) Println

func (c *Console) Println(a ...any)

func (*Console) SetOutputFunc

func (c *Console) SetOutputFunc(f func(string))

func (*Console) Warn

func (c *Console) Warn(a ...any)

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL