api

package
v0.4.28 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	AddArgument(string)
	AddPreposition(string)
	Command() (Command, error)
}

type BuilderSupport

type BuilderSupport interface {
	// AddArgument(string) // must be provided by each command
	AddPreposition(string) // not required by all commands
	ColumnSpecifierFromArg(string) *column.Specifier
	IsKeyword(string, keyword.ID) bool
	KeywordName(keyword.ID) string
}

API provided by the parser to the command builders, allowing them to perform common tasks such as looking up keywords etc

type Command

type Command interface {
	Name() string
	String() string
	ApplyConfig(ConfigAPI)
	ApplyRenderCommands(RenderAPI)
}

each command provides the following abilities

type ConfigAPI

type ConfigAPI interface {
	SetPrefix(string)
	SetPrefixPattern(string)
	SetProfile(*profile.Profile)
	SetLocaleTag(string)
}

API used by commands to perform their actions BEFORE importing data into a table

type RenderAPI

type RenderAPI interface {
	Index() column.Index
	SetIndex(column.Index)
	FillColumns([]*column.Specifier, string)
}

API used by commands to perform their actions before rendering a table

Jump to

Keyboard shortcuts

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