gopadroneleccr: github.com/lagarciag/gopadroneleccr/csvreader Index | Files

package csvreader

import "github.com/lagarciag/gopadroneleccr/csvreader"

csvreader reads the "provincia" files on a local directory decodes the csv and stores them in a Redis database.

Index

Package Files

csvreader.go

Constants

const (
    //IP Addres and port where the Redis Data base can be located.
    ADDRESS = "127.0.0.1:6379"
)

type PadronCsvReader Uses

type PadronCsvReader struct {
    TmpDir string
    // contains filtered or unexported fields
}

PadronCsvReader acts as an object container for this package

func NewPadronCsvReader Uses

func NewPadronCsvReader(provincia string) *PadronCsvReader

NewPadronCsvReader creates a reader for the cvs donloaded for each "provincia".

func (*PadronCsvReader) ReadDistElectoral Uses

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 Uses

func (p *PadronCsvReader) ReadProvincia()

ReadProvincia reads de csv for a provincia and stores the results in a Redis database

Package csvreader imports 8 packages (graph) and is imported by 1 packages. Updated 2016-07-15. Refresh now. Tools for package owners.