SDK generation plugin
The sdks plugin generates a language-specific SDK from the database's
exported definitions. This release supports Go.
Configuration
Enable the plugin and set the output directory:
| Offset (hex) | Bytes (hex) | Meaning |
|---|---|---|
| 00 | 54 52 4F 4E | magic TRON |
| 04 | 4C 70617468 | txt "path" |
| 09 | 6C 6170702E6462 | txt "app.db" |
| 10 | 0F 0A 04000000 0900 0000 | map leaf, size 10: @4 → @9 |
| 1A | 9C 6469726563746F 7279 | txt "directory" |
| 24 | 5C 2E2F73646B | txt "./sdk" |
| 2A | 0F 0A 1A000000 2400 0000 | map leaf, size 10: @1A → @24 |
| 34 | 2C 676F | txt "go" |
| 37 | 0F 0A 34000000 2A00 0000 | map leaf, size 10: @34 → @2A |
| 41 | 8C 64617461626173 65 | txt "database" |
| 4A | 0F 0A 41000000 1000 0000 | map leaf, size 10: @41 → @10 |
| 54 | 4C 73646B73 | txt "sdks" |
| 59 | 0F 0A 54000000 3700 0000 | map leaf, size 10: @54 → @37 |
| 63 | 07 0E 00500000 4A00 0000 59000000 | map branch, size 14, depth 0 (root), slots 12, 14: @4A → @59 |
| 71 | 7C 706C7567696E73 | txt "plugins" |
| 79 | 0F 0A 71000000 6300 0000 | map leaf, size 10: @71 → @63 |
| 83 | 79000000 00000000 | root → @79; previous: none |
| Setting | Requirement | Description |
|---|---|---|
sdks.go | Optional | Enables the Go generator. |
sdks.go.directory | Required when go is enabled; nonempty string | Directory for generated Go source; relative paths are resolved from the process working directory. |
With no language configured, sdks does not generate files. There is no default
output directory. Select stdlib
and database separately if the definitions
or application need them.
An enabled SDK is generated when the database opens and refreshed after definitions
are updated. The output directory contains sdk.go and schemas/schemas.go.
SDK generation
SDK generation for this language is not available in this release. The sdks
plugin currently generates Go source. Select Go above for generated API and usage examples.