-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1167 from merico-dev/feat-devlake
Feat: Add New Plugin `devlake-config`
- Loading branch information
Showing
17 changed files
with
591 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/devstream-io/devstream/internal/pkg/plugin/devlakeconfig" | ||
"github.com/devstream-io/devstream/pkg/util/log" | ||
) | ||
|
||
// NAME is the name of this DevStream plugin. | ||
const NAME = "devlake-config" | ||
|
||
// Plugin is the type used by DevStream core. It's a string. | ||
type Plugin string | ||
|
||
// Create implements the create of devlake-config. | ||
func (p Plugin) Create(options map[string]interface{}) (map[string]interface{}, error) { | ||
return devlakeconfig.Create(options) | ||
} | ||
|
||
// Update implements the update of devlake-config. | ||
func (p Plugin) Update(options map[string]interface{}) (map[string]interface{}, error) { | ||
return devlakeconfig.Update(options) | ||
} | ||
|
||
// Delete implements the delete of devlake-config. | ||
func (p Plugin) Delete(options map[string]interface{}) (bool, error) { | ||
return devlakeconfig.Delete(options) | ||
} | ||
|
||
// Read implements the read of devlake-config. | ||
func (p Plugin) Read(options map[string]interface{}) (map[string]interface{}, error) { | ||
return devlakeconfig.Read(options) | ||
} | ||
|
||
// DevStreamPlugin is the exported variable used by the DevStream core. | ||
var DevStreamPlugin Plugin | ||
|
||
func main() { | ||
log.Infof("%T: %s is a plugin for DevStream. Use it with DevStream.\n", DevStreamPlugin, NAME) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# devlake-config plugin | ||
|
||
TODO(dtm): Add your document here. | ||
|
||
## Usage | ||
|
||
``` yaml | ||
--8<-- "devlake-config.yaml" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# devlake-config 插件 | ||
|
||
TODO(dtm): 在这里添加文档. | ||
|
||
## 用例 | ||
|
||
``` yaml | ||
--8<-- "devlake-config.yaml" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.