Documentation
ΒΆ
Index ΒΆ
Constants ΒΆ
This section is empty.
Variables ΒΆ
View Source
var BuildTime string
View Source
var GitBranch string
View Source
var GitCommitHash string
Functions ΒΆ
func IsDataSourceID ΒΆ added in v0.7.3
func IsGeneratorID ΒΆ added in v0.7.3
func IsTemplateID ΒΆ added in v0.7.3
Types ΒΆ
type DataSource ΒΆ
type DataSource struct {
Name string `json:"name"`
Slug string `json:"slug"`
Author string `json:"author"`
Description string `json:"description"`
Version string `json:"version"`
}
DataSource represents a data source in S&D.
func (DataSource) ID ΒΆ
func (ds DataSource) ID() string
type Entry ΒΆ
type Entry struct {
ID string `json:"id"`
Name string `json:"name"`
Data map[string]interface{} `json:"data"`
}
Entry represents one data entry in a template or data source.
type Generator ΒΆ added in v0.5.0
type Generator struct {
Name string `json:"name"`
Slug string `json:"slug"`
Author string `json:"author"`
Description string `json:"description"`
PrintTemplate string `json:"printTemplate"`
PassEntriesToJS bool `json:"passEntriesToJS"`
Config []GeneratorConfig `json:"config"`
Images map[string]string `json:"images"`
DataSources []string `json:"dataSources"`
Version string `json:"version"`
}
Generator represents one S&D generator. Instead of working with fixed data entries like the template a generator procedurally generates new entries to print on the spot.
type GeneratorConfig ΒΆ added in v0.5.0
type Settings ΒΆ
type Settings struct {
PrinterType string `json:"printerType"`
PrinterEndpoint string `json:"printerEndpoint"`
PrinterWidth int `json:"printerWidth"`
Commands struct {
ExplicitInit bool `json:"explicitInit"`
Cut bool `json:"cut"`
ForceStandardMode bool `json:"forceStandardMode"`
LinesBefore int `json:"linesBefore"`
LinesAfter int `json:"linesAfter"`
SplitPrinting bool `json:"splitPrinting"`
SplitHeight int `json:"splitHeight"`
SplitDelay int `json:"splitDelay"`
} `json:"commands"`
Stylesheets []string `json:"stylesheets"`
SpellcheckerLanguages []string `json:"spellcheckerLanguages"`
PackageRepos []string `json:"packageRepos"`
}
Settings represents the basic settings for S&D.
type Template ΒΆ
type Template struct {
Name string `json:"name"`
Slug string `json:"slug"`
Author string `json:"author"`
Description string `json:"description"`
PrintTemplate string `json:"printTemplate"`
ListTemplate string `json:"listTemplate"`
SkeletonData map[string]interface{} `json:"skeletonData"`
Images map[string]string `json:"images"`
Config []TemplateConfig `json:"config"`
DataSources []string `json:"dataSources"`
Version string `json:"version"`
}
Template represents one S&D template.
Source Files
ΒΆ
Directories
ΒΆ
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
app
command
|
|
|
Package database represents the data layer of S&D.
|
Package database represents the data layer of S&D. |
|
Package imexport provides functions to import and export S&D templates and data sources.
|
Package imexport provides functions to import and export S&D templates and data sources. |
|
Package log provides logging utilities for S&D and makes it possible to hook into the logging to save the logs somewhere else.
|
Package log provides logging utilities for S&D and makes it possible to hook into the logging to save the logs somewhere else. |
|
cups
Package cups provides printing for Sales & Dungeons via cups.
|
Package cups provides printing for Sales & Dungeons via cups. |
|
remote
Package remote provides printing for Sales & Dungeons via a remote endpoint.
|
Package remote provides printing for Sales & Dungeons via a remote endpoint. |
|
rsnd
Package rsnd provides printing for Sales & Dungeons via a another S&D instance.
|
Package rsnd provides printing for Sales & Dungeons via a another S&D instance. |
|
usb
Package usb provides printing for Sales & Dungeons via USB.
|
Package usb provides printing for Sales & Dungeons via USB. |
|
windows
Package windows provides printing for Sales & Dungeons via direct printing on windows.
|
Package windows provides printing for Sales & Dungeons via direct printing on windows. |
|
Package rendering provides a function to render HTML to images or HTML after JS execution.
|
Package rendering provides a function to render HTML to images or HTML after JS execution. |
|
Package server represents the webserver that powers S&D.
|
Package server represents the webserver that powers S&D. |
|
thermalprinter
|
|
|
epson
Package epson implements the protocol used by most thermal printer, also commonly referred to as ESC or POS commands.
|
Package epson implements the protocol used by most thermal printer, also commonly referred to as ESC or POS commands. |
Click to show internal directories.
Click to hide internal directories.


