Skip to main content


On this page, we get you up and running with Retraced's Go SDK in your application.


go get

Basic Usage

Error handling omitted for brevity.

Initialize a client

import ""

client, _ := retraced.NewClient("The host, defaults to http://localhost:3000/auditlog", "You Retraced project id goes here", "Your Retraced Publisher API token goes here")

Report an event

event := &retraced.Event{
Created: time.Now(),
CRUD: "r",
Action: "user.login",
Description: "User Alice logged in",
SourceIP: "",
Actor: &retraced.Actor{ID: "[email protected]", Name: "Alice"},
Group: &retraced.Group{ID: ""},

resp, _ := client.ReportEvent(event)

Verify the event receipt hash

err := event.VerifyHash(resp)
if err != nil {
// hashes did not match
} else {
// event reported successfully