No description
Find a file
2026-06-30 23:30:18 +03:00
bootstrap Extract Thigs Go SDK 2026-06-17 09:46:14 +03:00
internal/systeminfo Extract Thigs Go SDK 2026-06-17 09:46:14 +03:00
.gitlab-ci.yml Add SDK CI 2026-06-17 09:48:11 +03:00
client.go Omit managed proxy config from SDK state 2026-06-30 23:30:18 +03:00
client_state_test.go Omit managed proxy config from SDK state 2026-06-30 23:30:18 +03:00
go.mod Extract Thigs Go SDK 2026-06-17 09:46:14 +03:00
go.sum Extract Thigs Go SDK 2026-06-17 09:46:14 +03:00
README.md Extend proxy config with TLS and routes 2026-06-19 19:56:18 +03:00
types.go Add managed config ack 2026-06-30 03:38:29 -04:00
types_test.go Extend proxy config with TLS and routes 2026-06-19 19:56:18 +03:00

thigs-sdk-go

Go SDK for the Thigs App Account protocol.

The SDK owns the reusable client-side account layer:

  • DNS/API bootstrap helpers;
  • install and device identifiers;
  • device X25519 keypair;
  • /v1/device/hello;
  • manual link flow;
  • token refresh/logout;
  • feature and license cache;
  • heartbeat;
  • update check;
  • device-bound encrypted proxy config import, including optional TLS material and domain routes for a specific linked installation.

ProxyConfig remains backward-compatible with endpoint-only tokens. New tokens may additionally provide id, name, tls, and routes; applications decide how to persist and activate that product-specific routing profile.

Applications provide only product-specific values:

client, err := accountsdk.New(accountsdk.Config{
    Product:    "net-tester",
    Version:    "0.1.0",
    Channel:    "dev",
    APIBaseURL: "https://s1.politsin.com:8083",
    StorageDir: ".app-state",
})

Bootstrap helpers live in bootstrap:

env, err := bootstrap.LoadEnv(".env")
apiURL, err := bootstrap.ResolveAPI(ctx, env)

The default missing-env bootstrap points to DNS TXT thigs.politsin.com.

Run checks:

go test ./...