Help us shape the future of Go! Take the 2026 Go Developer Survey

auditor

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2019 License: MIT Imports: 1 Imported by: 0

README

go-auditor

Library to record user event trails to any database or console.

MIT License GoDoc Build Status Go Report Card Contributions welcome

This is work in progress

The development on this library just started.

Features

  • [x]

Installation

$ go get -u github.com/openbooking/go-auditor

Quick Start

package main

}

Documentation

Overview

auditor Package provides a logging facility for user actions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auditor

type Auditor interface {
	NewTrail(ctx context.Context, namespace, actor, clientIP string, group string) Trail
}

type Event

type Event struct {
	TargetID string
	Action   string
	Message  string
}

type Trail

type Trail interface {
	Log(event Event)
	LogIfChanged(event Event, oldval, newval interface{})
	LogIfBoolChanged(event Event, oldval, newval bool, trueMsg, falseMsg string)
	Success()
	Failed()
}

Directories

Path Synopsis
auditors

Jump to

Keyboard shortcuts

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