Documentation ¶
Overview ¶
Package opencivica contains utilities to get opencivica information from AppTransporte's logs
Index ¶
- Constants
- func AppLogs() []os.FileInfo
- func AppVersions(trs itertools.Iter) (versions map[string]string)
- func CountErrorsAfter(iterUsosLog itertools.Iter, timeref int64) (int64, int64)
- func CountUsosAfter(iterUsosLog itertools.Iter, timeref int64) (int64, int64)
- func MessageData(node *html.Node, iterData itertools.Iter, timeout int, quit <-chan int) bool
- func ParseAppLog(f FuncParseLog, trs itertools.Iter) itertools.Iter
- func ParseUsosLog(trs itertools.Iter) itertools.Iter
- func ReadAppLogs(timeout int, quit <-chan int) itertools.Iter
- func ReadAppLogsTail(timeout int, quit <-chan int) itertools.Iter
- func ReadTransactions(timeout int, quit <-chan int) itertools.Iter
- func ReadTransactionsTail(timeout int, quit <-chan int) itertools.Iter
- func TabVersions(trs itertools.Iter) (versions map[string]string)
- func TransactionsLogs() []os.FileInfo
- type AppLogData
- type Civica
- type Data
- type FuncParseLog
- type MessageType
- type Sys
- type TimeMod
- type UsoTransporte
Constants ¶
const ( PATH_LOGS = "/SD/OpenCivica_Files/logs/" SHORT_FORM = "2018-04-17 11:53:48" )
Variables ¶
This section is empty.
Functions ¶
func AppVersions ¶
Iter to Parse App Version info in App
func CountErrorsAfter ¶
func MessageData ¶
Extract MessageData from Log html
func ParseAppLog ¶
func ParseAppLog(f FuncParseLog, trs itertools.Iter) itertools.Iter
Iter to Parse Function in Iter Data Log
func ParseUsosLog ¶
Parse Log Transaction to UsosTransporte Object
func ReadAppLogs ¶
Iter to App Logs Data
func ReadAppLogsTail ¶
Read log Transactions in mode "Tail" until quit<- channel
func ReadTransactions ¶
Read log Transactions until quit<- channel
func ReadTransactionsTail ¶
Read log Transactions in mode "Tail" until quit<- channel
func TabVersions ¶
Iter to Parse Tables Version info in App
func TransactionsLogs ¶
Iter of App Log Transsaction (transacciones.html*)
Types ¶
type AppLogData ¶
APP log Data
func FuncAppVersionLog ¶
func FuncAppVersionLog(data MessageType) AppLogData
Function to Parse App Version info
func FuncSubrutaLog ¶
func FuncSubrutaLog(data MessageType) AppLogData
Function to Parse Subruta info
func FuncTabVersionLog ¶
func FuncTabVersionLog(data MessageType) AppLogData
Function to Parse Tables Version info in App
type FuncParseLog ¶
type FuncParseLog func(data MessageType) AppLogData
Function to Filter in Parse Iteration
type MessageType ¶
Message Type. Data is the field to data, and Level is the field to Tag Level (INFO, WARN, FATAL, SEVERE, DEBUG)
type UsoTransporte ¶
type UsoTransporte struct { TipoTarjeta string CivicaBefore Civica CivicaAfter Civica PTtvId int `json:"p_ttv_id:` PLocId int `json:"p_loc_id"` PEquSerie int `json:"p_equ_serie"` PPotId int `json:"p_pot_id"` PCarId int `json:"p_car_id"` PTnvData int64 `json:"p_tnv_data"` PTnvSeqEquip int `json:"p_tnv_seq_equip"` PTnvValor int `json:"p_tnv_valor"` PTnvSaldoPost int `json:"p_tnv_saldo_post"` SaldoBancos int `json:"saldoBancos"` PFptId int `json:"p_fpt_id"` PTnvDataAnt int64 `json:"p_tnv_data_ant"` PLocIdAnt int `json:"p_loc_id_ant"` PTnvValorAnt int `json:"p_tnv_valor_ant"` PRotIdAnt int `json:"p_rot_id_ant"` PRotIdAntAnt int `json:"p_rot_id_ant_ant"` PTnvContTempo int `json:"p_tnv_cont_tempo"` PFptIdAnt int `json:"p_fpt_id_ant"` PPerId int `json:"p_per_id"` PTnvContarj int `json:"p_tnv_contarj"` PTnvPasos int `json:"p_tnv_pasos"` PEquSerieAnt int `json:"p_equ_serie_ant(NO_DEFINIDO)"` PTnvValorLiq int `json:"p_tnv_valor_liq"` PTnvValorCred int `json:"p_tnv_valor_cred"` PTnvSaldoCred int `json:"p_tnv_saldo_cred"` PTnvSecUsoEnTrayecto int `json:"p_tnv_sec_uso_en_trayecto"` PSubRutId int `json:"p_subrut_id"` UsoId int64 `json:"usoId"` Exitoso bool `json:"exitoso"` VerTarjBloq bool `json:"verTarjBloq"` VerListaNegra bool `json:"verListaNegra"` VerLimitSinUso bool `json:"verLimitSinUso"` VerPerfilLimiteTiempo bool `json:"verPerfilLimiteTiempo"` VerFechaValMon bool `json:"verFechaValMon"` VerFechaValBen bool `json:"verFechaValBen"` MinFaltantesParaCumplirPerfilLimTiempo int `json:"minFaltantesParaCumplirPerfilLimTiempo"` TarifNoEncontrada bool `json:"tarifNoEncontrada"` EstadoEscritura int `json:"estadoEscritura"` SinSaldo bool `json:"sinSaldo"` SeHaBloqueado bool `json:"seHaBloqueado"` SaldoAntesDelUso int `json:"saldoAntesDelUso"` SaldoBancosAntesDelUso int `json:"saldoBancosAntesDelUso"` TimeoutTorniqueteExced bool `json:"timeoutTorniqueteExced"` LecturaMs int `json:"lecturaMs"` ReglaNegocioMs int `json:"reglaNegocioMs"` EscrituraMs int `json:"escrituraMs"` }
Transportation Use object in the log register