go

module
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0

README

CloakAPI Go SDK

Go client for the CloakAPI gateway. Personal data in a prompt is replaced with stand-ins in your process before the request leaves it; the gateway relays the request to the model provider without reading the prompt; the reply comes back with the original values restored locally.

Detection can miss values. The SDK shows you the exact outgoing body before anything is sent, and tells you which detection ran.

  • Module cloakapi.io/go v1.3.1, package cloakapi. Apache-2.0.
  • Go 1.22 or newer. No dependencies outside the standard library.
  • Part of release set R-1.6.1 (rule set 1.6.1). See CHANGELOG.md.

What runs where

Your system Detection
Linux x86-64 or arm64 with glibc 2.39+ (Ubuntu 24.04, Debian 13), built with cgo, engine file installed and pinned The on-device engine: structured values, and names from its built-in list. With the optional name model (about 178 MB), names beyond the list.
macOS, Windows, Alpine (musl), older Linux, or any build with CGO_ENABLED=0 Built-in rules: every rule type of the bundled rule file that has a pattern, 139 of 142 (see "The built-in rules"). The three it cannot run are names of people, places and organisations: they are usually not detected.

The downloadable shared engine requires Linux x86-64 or Linux aarch64 with glibc 2.39 or newer (Ubuntu 24.04, Debian 13). macOS and Windows are not supported. Older distributions (Ubuntu 22.04, Debian 12) and musl/Alpine are not supported yet.

In both cases the request is sent. With less than full detection, the review callback, the reply and one line on standard error say so. The arm64 engine build has not been run by this SDK's tests.

A request prepared by the built-in rules states no engine identity (it declares X-CloakAPI-Tokenized: true;coverage=rules_only and carries the proof for its bytes). With GATEWAY_ENGINE_ACCEPT_RULES_ONLY unset, EnforceEngineFloor accepts that declared send when the MAC is valid, and the receipt says that no engine was verified. HTTP 428 engine_identity_required is the answer only when the engine version is missing and the request is not that declared send. An invalid MAC is HTTP 403, not 428. The SDK sends the same request either way. Everything before the send (replacement, review, the exact request) works on every platform, and examples/fake-gateway lets you watch it without a key.

The built-in rules

Without the engine, text is prepared by rules compiled into the SDK. They run the same rule file the engine is built from (cloakapi/pii/rules/patterns.json, rule set 1.6.1, embedded in the binary): 139 of its 142 rule types. The other three, NAME, PLACE and ORGANIZATION, have no pattern; only the engine and its name model find those.

  • Ten types come from a hand-kept table in this package: e-mail address, phone number, US social security number, IBAN, IPv4 address, card number, street address, date of birth, API key and JWT. Its behaviour is as in 1.2.0.
  • The other 129 types are run from the rule file as written: its pattern, the check digit the type names where it names one (Luhn, Verhoeff, and the rules of national numbers such as the Norwegian, Swedish and Polish ones), and the file's own order of precedence where two types match the same characters. They add national identity and tax numbers (about 70 types), organisation numbers (15), postal codes (14), health identifiers (11), bank and payment account formats (9), passports, IPv6 and MAC addresses, URLs, device and biometric identifiers, coordinates and @handles.
  • A type whose pattern starts with a cue word ("phone:", "passport no.", "fødselsnummer") replaces the cue together with the value, as the rule file defines it: Call 912 34 567 now becomes <<CLOAK:PHONE:…>> now.
  • The rules replace on shape, not on meaning. A date is replaced as a date of birth, a bare ten-digit number as a phone number, an EAN code that happens to pass a national check digit as an identity number. Nothing is refused for it; the text you review shows every replacement, and the reply is restored.
  • Text up to 64 KiB is scanned whole. Longer text is scanned in pieces of that size, cut at a line break or space. The rule file gets two seconds for the pieces after the first; if that is not enough, the hand-kept table has still checked all of the text, and the result carries the notice unchecked_content / detection_limit.
  • Time, measured on an 8-core laptop: about 3 ms for a sentence with five values, about 0.25 s for 11 KB of prose and tables and 1.4 s for 61 KB. Four fifths of that is the hand-kept table (its date-of-birth pattern), as in 1.2.0. The rule file's patterns are compiled once per process, on first use (under 0.1 s), and each is skipped on a text that cannot match it.

