Documentation ¶
Overview ¶
csvreader reads the "provincia" files on a local directory decodes the csv and stores them in a Redis database.
Index ¶
Constants ¶
View Source
const (
//IP Addres and port where the Redis Data base can be located.
ADDRESS = "127.0.0.1:6379"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PadronCsvReader ¶
type PadronCsvReader struct { TmpDir string // contains filtered or unexported fields }
PadronCsvReader acts as an object container for this package
func NewPadronCsvReader ¶
func NewPadronCsvReader(provincia string) *PadronCsvReader
NewPadronCsvReader creates a reader for the cvs donloaded for each "provincia".
func (*PadronCsvReader) ReadDistElectoral ¶
func (p *PadronCsvReader) ReadDistElectoral()
ReadDistElectoral read the electoral codes from the Distelect file and stores the results in a CodeElectT struct that is later saved in a map that is eventually used by ReadProvincia to decode the eleccode into real places names.
func (*PadronCsvReader) ReadProvincia ¶
func (p *PadronCsvReader) ReadProvincia()
ReadProvincia reads de csv for a provincia and stores the results in a Redis database
Click to show internal directories.
Click to hide internal directories.