reader

package
v0.0.0-...-683f5ea Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InputReader

type InputReader interface {
	ReadLine() (map[string]string, error)
	Close() error
}

func CreateInputReader

func CreateInputReader(config *config.Config, openFiles *files.FilesHandler) (InputReader, error)

type LmBackup

type LmBackup struct {
	Source LmLog `json:"_source"`
}

LmBackup represents log line in LM Backup format

type LmBackupReader

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

LmExportReader represents a reader for LM Backup filetype, which should be a gzip

func NewLmBackupReader

func NewLmBackupReader(input *os.File) (*LmBackupReader, error)

func (*LmBackupReader) Close

func (r *LmBackupReader) Close() error

func (*LmBackupReader) ReadLine

func (r *LmBackupReader) ReadLine() (map[string]string, error)

ReadLine returns a single log line from LM Backup file. Log line is formatted into map[string]string as expected by Anonymizer.

type LmExportReader

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

LmExportReader represents a reader for LM Export filetype, which should be a CSV

func NewLmExportReader

func NewLmExportReader(input *os.File) (*LmExportReader, error)

func (*LmExportReader) Close

func (r *LmExportReader) Close() error

func (*LmExportReader) ReadLine

func (r *LmExportReader) ReadLine() (map[string]string, error)

ReadLine returns a single log line from LM Export file. Log line is formatted into map[string]string as expected by Anonymizer.

type LmLog

type LmLog struct {
	Raw string                 `json:"raw"`
	Msg map[string]interface{} `json:"msg"`
}

LmBackup represents raw and msg fields contained in LM Backup format

Jump to

Keyboard shortcuts

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