satpackage

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package satpackage reads the ZIP packages returned by DescargaMasiva: either CFDI packages (containing .xml documents) or Metadata packages (a single tilde-delimited .txt with one row per CFDI).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CFDIRecord

type CFDIRecord struct {
	Filename string
	UUID     string // derived from the filename
	XML      []byte
}

CFDIRecord is one XML document from a CFDI package.

func ReadCFDIs

func ReadCFDIs(zipData []byte) ([]CFDIRecord, error)

ReadCFDIs extracts all XML documents from a CFDI ZIP package.

type MetadataRecord

type MetadataRecord struct {
	UUID                  string
	RfcEmisor             string
	NombreEmisor          string
	RfcReceptor           string
	NombreReceptor        string
	PacCertifico          string
	FechaEmision          string
	FechaCertificacionSat string
	Monto                 string
	EfectoComprobante     string
	Estatus               string
	FechaCancelacion      string
	Fields                map[string]string
}

MetadataRecord is one row of a Metadata package. The well-known columns are exposed as fields; every column (including any the SAT adds later) is in Fields.

func ReadMetadata

func ReadMetadata(zipData []byte) ([]MetadataRecord, error)

ReadMetadata parses all metadata rows from a Metadata ZIP package.

Jump to

Keyboard shortcuts

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