election

package
v0.0.0-...-371bc4b Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FicheiroControlPrefixo                                 = "01"
	FicheiroIdentificacionPrefixo                          = "02"
	FicheiroCandidaturasPrefixo                            = "03"
	FicheiroListaCandidatosPrefix                          = "04"
	FicheiroDatosComunsConcellosPrefixo                    = "05"
	MunicipalitiesCandidaturesDataFilePrefix               = "06"
	MunicipalitiesSuperiorScopeCommonDataFilePrefix        = "07"
	MunicipalitiesSuperiorScopeCandidaturesDataFile        = "08"
	TablesAndCeraCommonDataFilePrefix                      = "09"
	TablesAndCeraCandidaturesDataFilePrefix                = "10"
	MunicipalitiesSmallerThan250CommonDataFilePrefix       = "1104"
	MunicipalitiesSmallerThan250CandidaturesDataFilePrefix = "1204"
	JudicialDistrictCommonDataFilePrefix                   = "0510"
	JudicialDistrictCandidaturesDataFilePrefix             = "0610"
	ProvincialCouncilCommonDataFilePrefix                  = "0710"
	ProvincialCouncilCandidaturesDataFilePrefix            = "0810"
)
View Source
const (
	Referendum           = 1
	Congreso             = 2
	Senado               = 3
	Municipais           = 4
	ComunidadesAutonomas = 5
	Cabildos             = 6
	ParlamentoEuropeo    = 7
	XuntasXerais         = 15
)

Variables

View Source
var ElectionTypeLabel = map[int]string{
	Referendum:           "Referéndum",
	Congreso:             "Congreso",
	Senado:               "Senado",
	Municipais:           "Municipais",
	ComunidadesAutonomas: "Comunidades Autónomas",
	Cabildos:             "Cabildos",
	ParlamentoEuropeo:    "Parlamento Europeo",
	XuntasXerais:         "Xuntas Xeráis",
}

Functions

This section is empty.

Types

type Candidate

type Candidate struct {
	AmbitoTerritorial int
	CodigoCandidatura int
	Posicion          int
	Titular           bool
	Nome              string
	Apelidos          string
	FoiEleito         bool
}

type Candidatura

type Candidatura struct {
	Codigo              int
	Siglas              string
	Nome                string
	CabeceiraEstatal    int
	CabeceiraAutonomica int
	CabeceiraProvincial int
}

type Election

type Election struct {
	Type  int
	Scope int
	Date  time.Time
	// contains filtered or unexported fields
}

func NewElection

func NewElection(zipFile *archive_reader.ZipFile) Election

func (Election) CandidatesList

func (e Election) CandidatesList() []Candidate

func (Election) Candidatures

func (e Election) Candidatures() []Candidatura

func (Election) ExportToFiles

func (e Election) ExportToFiles(fileExport func(interface{}, string) error) error

func (Election) MesasElectorais

func (e Election) MesasElectorais() []MesaElectoral

func (Election) String

func (e Election) String() string

func (Election) VotosMesasElectorais

func (e Election) VotosMesasElectorais() []VotosMesaElectoral

type MesaElectoral

type MesaElectoral struct {
	CodigoProvincia      int
	CodigoConcello       int
	Distrito             int
	Seccion              int
	CodigoMesa           string
	CensoIne             int
	VotosBlanco          int
	VotosNulos           int
	VotosCandidaturas    int
	CensoEscrutinioOCera int
}

type VotosMesaElectoral

type VotosMesaElectoral struct {
	CodigoProvincia      int
	CodigoConcello       int
	Distrito             int
	Seccion              int
	CodigoMesa           string
	CandidaturaOuSenador int
	Votos                int
}

Jump to

Keyboard shortcuts

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