mysql

package
v0.0.0-...-e66e7a7 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2023 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 LogStore

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

LogStore implements a log store in mysql

func New

func New(dbdriver string, dbconnection string) (*LogStore, error)

New defines the connection information for the log store

func (*LogStore) Clear

func (s *LogStore) Clear(ctx context.Context) error

Clear drops the tables used for storing log data, normally so they can be recreated in a new format

func (*LogStore) Close

func (s *LogStore) Close()

Close closes the database connection

func (*LogStore) Init

func (s *LogStore) Init(ctx context.Context) error

Init creates the table structure for storing records, if necessary

func (*LogStore) LookupIPAddress

func (s *LogStore) LookupIPAddress(ip string) (string, error)

LookupIPAddress retrieves the uuid for an ip address

func (*LogStore) LookupLogFile

func (s *LogStore) LookupLogFile(logfile string, modified time.Time) (string, time.Time, error)

LookupLogFile retrieves the file id of a log file

func (*LogStore) LookupReferrer

func (s *LogStore) LookupReferrer(referrer string) (string, error)

LookupReferrer retrieves the referrer

func (*LogStore) LookupURI

func (s *LogStore) LookupURI(uri string) (string, error)

LookupURI retrieves the file id of a log file

func (*LogStore) Open

func (s *LogStore) Open() error

Open creates a connection to the log store

func (*LogStore) Ping

func (s *LogStore) Ping(ctx context.Context) error

Ping creates the table structure for storing records, if necessary

func (*LogStore) PrintSchema

func (s *LogStore) PrintSchema()

PrintSchema displays the SQL to create the necessary tables

func (*LogStore) WriteHTTPLogEntry

func (s *LogStore) WriteHTTPLogEntry(ctx context.Context, entry httplog.Entry) error

WriteHTTPLogEntry writes an http log entry to the log store

Jump to

Keyboard shortcuts

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