Skip to content

Commit 4d99093

Browse files
committed
README: add mising docs for new providers
1 parent 9405cf5 commit 4d99093

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,14 @@ To implement a new provider backend in this repository:
461461
// Your backend-specific configuration
462462
}
463463

464+
impl YourBackendProvider {
465+
pub fn new() -> Self {
466+
Self {
467+
// Initialize your configuration
468+
}
469+
}
470+
}
471+
464472
impl Provider for YourBackendProvider {
465473
fn get(&self, project: &str, key: &str, profile: Option<&str>) -> Result<Option<String>> {
466474
// Implementation
@@ -469,6 +477,19 @@ To implement a new provider backend in this repository:
469477
fn set(&self, project: &str, key: &str, value: &str, profile: Option<&str>) -> Result<()> {
470478
// Implementation
471479
}
480+
481+
fn name(&self) -> &'static str {
482+
"your_backend"
483+
}
484+
485+
fn description(&self) -> &'static str {
486+
"Your backend description"
487+
}
488+
489+
// Optional: Override if your backend is read-only
490+
// fn allows_set(&self) -> bool {
491+
// false
492+
// }
472493
}
473494
```
474495

0 commit comments

Comments
 (0)