openlog

package
v0.0.0-...-3059351 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package opencivica contains utilities to get opencivica information from AppTransporte's logs

Index

Constants

View Source
const (
	PATH_LOGS  = "/SD/OpenCivica_Files/logs/"
	SHORT_FORM = "2018-04-17 11:53:48"
)

Variables

This section is empty.

Functions

func AppLogs

func AppLogs() []os.FileInfo

Iter of APP Logs (log.html*)

func AppVersions

func AppVersions(trs itertools.Iter) (versions map[string]string)

Iter to Parse App Version info in App

func CountErrorsAfter

func CountErrorsAfter(iterUsosLog itertools.Iter, timeref int64) (int64, int64)

func CountUsosAfter

func CountUsosAfter(iterUsosLog itertools.Iter, timeref int64) (int64, int64)

func MessageData

func MessageData(node *html.Node, iterData itertools.Iter, timeout int, quit <-chan int) bool

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

func ParseUsosLog(trs itertools.Iter) itertools.Iter

Parse Log Transaction to UsosTransporte Object

func ReadAppLogs

func ReadAppLogs(timeout int, quit <-chan int) itertools.Iter

Iter to App Logs Data

func ReadAppLogsTail

func ReadAppLogsTail(timeout int, quit <-chan int) itertools.Iter

Read log Transactions in mode "Tail" until quit<- channel

func ReadTransactions

func ReadTransactions(timeout int, quit <-chan int) itertools.Iter

Read log Transactions until quit<- channel

func ReadTransactionsTail

func ReadTransactionsTail(timeout int, quit <-chan int) itertools.Iter

Read log Transactions in mode "Tail" until quit<- channel

func TabVersions

func TabVersions(trs itertools.Iter) (versions map[string]string)

Iter to Parse Tables Version info in App

func TransactionsLogs

func TransactionsLogs() []os.FileInfo

Iter of App Log Transsaction (transacciones.html*)

Types

type AppLogData

type AppLogData struct {
	TimeRef int64
	Data    interface{}
	Level   string
}

APP log Data

func FuncAppVersionLog

func FuncAppVersionLog(data MessageType) AppLogData

Function to Parse App Version info

func FuncErrorLog

func FuncErrorLog(data MessageType) AppLogData

Function to Parse Log errors

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 Civica

type Civica interface{}

type Data

type Data struct {
	// contains filtered or unexported fields
}

type FuncParseLog

type FuncParseLog func(data MessageType) AppLogData

Function to Filter in Parse Iteration

type MessageType

type MessageType struct {
	Data  string
	Level string
}

Message Type. Data is the field to data, and Level is the field to Tag Level (INFO, WARN, FATAL, SEVERE, DEBUG)

type Sys

type Sys struct {
	Ctim TimeMod
	Atim TimeMod
	Mtim TimeMod
}

type TimeMod

type TimeMod struct {
	Nsec int64
	Sec  int64
}

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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