Skip to content

Dart SDK

Dart client for Keyraft.

Installation

bash
dart pub add keyraft_client

Or in pubspec.yaml:

yaml
dependencies:
  keyraft_client: ^0.1.0

Package: pub.dev/packages/keyraft_client

Quick Start

dart
import 'package:keyraft_client/keyraft_client.dart';

final client = KeyraftClient(
  baseUrl: 'http://localhost:7200',
  token: Platform.environment['KEYRAFT_TOKEN'],
);

await client.set('myapp/prod', 'DATABASE_URL', 'postgres://...', type: 'secret');
final entry = await client.get('myapp/prod', 'DATABASE_URL');

API Coverage

AreaMethods
Healthhealth(), metrics()
KVset(), get(), delete(), list(), listVersions()
Watchwatch(), watchStream()
NamespaceslistNamespaces(), getNamespace(), deleteNamespace()
Authme(), createToken(), listTokens(), revokeToken()
RoleslistRoles(), getRole()
Auditaudit()

Design

Uses dart:io HttpClient only - no third-party HTTP dependencies.

Repository

github.com/keyraft/dart-sdk - Apache License 2.0

Apache License 2.0