The rule runner is tested against vectors shared by all CloakAPI SDKs (testdata/shared/rules-lane-vectors.json, 1,170 texts and 621 check-digit rows computed from the TypeScript reference): go test ./cloakapi/pii/ -run RuleFile.

Install

The module path is cloakapi.io/go, and this directory is the root of that repository (go.mod at the top). When the tag v1.3.1 of that repository is published, the Go module proxy serves it:

go get cloakapi.io/go@v1.3.1

Your go.mod then holds require cloakapi.io/go v1.3.1.

The same source is on the downloads page as an archive, for a build without the proxy:

curl -fsSLO https://app.cloakapi.io/downloads/sdks/go/cloakapi-go-1.3.1-src.zip
unzip -q cloakapi-go-1.3.1-src.zip -d third_party      # creates third_party/go
go mod init hello
go mod edit -require cloakapi.io/go@v1.3.1
go mod edit -replace cloakapi.io/go=./third_party/go

With the archive there is nothing to download from a module proxy, and GOFLAGS=-mod=mod GOPROXY=off go build ./... works. To keep the SDK inside your repository, copy third_party/go under your module and keep the replace.

Check what you have:

fmt.Println(cloakapi.Version())                 // 1.3.1
fmt.Println(engine.Issue(), engine.IssueMessage()) // "" when the engine is in use

Hello world

examples/hello/main.go (in the archive) is the program below. It needs CLOAKAPI_API_KEY; create a key at app.cloakapi.io/api-keys. It starts with cloak_. Verify your email to see whether you qualify for a trial balance.

package main

import (
	"bufio"
	"context"
	"fmt"
	"os"
	"strings"

	"cloakapi.io/go/cloakapi"
)

const prompt = "Say hello to jane.doe@example.com in one short sentence."

func main() {
	apiKey := os.Getenv("CLOAKAPI_API_KEY")
	if apiKey == "" {
		fmt.Fprintln(os.Stderr, "CLOAKAPI_API_KEY is not set. Create a key at https://app.cloakapi.io/api-keys")
		os.Exit(1)
	}

	stdin := bufio.NewReader(os.Stdin)
	client := cloakapi.NewClient(apiKey, &cloakapi.Config{
		BaseURL: os.Getenv("CLOAKAPI_BASE_URL"), // empty: https://api.cloakapi.io
		// Called once per request with the exact outgoing body and how it was checked.
		Review: func(req cloakapi.EgressRequest) bool {
			fmt.Printf("Coverage: %s (%s)\n", req.Info.Coverage, req.Info.State)
			for _, w := range req.Info.Warnings {
				fmt.Printf("Notice %s/%s: %s\n", w.Code, w.Reason, w.Message)
			}
			fmt.Printf("This exact body will leave your machine:\n%s\nSend it? [y/N] ", req.Text())
			answer, _ := stdin.ReadString('\n')
			return strings.EqualFold(strings.TrimSpace(answer), "y")
		},
	})

	reply, err := client.Messages.Create(context.Background(), cloakapi.MessagesRequest{
		Model:     "claude-sonnet-4-6",
		MaxTokens: 100,
		Messages:  []cloakapi.Message{{Role: "user", Content: prompt}},
	})
	if err != nil {
		if err == cloakapi.ErrReviewRejected {
			fmt.Println("\nNot sent. You declined the request.")
			return
		}
		fmt.Fprintln(os.Stderr, "\nRequest failed:", err)
		os.Exit(1)
	}
	fmt.Println("\nReply (restored on your device):")
	fmt.Println(reply.FirstText())
}

Run it without a key against the stand-in gateway in the archive:

go run ./third_party/go/examples/fake-gateway &          # 127.0.0.1:8787
CLOAKAPI_API_KEY=cloak_demo CLOAKAPI_BASE_URL=http://127.0.0.1:8787 go run .

You see the notice for the detection that ran, then the body with the address replaced (as JSON, so < is written <: <<CLOAK:EMAIL:…), and after y the reply with jane.doe@example.com restored. The stand-in gateway checks nothing and repeats your text back; the real gateway also checks the key, the proof for the body and the engine identity. With a real key and no CLOAKAPI_BASE_URL the same program calls https://api.cloakapi.io.

A server-side program that has its own controls can approve without showing anything: Review: func(cloakapi.EgressRequest) bool { return true }.

Review: callback form and step form

The same review in two shapes. A request that was not approved is not sent.

