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"` SyncKey string `json:"syncKey"` SyncEnabled bool `json:"syncEnabled"` AIEnabled bool `json:"aiEnabled"` AIApiKey string `json:"aiApiKey"` AIModel string `json:"aiModel"` AIProvider string `json:"aiProvider"` AIContextWindow int `json:"aiContextWindow"` AIMaxTokens int `json:"aiMaxTokens"` AIURL string `json:"aiUrl"` }
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
|
|
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.