48 lines
814 B
Markdown
48 lines
814 B
Markdown
# MyConnector Plugin
|
|
|
|
A StellaOps connector plugin template.
|
|
|
|
## Getting Started
|
|
|
|
1. Update the `MyConnectorOptions.cs` with your connector-specific configuration
|
|
2. Implement the fetch, parse, and map logic in `MyConnector.cs`
|
|
3. Update the plugin metadata in `MyConnectorPlugin.cs`
|
|
4. Build and sign your plugin
|
|
|
|
## Configuration
|
|
|
|
Add the following to your `appsettings.json`:
|
|
|
|
```json
|
|
{
|
|
"Plugins": {
|
|
"MyConnector": {
|
|
"BaseUrl": "https://api.example.com",
|
|
"ApiKey": "your-api-key",
|
|
"TimeoutSeconds": 30,
|
|
"MaxRetries": 3
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
## Building
|
|
|
|
```bash
|
|
dotnet build -c Release
|
|
```
|
|
|
|
## Signing
|
|
|
|
For production use, sign your plugin with Cosign:
|
|
|
|
```bash
|
|
cosign sign --key $COSIGN_KEY bin/Release/net10.0/StellaOps.Plugin.MyConnector.dll
|
|
```
|
|
|
|
## Testing
|
|
|
|
```bash
|
|
dotnet test
|
|
```
|