audit

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2020 License: MPL-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	SessionConnected     event = "session_connected"
	SessionDisonnected   event = "session_disconnected"
	SubscriptionCreated  event = "subscription_created"
	SubscriptionDeleted  event = "subscription_deleted"
	RetainMessageStored  event = "retained_message_stored"
	RetainMessageDeleted event = "retained_message_deleted"
	PeerLost             event = "peer_lost"
)

Variables

View Source
var FuncMap = template.FuncMap{
	"humanBytes": func(n int64) string {
		return humanize.Bytes(uint64(n))
	},
	"bytesToString": func(b []byte) string { return string(b) },
	"shorten":       func(s string) string { return s[0:8] },
	"parseDate": func(i int64) string {
		return time.Unix(0, i).Format(time.RFC3339)
	},
	"timeToDuration": func(i int64) string {
		return humanize.Time(time.Unix(i, 0))
	},
}

Functions

This section is empty.

Types

type Recorder

type Recorder interface {
	RecordEvent(tenant string, eventKind event, payload map[string]interface{}) error
}

func NoneRecorder

func NoneRecorder() Recorder

func StdoutRecorder

func StdoutRecorder() Recorder

Jump to

Keyboard shortcuts

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