log

package
v0.0.0-...-d866e0e Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2019 License: Unlicense Imports: 7 Imported by: 0

Documentation

Overview

Package log contains the parsing and the normalization.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	RemoteHost    string
	RemoteLogName string
	AuthUser      string
	Datetime      time.Time

	Method  string
	Request string
	Status  int16
	Size    int64
}

Entry contains the line information

func (*Entry) Section

func (e *Entry) Section() string

Section returns the section of the request /pages/subpage1/..../subpageN => /pages /pages/ => /pages /pages => /pages / => /

=> /

type Normalizer

type Normalizer interface {
	Normalize(context.Context, <-chan string) (<-chan Entry, <-chan error)
}

Normalizer it normalizes the line in Entry

func NewDefaultNormalizer

func NewDefaultNormalizer() Normalizer

NewDefaultNormalizer creates a normalizer on string

type Parser

type Parser interface {
	Parse(string) (*Entry, error)
}

Parser parses of line

func NewDefaultParser

func NewDefaultParser() Parser

NewDefaultParser the default parser

Jump to

Keyboard shortcuts

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