querylog

package module
v0.0.0-...-74a594f Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2020 License: MIT Imports: 15 Imported by: 0

README

query-log

Ecletus Database Query Logger features

Documentation

Index

Constants

View Source
const CFG_FILE = "query-log.yaml"

Variables

This section is empty.

Functions

func Setup

func Setup(cfg *Config, agp *ecletus.Ecletus, sites *core.SitesRegister)

Types

type Actions

type Actions []string

func (Actions) Accept

func (actions Actions) Accept(action string) bool

type Config

type Config struct {
	Outputs []ConfigOutput
}

type ConfigOutput

type ConfigOutput struct {
	Dest     string
	Perm     os.FileMode
	Truncate bool
	Rules    []ConfigRule
}

type ConfigRule

type ConfigRule struct {
	Key     string
	Regex   bool
	Term    string
	Dbs     Actions
	Sites   Actions
	Actions Actions
	Hosts   Actions
	Values  bool
	Error   bool
	Tables  []string
}

type ContainsRule

type ContainsRule struct {
	Term string
}

func (ContainsRule) Accept

func (r ContainsRule) Accept(s *aorm.Scope) bool

type Output

type Output struct {
	io.WriteCloser
	Rules []*Rule
	// contains filtered or unexported fields
}

func (Output) Close

func (o Output) Close() error

type Plugin

type Plugin struct {
	plug.EventDispatcher
	ConfigDirKey     string
	SitesRegisterKey string
	// contains filtered or unexported fields
}

func (*Plugin) Init

func (p *Plugin) Init(options *plug.Options)

func (*Plugin) OnRegister

func (p *Plugin) OnRegister(options *plug.Options)

func (*Plugin) RequireOptions

func (p *Plugin) RequireOptions() []string

type RegexRule

type RegexRule struct {
	Term *regexp.Regexp
}

func (RegexRule) Accept

func (r RegexRule) Accept(s *aorm.Scope) bool

type Rule

type Rule struct {
	ConfigRule
	Term TermRule
}

func (*Rule) Accept

func (r *Rule) Accept(ctx *core.Context, site *core.Site, action string, scope *aorm.Scope) bool

type TermRule

type TermRule interface {
	Accept(s *aorm.Scope) bool
}

Jump to

Keyboard shortcuts

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