Callback form (above): Config.Review receives an EgressRequest: Body (Text() as a string) is the exact outgoing body, and Info is a ReviewInfo{State, Coverage, Warnings}. It also carries Method, URL and Headers; Headers include Authorization, so do not log them. No callback gives ErrReviewRequired; a callback that returns false gives ErrReviewRejected. Nothing has been sent in either case.

Step form, for applications with their own review screen:

prepared, err := client.Messages.Prepare(ctx, req) // replaced on-device; nothing is sent
show(prepared.Text(), prepared.Coverage(), prepared.Warnings())
approved := client.Approve(prepared)
reply, err := client.Messages.Send(ctx, approved)  // sends exactly prepared.Text()

client.Chat.Completions has the same Prepare and Send. Send accepts an approval once, from the client that prepared the request, for the same endpoint; anything else is ErrReviewRequired.

Go Other SDKs of the release set
Callback Config.Review func(EgressRequest) bool review(text, info)
Info ReviewInfo{State, Coverage, Warnings} {state, coverage, warnings}
Notice SendWarning{Code, Reason, Message} {code, reason, message}
Steps Prepare, Client.Approve, Send prepare, approve, send
On the reply reply.Coverage, reply.Warnings coverage, warnings

Coverage and notices

Coverage is full (engine with name model), rules_and_names, or rules_only. A SendWarning does not stop a request.

Code Reason Meaning
reduced_coverage engine_missing No engine file is configured, the platform has none, or the program was built without cgo.
engine_unloadable The file could not be read or loaded. On Linux the message names the glibc version when that is the cause, and says so for musl.
pin_missing CLOAKAPI_ENGINE_LIB is set and CLOAKAPI_ENGINE_SHA256_PIN is not. The file was not opened.
pin_mismatch The pin is not the SHA-256 of the file. The file was not loaded.
ruleset_mismatch The engine reports another rule set than this SDK was built for (for example 1.6.0).
model_missing The engine runs without the optional name model.
unchecked_content detection_limit The text is longer or denser than the built-in rules examine within their limits (see "The built-in rules"); part of it was checked by fewer rules, or not at all, and is sent as written.

Standard mode warns and continues with the available detection; names may remain unchanged. Config.StrictReducedCoverage is the one switch that makes reduced coverage an error (engine.ErrReducedCoverage) before anything is sent. The host can set the same switch with CLOAKAPI_ALLOW_REDUCED=strict (or 0, false, no, off); no other value of that variable changes anything.

CloakAPI does not refuse a request because of what its text contains. What stops a call: a missing or declined review, your key, balance or usage limits, the request format (including a model field that cannot be a model id, an unknown role, or an explicitly chosen substitution style the available detection cannot produce), size, the model provider, the gateway, and the network.

The engine and its pin

The engine is a shared library loaded at run time through cgo and dlopen. It is not compiled into your program and the SDK contains no engine code: without the file you get the built-in rules.

export CLOAKAPI_ENGINE_LIB=/opt/cloakapi/libcloak_engine-0.3.0+b2aec8d6.so
export CLOAKAPI_ENGINE_SHA256_PIN=b2aec8d6d90ead4328258270c41a79dda4e1f71efa79025f308ce8e09f080744

Download and verify the file as described on Engine setup. The rule, the same in every SDK of this release set:

  1. The file is read once and hashed. It is used only when the hash equals the pin; an engine without a pin is not used. A private copy of exactly those bytes is loaded and removed again, so the identity the SDK reports is that of the code that runs, also if the file on disk is replaced afterwards.
  2. The engine must report rule set 1.6.1, the one this SDK was built for.
  3. If either does not hold, the engine is not in use, engine.Issue() gives the reason, and requests go on with the built-in rules and a notice. A missing or wrong pin does not stop a request.

Instead of the two variables you can place the release's engine file as _lib/libcloak_engine.so beside your executable; it is accepted when it is byte for byte the build of this release (engine.ReleaseEngineSHA256).

Consequences of cgo: building needs a C compiler and CGO_ENABLED=1; cross-compiling needs a C cross-compiler for the target; a fully static binary (-extldflags -static, or musl) cannot dlopen the engine and runs the rules. CGO_ENABLED=0 builds everywhere, cross-compiles freely, and runs the rules. The engine library writes its own diagnostic lines to standard error when the name model is not found.

A request prepared with the engine states X-Cloak-Engine-Version and X-Cloak-Engine-Hash (the SHA-256 of the loaded file). A request prepared by the rules states neither. Every request states X-CloakAPI-Tokenized: true;coverage=<coverage> and carries the proof for its exact bytes (X-Cloak-Client-MAC), which the SDK requests from the gateway with your API key just before the send.

