Documentation
¶
Overview ¶
Package fatturapa implements the conversion from GOBL to FatturaPA XML.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Certificate *xmldsig.Certificate
WithTimestamp bool
Transmitter *Transmitter
}
Config contains the configuration for the Converter
type Converter ¶
type Converter struct {
Config *Config
}
Converter contains information related to the entity using this library to submit invoices to SDI.
func NewConverter ¶
NewConverter returns a new GOBL to XML Converter with the given options
type Document ¶
type Document struct {
XMLName xml.Name `xml:"p:FatturaElettronica"`
FPANamespace string `xml:"xmlns:p,attr"`
DSigNamespace string `xml:"xmlns:ds,attr"`
XSINamespace string `xml:"xmlns:xsi,attr"`
Versione string `xml:"versione,attr"`
SchemaLocation string `xml:"xsi:schemaLocation,attr"`
FatturaElettronicaHeader *fatturaElettronicaHeader
FatturaElettronicaBody []*fatturaElettronicaBody
Signature *xmldsig.Signature `xml:"ds:Signature,omitempty"`
// contains filtered or unexported fields
}
Document is a pseudo-model for containing the XML document being created.
type Option ¶
type Option func(*Converter)
Option is a function that can be passed to NewConverter to configure it
func WithCertificate ¶
func WithCertificate(cert *xmldsig.Certificate) Option
WithCertificate will ensure the XML document is signed with the given certificate
func WithTimestamp ¶
func WithTimestamp() Option
WithTimestamp will ensure the XML document is timestamped
func WithTransmitterData ¶
func WithTransmitterData(transmitter *Transmitter) Option
WithTransmitterData will ensure the XML document contains the given transmitter data
type Transmitter ¶
Transmitter contains information about the entity integrating directly with the SDI to submit and receive invoices
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
gobl.fatturapa
command
Package main implements the CLI as well as mage commands (toplevel mage.go)
|
Package main implements the CLI as well as mage commands (toplevel mage.go) |
|
Package test provides tools for testing the library both manually as well as helpers for writing test code.
|
Package test provides tools for testing the library both manually as well as helpers for writing test code. |