events

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

* Arc - Copyleft of Simone 'evilsocket' Margaritelli. * evilsocket at protonmail dot com * https://www.evilsocket.net/ * * See LICENSE.

* Arc - Copyleft of Simone 'evilsocket' Margaritelli. * evilsocket at protonmail dot com * https://www.evilsocket.net/ * * See LICENSE.

* Arc - Copyleft of Simone 'evilsocket' Margaritelli. * evilsocket at protonmail dot com * https://www.evilsocket.net/ * * See LICENSE.

* Arc - Copyleft of Simone 'evilsocket' Margaritelli. * evilsocket at protonmail dot com * https://www.evilsocket.net/ * * See LICENSE.

Index

Constants

View Source
const TPL_DATE_FORMAT = "Mon Jan 2 15:04:05 2006"

Variables

View Source
var (
	Pool = make([]Event, 0)
)
View Source
var TPL_LOGIN_KO = T("login_ko",
	`On {{.When}} address <b>{{.Address}}</b> tried to log into the Arc server with username 
<b>{{.Username}}</b> and password <b>{{.Password}}</b>.`)
View Source
var TPL_LOGIN_OK = T("login_ok",
	"On {{.When}} address {{.Address}} successfully logged into the Arc server.")
View Source
var TPL_RECORD_EXPIRED = T("record_expired",
	`On {{.When}} the record <b>{{.Title}}</b> which was created on {{.CreatedAt}} and updated 
on {{.UpdatedAt}} expired, it was made of {{.Size}} bytes of {{.Encryption}} encrypted 
{{if .Compressed}}(and compressed) {{end}}data.{{if .Deleted}}<br/>The record has been deleted.{{end}}`)
View Source
var TPL_TOKEN_KO = T("token_ko",
	`On {{.When}} address <b>{{.Address}}</b> tried to authenticate with an invalid token 
( {{.Reason}} ).
<br/><br/>
<label>Token</label><br/>
<small>{{.Token}}</small>`)
View Source
var TPL_UPDATE = T("update",
	"You are running Arc v{{.Version}} but v{{.NewVersion}} is available <a href=\"{{.Link}}\">for download</a>.")

Functions

func Add

func Add(event Event)

func Clear

func Clear()

func Populate

func Populate(t *template.Template, data interface{}) string

func Report

func Report(event Event)

func Setup

func Setup() error

func T

func T(name, value string) *template.Template

golang, seriously?

Types

type Event

type Event struct {
	Name        string
	Time        time.Time
	Title       string
	Description string
}

func AddNew

func AddNew(name, title, description string) Event

func InvalidToken

func InvalidToken(address, auth string, err error) Event

func Login

func Login(successful bool, address string, username string, password string) Event

func New

func New(name, title, description string) Event

func RecordExpired

func RecordExpired(r *db.Record) Event

func UpdateAvailable

func UpdateAvailable(curr_ver, new_ver, url string) Event

func (Event) String

func (e Event) String() string

Jump to

Keyboard shortcuts

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