nexgate-api

module
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

README

nexgate-api

the api module, member of GSF-nexgate ZUGFeRD family.

This Go module defines global structs, functions, and interfaces for ZUGFeRD e-invoicing to ensure consistency and reusability.

Tasks

  • Definition of global types, functions, and interfaces
  • Definition of abstract methods on global interfaces. Example: writer.Finalize(), writer.Render(), job.Result().

Installation

go get codeberg.org/tiny-frameworks/nexgate-api

Nutzung

The module is included by all modules.


package zugferd

import (
	"path/filepath"

	"codeberg.org/tiny-frameworks/nexgate-api/job"
	"codeberg.org/tiny-frameworks/nexgate-api/writer"
)

func (w *ZugferdWriter) buildJobArtefacts(rJob *job.RenderJob, rInput *writer.RenderInput) error {

	// input-pdf -> jobID.pdf
	source := rInput.PdfPath
	if source != "" {
		pdfPath := filepath.Join(w.JobArtefactsPath, rJob.ID+".pdf")
		err := writer.CopyFile(source, pdfPath)
		if err != nil {
			return err
		}
	}
	
	// some instructions
	
	if err := w.WriteJob(rJob); err != nil {
		return err
	}
	return nil

}

Documentation, Contributing & Security

  • For the detailed documentation of nexgate-api, see the main repository nexgate-doc.
  • For the complete documentation of the nexgate system, see the main repository nexgate-doc.
  • You can find guidelines for bug reports and pull requests in the central Contributing Guidelines.
  • Information on reporting security vulnerabilities can be found in our Security Policy.

Directories

Path Synopsis
types
types

Jump to

Keyboard shortcuts

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