Using one client from many goroutines

A Client is safe for concurrent use. All requests of one client share one conversation: the same value gets the same stand-in across them. With the engine, text preparation of one client runs one request at a time, so that overlapping requests cannot lose each other's stand-ins; the network calls run concurrently. Use separate clients for separate conversations.

If something goes wrong

You see Meaning What to do
CLOAKAPI_API_KEY is not set (the example) No key Create one at app.cloakapi.io/api-keys
cloakapi: request requires explicit review approval; no request was sent No Config.Review and no step form Add the callback or use Prepare, Approve, Send
cloakapi: request review was not approved; no request was sent The callback returned false Not an error of the SDK
cloakapi: could not obtain the pre-tokenised MAC; refusing to relay The proof call failed: key not accepted, gateway unreachable, or a stand-in gateway that does not answer it Check the key and the network
cloakapi: HTTP 428 request failed HTTP 428 engine_identity_required: the engine version is missing and the request is not a declared X-CloakAPI-Tokenized: true;coverage=rules_only send with a valid MAC (see "What runs where") Send the declared rules-only request, or install and pin the engine
cloakapi: HTTP 401 request failed / 403 Key not accepted, or the engine identity is not one the gateway knows Check the key; use the engine file of this release
Insufficient credit balance. Please top up your account to continue. Balance (402) Verify your email or add your own provider key in the portal
cloakapi: HTTP 429 request failed Usage limit Wait and retry; APIError.RetryAfter when the gateway gives one
cloakapi: HTTP 400 request failed / 413 Request format or size Fix or shorten the request
cloakapi: relay structural field is not safe to send The model field is not a model id, or a role is not one of system, developer, user, assistant Fix the request
cloakapi: requested surrogate mode is unavailable; refusing to relay Config.SurrogateMode was set to balanced explicitly and only the rules are available, which write <<CLOAK:…>> markers Leave the mode unset, set max, or install the engine
A line starting ⚠ CloakAPI REDUCED COVERAGE on standard error Once per process when detection is reduced See "Coverage and notices"

Error values carry a status code and a fixed code where the gateway gives one (APIError.StatusCode, APIError.Code); they do not repeat gateway or request text.

What this does and does not do

  • Detection is best-effort. Structured values are matched by rules; names use the engine's built-in list and an optional on-device model, and may be missed. A value the detector misses is sent as written. See known limitations.
  • The reply is restored from the stand-ins of the same request. A stand-in you wrote into your own text yourself is left alone.
  • The gateway does not run detection on your content. It checks the request proof and relays the request to the model provider.
  • Receipts: this SDK verifies a device receipt offline with the key you pass (VerifyDeviceReceipt, VerifyReceipt). A passing check shows the record is intact and was signed with that key; it does not show what was or was not detected in your text.

Next steps

Reference

Tool-call arguments

The Go SDK's request types expose messages as role and content; they do not provide OpenAI tool_calls[].function.arguments. The typed SDK API therefore cannot send this tool-argument field.

Metadata

MessagesRequest.Metadata is text on the wire. Detected values in metadata values and keys are replaced like message text; your own map is not modified.


File & image tokenisation

(*Client).TokenizeFile attempts local processing for a supported document or image when a compatible engine is available. Images (PNG / JPEG / WebP / GIF / BMP / TIFF) are OCR'd on-device; PDF / DOCX / XLSX / PPTX / CSV / HTML / … are extracted and tokenised — the shared engine's single file-pipeline decides what to do from the MIME type (and, when ambiguous, the filename + magic bytes). The engine may refuse unsupported or undecodable files; builds without CGO cannot provide this file helper.

package main

import (
	"bufio"
	"context"
	"fmt"
	"log"
	"os"
	"strings"

	"cloakapi.io/go/cloakapi"
)

