imexport

package
v1.0.0-rc15 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterDataSourceExports

func RegisterDataSourceExports(route *echo.Group, db database.Database)

RegisterDataSourceExports registers all data source exports.

func RegisterDataSourceImports

func RegisterDataSourceImports(route *echo.Group, db database.Database)

RegisterDataSourceImports registers all data source imports.

func RegisterGeneratorExports

func RegisterGeneratorExports(route *echo.Group, db database.Database)

RegisterGeneratorExports registers all generator exports.

func RegisterGeneratorImports

func RegisterGeneratorImports(route *echo.Group, db database.Database)

RegisterGeneratorImports registers all generator imports.

func RegisterTemplateExports

func RegisterTemplateExports(route *echo.Group, db database.Database)

RegisterTemplateExports registers all template exports.

func RegisterTemplateImports

func RegisterTemplateImports(route *echo.Group, db database.Database)

RegisterTemplateImports registers all template imports.

Types

type Argument

type Argument struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Type        string `json:"type"`
	Default     any    `json:"default"`
}

Argument represents a function argument for import and export functions.

func Arg

func Arg(name, description, t string, def any) Argument

type DataSourceExport

type DataSourceExport struct {
	ImExport
	Func DataSourceExportFunc `json:"-"`
}

DataSourceExport is a data source export.

type DataSourceExportFunc

type DataSourceExportFunc func(source snd.DataSource, entries []snd.Entry, args []any) (string, error)

DataSourceExportFunc is a function that exports a data source from a given set of arguments.

type DataSourceImport

type DataSourceImport struct {
	ImExport
	Func DataSourceImportFunc `json:"-"`
}

DataSourceImport is a data source import.

type DataSourceImportFunc

type DataSourceImportFunc func(args []any) ([]snd.DataSource, [][]snd.Entry, error)

DataSourceImportFunc is a function that imports a data source from a given set of arguments.

type GeneratorExport

type GeneratorExport struct {
	ImExport
	Func GeneratorExportFunction `json:"-"`
}

GeneratorExport is a generator export.

type GeneratorExportFunction

type GeneratorExportFunction func(generator snd.Generator, args []any) (string, error)

GeneratorExportFunction is a function that exports a generator from a given set of arguments.

type GeneratorImport

type GeneratorImport struct {
	ImExport
	Func GeneratorImportFunc `json:"-"`
}

GeneratorImport is a generator import.

type GeneratorImportFunc

type GeneratorImportFunc func(args []any) ([]snd.Generator, error)

GeneratorImportFunc is a function that imports a generator from a given set of arguments.

type ImExport

type ImExport struct {
	Name        string     `json:"name"`
	RPCName     string     `json:"rpcName"`
	Description string     `json:"description"`
	Arguments   []Argument `json:"arguments"`
}

ImExport represents a import or export function.

func NewImExport

func NewImExport(name, rpcName, description string, arguments ...Argument) ImExport

type TemplateExport

type TemplateExport struct {
	ImExport
	Func TemplateExportFunction `json:"-"`
}

TemplateExport is a template export.

type TemplateExportFunction

type TemplateExportFunction func(template snd.Template, entries []snd.Entry, args []any) (string, error)

TemplateExportFunction is a function that exports a template from a given set of arguments.

type TemplateImport

type TemplateImport struct {
	ImExport
	Func TemplateImportFunc `json:"-"`
}

TemplateImport is a template import.

type TemplateImportFunc

type TemplateImportFunc func(args []any) ([]snd.Template, [][]snd.Entry, error)

TemplateImportFunc is a function that imports a template from a given set of arguments.

Jump to

Keyboard shortcuts

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