everscribe

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2026 License: MIT Imports: 6 Imported by: 0

README ¶

Everscribe   +   Go

Go Reference

everscribe/sdk-go

Go SDK for the Everscribe API. It exposes middleware that records an audit event per request, a recorder for writing append-only audit events directly, and a minter for issuing short-lived browser tokens for embeddable components.

📖 Setup Documentation

Setup link What it is Pick it when
Hosted AI agent You install our GitHub App. Our server-side agent walks your repo, proposes a plan, and opens a PR you review. You want zero hand-wiring and are fine granting Everscribe read access to your repo. Paid feature.
BYOK Claude Code skill Install the es CLI and run es skills download setup. That drops a skill into your Claude Code skills directory, and your own local Claude agent does the setup. Same behavior as the hosted agent, but against your Anthropic key, and your source never leaves your machine. You do not want to grant Everscribe read access to your repo, and/or you want a free option and already have Claude Code.
Wire it up yourself Install the SDK and add the calls by hand. You want full control, or you are instrumenting a small surface.

Supported frameworks

  • net/http
  • chi
  • gorilla/mux
  • gin
  • echo v4
  • fiber v3

[!NOTE] Interceptors available for gRPC servers.

Your framework missing? Open an issue.

Additional resources

Documentation ¶

Overview ¶

Package everscribe is the top-level entry point for the Everscribe Go SDK. It binds a project's credentials once and hands out per-surface clients (recorder for ingest, minter for read-side embed-token minting) that share the same auth.

Typical usage:

import "github.com/everscribe/sdk-go"

es, err := everscribe.New(projectID, apiKey)
if err != nil {
    log.Fatal(err)
}
rec := es.NewRecorder()
defer rec.Close()

m := es.NewMinter()
token, err := m.MintToken(ctx, minter.TokenOptions{...})

For 12-factor / containerized deployments, NewFromEnv reads EVERSCRIBE_PROJECT_ID and EVERSCRIBE_API_KEY from the process environment.

Customers who only need one surface can call its constructor directly - recorder.New(projectID, apiKey) and minter.New(projectID, apiKey) both still work and skip the SDK-client step.

Index ¶

Constants ¶

This section is empty.

Variables ¶

This section is empty.

Functions ¶

This section is empty.

Types ¶

type Client ¶

type Client struct {
	// contains filtered or unexported fields
}

Client is a credential-bearing handle to an Everscribe project. It does not hold network state itself; subclient constructors (NewRecorder, NewMinter) build per-surface clients that own their own connections.

Reuse a single Client for the lifetime of the process; safe for concurrent use.

func New ¶

func New(projectID, apiKey string) (*Client, error)

New returns a Client bound to projectID, authenticating subclient requests with apiKey. Both arguments are trimmed; an empty or whitespace-only value returns an error so configuration bugs surface at construction rather than at the first network call.

func NewFromEnv ¶

func NewFromEnv() (*Client, error)

NewFromEnv constructs a Client from EVERSCRIBE_PROJECT_ID and EVERSCRIBE_API_KEY in the process environment, returning an error naming whichever variable is unset or empty after trimming.

Use it in 12-factor bootstraps so credentials stay out of source; call New directly when tests or CLIs pass credentials explicitly.

func (*Client) NewMinter ¶

func (c *Client) NewMinter(opts ...minter.Option) *minter.Client

NewMinter returns a minter client for the bound project. Forwarded options apply to the minter; see the minter package for the full list (WithBaseURL, WithHTTPClient).

func (*Client) NewRecorder ¶

func (c *Client) NewRecorder(opts ...recorder.RecorderOption) *recorder.BufferedRecorder

NewRecorder returns a buffered recorder for the bound project. Forwarded options apply to the recorder; see the recorder package for the full list (WithBufferSize, WithFlushInterval, WithBaseURL, etc.).

Directories ¶

Path Synopsis
pkg
event
Package event is the audit-event domain: the record type, the per-request record lifecycle, and the framework adapters that drive it.
Package event is the audit-event domain: the record type, the per-request record lifecycle, and the framework adapters that drive it.
minter
Package minter mints embed tokens used by the Everscribe embeddable component to display audit events from a customer's frontend without exposing the project API key.
Package minter mints embed tokens used by the Everscribe embeddable component to display audit events from a customer's frontend without exposing the project API key.
recorder
Package recorder provides an append-only event recording client for the audit-log ingestion API.
Package recorder provides an append-only event recording client for the audit-log ingestion API.

Jump to

Keyboard shortcuts

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