func main() {
stdin := bufio.NewReader(os.Stdin)
client := cloakapi.NewClient(os.Getenv("CLOAKAPI_API_KEY"), &cloakapi.Config{
	Review: func(req cloakapi.EgressRequest) bool {
		fmt.Printf("This exact request will leave your machine:\n\n%s %s\n%s\n\nSend it? [y/N] ", req.Method, req.URL, req.Body)
		answer, _ := stdin.ReadString('\n')
		return strings.EqualFold(strings.TrimSpace(answer), "y")
	},
})

data, err := os.ReadFile("patient_intake.png")
if err != nil {
	log.Fatal(err)
}

res, err := client.TokenizeFile(data, cloakapi.FileOptions{
	Mime:     "image/png",
	Filename: "patient_intake.png",
})
if err != nil {
	log.Fatal(err) // file processing needs the local engine; no raw file is relayed here
}

// res.Text       => tokenised Markdown — the ONLY thing meant to egress
// res.TokenMap   => local map (do not send off-device)
// res.Categories => placeholder labels in max mode, e.g. ["CONTACT_EM", "PERSON"];
//                   empty in the default balanced mode (realistic stand-ins)
// res.Meta       => {"mime":"image/png", "extractor":…, "pii_count":3, "needs_ocr":true, …}

resp, err := client.Messages.Create(context.Background(), cloakapi.MessagesRequest{
	Model:    "claude-sonnet-4-6",
	Messages: []cloakapi.Message{{Role: "user", Content: "Summarise this intake form:\n\n" + res.Text}},
})
if err != nil {
	log.Fatal(err)
}
fmt.Println(resp.FirstText()) // names/emails/phones restored on-device
}

File and image processing requires a compatible local engine. If it is unavailable or refuses an input, TokenizeFile returns an error; this example does not relay the raw file. On success, pass the returned text to the reviewed message request. Session map merge lets later replies detokenise on-device.

The engine binary

See The engine and its pin. Files and images require the engine: if it is not in use, TokenizeFile returns an error and nothing is sent. Without the name model the engine text is returned with a reduced-coverage warning. Config.StrictReducedCoverage refuses that result (engine.ErrReducedCoverage) and the error says the call was refused. Builds with CGO_ENABLED=0 cannot provide the file helper.


Name detection and the neural model

Person names are detected in two layers. Structured identifiers (emails, phones, cards, government IDs) use deterministic detectors and do not need this model.

  • Built-in name list (on by default). A compiled-in dictionary. No extra download. Uncommon names, surnames alone, and non-Latin scripts may be missed.
  • Optional on-device neural model (not bundled in the engine library). The model adds name detection. If it is unavailable, standard text handling warns and continues with available rules; set Config.StrictReducedCoverage to refuse reduced coverage.

Download and verify the name model and tokenizer, then set CLOAKAPI_NER_MODEL_PATH and CLOAKAPI_NER_TOKENIZER_PATH — see Engine setup. Set CLOAKAPI_NER_MODEL_PATH to that file. Engine 1.6.1, when the variable is unset, also searches a path compiled in from the build host under /tmp and every parent directory of the working directory and of the executable. A model placed on one of those paths is loaded. Set the variable to the file you trust.

When the model loaded, the result reports ner_enabled: true. When it did not, some names may remain in the text.

Name detection is best-effort, not exhaustive. Tokenised output is not anonymised data: this SDK does not provide HIPAA Safe Harbor de-identification, does not make content "PHI-free", and does not render text anonymous. Treat tokenisation as on-device minimisation of PII before egress, and keep your own review where a residual name would be material.


Gateway-lock

The SDK is gateway-locked: the base URL must be the CloakAPI gateway (*.cloakapi.io) over HTTPS, or a loopback dev/staging gateway. Any attempt to point it at a raw provider or a look-alike host is rejected at construction — the SDK cannot be steered around the gateway's metering, receipts and billing.


Named privacy tiers (Level-1-only)

Every relay declares a Level-1 privacy tier as X-CloakAPI-Privacy-Tier: balanced (default) or max — there are exactly two. There is no plaintext tier — off/plaintext (or any other value) panics at construction, exactly like the TypeScript SDK's throw-at-construction. Introspect the honest, content-free posture with client.Posture().

client := cloakapi.NewClient("cloak_abc123", &cloakapi.Config{Tier: cloakapi.TierMax})
p := client.Posture() // {EngineVersion, EngineHash, Genuine, FailClosed, Tiers, Detectors, …}

Cloak-disclosure (byte-locked, cross-language)

On the blind-relay path the gateway forwards the client's tokenised body verbatim and does not inject a system prompt, so the SDK prepends a byte-locked disclosure that tells the upstream model how to handle the <<CLOAK:…>> markers. The two disclosure strings are embedded and sha256-verified at load (a drifted byte panics). Enable auto-injection with Config{Disclose: true}, or apply it manually — it is idempotent and fail-safe:

