importer

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ImportUsage = `` /* 2669-byte string literal not displayed */

Functions

func Add

func Add(root *cobra.Command, app *app.App, config map[string]*ImportDef)

Types

type BookImporter

type BookImporter func(r io.Reader) (starlark.Value, error)

func NewBookImporterByConfig

func NewBookImporterByConfig(cfg *utils.CLIConfig) (BookImporter, error)

func NewCSVBookImporter

func NewCSVBookImporter(cfg *utils.CLIConfig) (BookImporter, error)

func NewJSONBookImporter

func NewJSONBookImporter(cfg *utils.CLIConfig) (BookImporter, error)

type ImportDef

type ImportDef struct {

	// For custom imports
	Name        string
	Description string

	// Decoding of structure (CSV, JSON, etc)
	utils.CLIConfig

	// Code for conversion
	Code string

	// Defaults for code conversion
	Account        string
	CounterAccount string
	CCY            string

	// Rules to apply after import
	Dedup      bool
	Reclassify bool
}

Jump to

Keyboard shortcuts

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