config

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderNative    = "native"
	ProviderContainer = "container"
)
View Source
const DefaultSeller = "default"

Variables

View Source
var (
	SystemParams *SystemConfig
	SellerParams *SellerConfig
)

Functions

func LoadSeller

func LoadSeller(sellerID string) error

func LoadSystem

func LoadSystem(envRoot string) error

Types

type Address

type Address struct {
	Street  string `yaml:"street"`
	Zip     string `yaml:"zip"`
	City    string `yaml:"city"`
	Country string `yaml:"country"`
}

type Bank

type Bank struct {
	Name string `yaml:"name"`
	IBAN string `yaml:"iban"`
	BIC  string `yaml:"bic"`
}

type CacheConfig

type CacheConfig struct {
	Seller   SingleCache `yaml:"seller_cache"`
	Country  SingleCache `yaml:"country_cache"`
	Currency SingleCache `yaml:"currency_cache"`
	Unit     SingleCache `yaml:"unit_cache"`
	Payment  SingleCache `yaml:"payment_cache"`
}

type Contact

type Contact struct {
	Name  string `yaml:"name"`
	Email string `yaml:"email"`
	Phone string `yaml:"phone"`
}

type DIN5008

type DIN5008 struct {
	AbsenderZeile string    `yaml:"absender_zeile"`
	Impressum     Impressum `yaml:"impressum"`
}

type EngineConfig

type EngineConfig struct {
	HeartbeatFrequency    time.Duration `yaml:"heartbeat_frequency"`
	WatchSleep            time.Duration `yaml:"watch_sleep"`
	CmdTimeout            time.Duration `yaml:"cmd_timeout"`
	ConfigReloadFrequency time.Duration `yaml:"config_reload"`
	DefaultQueue          string        `yaml:"default_queue"`
	ContainerEngine       string        `yaml:"container_engine"`
	PdfEngine             string        `yaml:"pdf_engine"`
	ZugferdEngine         string        `yaml:"zugferd_engine"`
	PdfProvider           string        `yaml:"pdf_provider"`
	ZugferdProvider       string        `yaml:"zugferd_provider"`
}

type Impressum

type Impressum struct {
	AdresseZeile string `yaml:"adresse_zeile"`
	KontaktZeile string `yaml:"kontakt_zeile"`
	BankZeile    string `yaml:"bank_zeile"`
	LegalZeile   string `yaml:"legal_zeile"`
}
type Legal struct {
	Form             string `yaml:"form"`
	HRB              string `yaml:"hrb"`
	ManagingDirector string `yaml:"managing_director"`
}

type SellerConfig

type SellerConfig struct {
	Version    int               `yaml:"version"`
	Name       string            `yaml:"name"`
	LeitwegID  string            `yaml:"leitweg_id"`
	Address    Address           `yaml:"address"`
	Tax        Tax               `yaml:"tax"`
	Contact    Contact           `yaml:"contact"`
	Bank       Bank              `yaml:"bank"`
	Legal      Legal             `yaml:"legal"`
	DIN5008    DIN5008           `yaml:"din_5008"`
	Paths      SellerPathsConfig `yaml:"paths"`
	Templates  TemplatesConfig   `yaml:"templates"`
	SellerRoot string
}

type SellerPathsConfig

type SellerPathsConfig struct {
	LogFile string `yaml:"log_file"`
}

type SingleCache

type SingleCache struct {
	TTL      time.Duration `yaml:"ttl"`
	Cleanup  time.Duration `yaml:"cleanup"`
	Capacity int           `yaml:"capacity"`
}

type SystemConfig

type SystemConfig struct {
	Version    int               `yaml:"version"`
	EnvRoot    string            `yaml:"-"`
	Engine     EngineConfig      `yaml:"engine"`
	Paths      SystemPathsConfig `yaml:"paths"`
	Caches     CacheConfig       `yaml:"caches"`
	SystemRoot string
}

type SystemPathsConfig

type SystemPathsConfig struct {
	CountriesCSV  string `yaml:"countries_csv"`
	UnitsCSV      string `yaml:"units_csv"`
	CurrenciesCSV string `yaml:"currencies_csv"`
	PaymentsCSV   string `yaml:"payments_csv"`
}

type Tax

type Tax struct {
	VatID     string `yaml:"vat_id"`
	TaxNumber string `yaml:"tax_number"`
}

type TemplatesConfig

type TemplatesConfig struct {
	ParTemplate string `yaml:"par"`
	XmlTemplate string `yaml:"xml"`
	OttTemplate string `yaml:"ott"`
}

Jump to

Keyboard shortcuts

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