@cognitiveproof/softbinding-api-plugin-mysql
v1.0.2
Published
MySQL data store plugin for the C2PA Soft Binding Resolution API server
Readme
@cognitiveproof/softbinding-api-plugin-mysql
MySQL DataStorePlugin for @cognitiveproof/softbinding-api-server — the C2PA Soft Binding Resolution API server.
Persists C2PA Manifest Stores, soft binding associations, and repository receipts in MySQL.
Install
npm install @cognitiveproof/softbinding-api-server @cognitiveproof/softbinding-api-plugin-mysqlUsage
import { createServer } from '@cognitiveproof/softbinding-api-server';
const app = createServer({
dataStore: '@cognitiveproof/softbinding-api-plugin-mysql',
// ...
});Or pass the package name via the DATASTORE_PLUGIN environment variable and omit the dataStore option entirely.
Configuration
| Env var | Required | Description |
| ----------- | -------- | ------------------------------------------------------------------ |
| MYSQL_URL | Yes | MySQL connection string, e.g. mysql://user:pass@host:3306/dbname |
Schema
The plugin creates its tables automatically on first use:
manifests—id,data(blob),content_type,receipt(json, nullable)bindings—manifest_id(foreign key tomanifests.id,ON DELETE CASCADE),binding_value
