qlog

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2019 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 LogInfo added in v0.3.0

type LogInfo struct {
	// original values
	Address string

	// hold the information but aren't usually serialized
	Request        *dns.Msg                   `codec:"-",json:"-"`
	Response       *dns.Msg                   `codec:"-",json:"-"`
	Result         *resolver.ResolutionResult `codec:"-",json:"-"`
	RequestContext *resolver.RequestContext   `codec:"-",json:"-"`

	// generated/calculated values
	ConnectionType string
	RequestDomain  string
	RequestType    string
	Blocked        bool
	BlockedList    string
	BlockedRule    string
	Created        time.Time
}

info passed over channel and stored in database and that is recovered via the Query method

type QLog added in v0.3.0

type QLog interface {
	Query(query *QueryLogQuery) []LogInfo
	Log(address *net.IP, request *dns.Msg, response *dns.Msg, rCon *resolver.RequestContext, result *resolver.ResolutionResult)
}

public interface

func New added in v0.3.0

func New(conf *config.GudgeonConfig) (QLog, error)

create a new query log according to configuration

type QueryLogQuery added in v0.3.0

type QueryLogQuery struct {
	// query on fields
	Address        string
	ConnectionType string
	RequestDomain  string
	RequestType    string
	Blocked        *bool
	// query on created time
	After  *time.Time
	Before *time.Time
	// query limits for paging
	Skip  int
	Limit int
	// query sort
	SortBy  string
	Reverse *bool
}

the type that is used to make queries against the query log (should be used by the web interface to find queries)

Jump to

Keyboard shortcuts

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