examples

command
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: MIT Imports: 5 Imported by: 0

README

smplkit SDK Examples

Runnable examples demonstrating the smplkit Go SDK.

Note: These examples require valid smplkit credentials and a live environment — they are not self-contained demos.

Prerequisites

  1. Go 1.21 or later.

  2. Install the SDK:

    go get github.com/smplkit/go-sdk
    
  3. A valid smplkit API key (create one in the smplkit console).

  4. At least one config created in your smplkit account (every account comes with a common config by default).

Config Showcase

File: config_showcase.go

An end-to-end walkthrough of the Smpl Config SDK covering:

  • Client initializationsmplkit.NewClient(apiKey)
  • Management-plane CRUD — create, list, and delete configs
  • Config inheritance — parent/child relationships (user_servicecommon, auth_moduleuser_service)
  • Fetch by keyGetByKey("common")

Several SDK features exercised by the Python showcase are not yet implemented in the Go SDK and are marked as skipped in the output. These include: update/set values, environment overrides, runtime value resolution, real-time WebSocket updates, and typed accessors.

Running
export SMPLKIT_API_KEY="sk_api_..."
go run examples/config_showcase.go

The script creates temporary configs, exercises available SDK features, then cleans up after itself.

Documentation

Overview

Config Showcase — end-to-end walkthrough of the Smpl Config Go SDK.

Demonstrates the full SDK surface:

  • Client initialization
  • Management-plane CRUD: create, update, list, delete
  • Environment-specific overrides (SetValues, SetValue)
  • Multi-level inheritance
  • Runtime value resolution: Connect, Get, typed accessors, Exists
  • Real-time updates via WebSocket and change listeners
  • Manual refresh and cache diagnostics
  • Environment comparison
  • Cleanup

Prerequisites:

  • A valid smplkit API key exported as SMPLKIT_API_KEY
  • At least one config in your account (every account has "common" by default)

Usage:

export SMPLKIT_API_KEY="sk_api_..."
go run examples/config_showcase.go

Jump to

Keyboard shortcuts

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