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
- Variables
- func Add(event Event)
- func Clear()
- func Populate(t *template.Template, data interface{}) string
- func Report(event Event)
- func Setup() error
- func T(name, value string) *template.Template
- type Event
- func AddNew(name, title, description string) Event
- func InvalidToken(address, auth string, err error) Event
- func Login(successful bool, address string, username string, password string) Event
- func New(name, title, description string) Event
- func RecordExpired(r *db.Record) Event
- func UpdateAvailable(curr_ver, new_ver, url string) Event
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 ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.