// continuity is required. Pass the scope from the tokenise result.
// There is no two-argument form and no silent conversation default.
req = cloakapi.WithDisclosure(req, result.SurrogateMode().Continuity(), &cloakapi.DisclosureOptions{Format: cloakapi.MarkerCloakAngle})

Device receipts (sign + offline verify)

Mint a content-free device receipt (hashes + counts + labels only) on-device with ECDSA P-256 + RFC-8785 JCS, and verify it fully offline — no gateway:

receipt, _ := cloakapi.SignDeviceReceipt(cloakapi.SignReceiptOptions{
    EntityCount: 3, Categories: []string{"EMAIL", "PERSON", "FIN_CC"},
    EngineVersion: engine.RulesetVersion, EngineHash: engine.BinaryHash(),
})
pub := receipt["claims"].(map[string]any)["v3-attestation"].(map[string]any)["attester_public_key"].(string)
res := cloakapi.VerifyDeviceReceipt(receipt, pub) // {OK:true, Kind:"pass"}

The gateway-backed verifiable-trust surface lives under client.Receipts (UnsafeRawVerify, Get, List, UnsafeRawCountersign, ChainExport, ChainVerify, VerifyOffline). The two UnsafeRaw* methods accept arbitrary receipt payloads; callers must ensure those values are content-free before sending them.

Models, token counting, local reconstruct

models, _ := client.Models.List(ctx)                       // GET /api/v1/models
count, _  := client.Tokens.Count(ctx, cloakapi.TokenCountParams{ /* … */ })
res, _    := client.Reconstruct.Create(cloakapi.ReconstructParams{ // fully local
    ResponseText: reply, AliasMap: sessionMap, TargetFormat: "md"})

Reconstruct is fully on-device — the alias map (real PII) stays local; binary/office formats fail closed. Tokens.Count currently returns an unavailable error without sending messages to a server.

Streaming (real SSE + boundary-safe detokenise)

partialText := ""
err := client.Messages.CreateStream(ctx, req, func(ev cloakapi.StreamEvent) error {
    partialText += ev.Text // already detokenised on-device, boundary-safe
    return nil
})
// On a quota error, partialText holds the answer delivered before the error frame.

Both Anthropic (content_block_delta) and OpenAI (choices[].delta.content) wire formats are handled; a <<CLOAK:…>> token split across chunk boundaries is buffered and is not leaked half-restored.

Continuity seed (seed_hex)

Set Config{SeedHex: "…"} to thread a continuity seed to the engine so the same original maps to the same surrogate id across sessions. Forward-safe: an engine that predates the key ignores it (byte-exact default ids are unchanged when unset).

License

Apache-2.0 © 2024-2026 Klokk Nettablering. See LICENSE and NOTICE.

Offline receipt verification status

VerifyReceipt checks the envelope signature with the public key you pass. If claims.countersignature is present, VerifyResult.Kind is unverified-witness, VerifyResult.WitnessChecked is false, and Reason links to the explanation. This method does not check the independent gateway signature or its receipt-hash binding. Use the full-entry and JWKS checks described in receipt verification docs for that result.

Compatibility: this case previously returned gateway-only-pass; update callers matching that string to unverified-witness.

Directories

Path Synopsis
Package cloakapi is the official Go client for the CloakAPI privacy gateway.
Package cloakapi is the official Go client for the CloakAPI privacy gateway.
engine
Package engine is the Go binding to the shared CloakAPI client-side engine (packages/cloak-engine-ffi, cdylib libcloak_engine) over its tiny C ABI.
Package engine is the Go binding to the shared CloakAPI client-side engine (packages/cloak-engine-ffi, cdylib libcloak_engine) over its tiny C ABI.
pii
Package pii provides Level-1 regex-based PII detection and tokenisation for the CloakAPI Go SDK.
Package pii provides Level-1 regex-based PII detection and tokenisation for the CloakAPI Go SDK.
routing
Package routing is the Go client-side arbitrage router (§12b P4a + §52d).
Package routing is the Go client-side arbitrage router (§12b P4a + §52d).
examples
fake-gateway command
A stand-in for the CloakAPI gateway, for trying the SDK without a key.
A stand-in for the CloakAPI gateway, for trying the SDK without a key.
hello command
Hello world for the CloakAPI Go SDK.
Hello world for the CloakAPI Go SDK.

Jump to

Keyboard shortcuts

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