forked from devstream-io/devstream
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/0zyt/devstream into dev3
- Loading branch information
Showing
143 changed files
with
2,330 additions
and
1,348 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
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
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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
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,51 @@ | ||
# Installation | ||
|
||
## 0 Currently supported operating systems and chip architectures | ||
|
||
* Darwin/arm64 | ||
* Darwin/amd64 | ||
* Linux/amd64 | ||
|
||
## 1 Install dtm binary with script | ||
|
||
In your working directory, run: | ||
|
||
```shell | ||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/devstream-io/devstream/main/hack/install/download.sh)" | ||
``` | ||
|
||
This will download the corresponding `dtm` binary to your working directory according to your OS and chip architecture, and grant the binary execution permission. | ||
|
||
> Optional: you can then move `dtm` to a place which is in your PATH. For example: `mv dtm /usr/local/bin/`. | ||
## 2 Install with [asdf](https://asdf-vm.com/) | ||
|
||
```shell | ||
# Plugin | ||
asdf plugin add dtm | ||
# Show all installable versions | ||
asdf list-all dtm | ||
# Install specific version | ||
asdf install dtm latest | ||
# Set a version globally (on your ~/.tool-versions file) | ||
asdf global dtm latest | ||
# Now dtm commands are available | ||
dtm --help | ||
``` | ||
|
||
## 3 Download manually from the Release page | ||
|
||
You could find the latest version of `dtm` on the [Release](https://github.com/devstream-io/devstream/releases/) page and click Download. | ||
Note that there are multiple versions of `dtm` available, so you will need to choose the correct version for your operating system and chip architecture. Once downloaded locally, you can choose to rename it, move it to the directory containing `$PATH` and give it executable permissions, for example, on Linux you can do this by running the following command. | ||
|
||
```shell | ||
mv dtm-linux-amd64 /usr/local/bin/dtm | ||
chmod +x dtm | ||
``` | ||
|
||
Then you can verify that the permissions and version of dtm are correct with the following command. | ||
|
||
```shell | ||
$ dtm version | ||
0.9.1 | ||
``` |
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,51 @@ | ||
# 安装 | ||
|
||
## 0 当前支持的操作系统与芯片架构 | ||
|
||
* Darwin/arm64 | ||
* Darwin/amd64 | ||
* Linux/amd64 | ||
|
||
## 1 用脚本安装 | ||
|
||
进入你的工作目录,运行: | ||
|
||
```shell | ||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/devstream-io/devstream/main/hack/install/download.sh)" | ||
``` | ||
|
||
这个命令会根据你的操作系统和芯片架构下载对应的 `dtm` 二进制文件到你的工作目录中,并赋予二进制文件执行权限。 | ||
|
||
> 可选:建议你将 dtm 移动到包含于 PATH 的目录下,比如 `mv dtm /usr/local/bin/`。 | ||
## 2 用 [asdf](https://asdf-vm.com/) 安装 | ||
|
||
```shell | ||
# Plugin | ||
asdf plugin add dtm | ||
# Show all installable versions | ||
asdf list-all dtm | ||
# Install specific version | ||
asdf install dtm latest | ||
# Set a version globally (on your ~/.tool-versions file) | ||
asdf global dtm latest | ||
# Now dtm commands are available | ||
dtm --help | ||
``` | ||
|
||
## 3 从 Release 页面手动下载 | ||
|
||
在 [Release](https://github.com/devstream-io/devstream/releases/) 页面找到当前最新版本 `dtm`,然后点击下载。 | ||
需要注意的是当前 `dtm` 提供了多个版本,你需要根据操作系统和芯片架构选择自己需要的正确版本。下载到本地后,你可以选择将其重命名,移入包含在"$PATH"的目录里并赋予其可执行权限,比如在 Linux 上你可以执行如下命令完成这些操作: | ||
|
||
```shell | ||
mv dtm-linux-amd64 /usr/local/bin/dtm | ||
chmod +x dtm | ||
``` | ||
|
||
接着你可以通过如下命令验证 dtm 的权限以及版本等是否正确: | ||
|
||
```shell | ||
$ dtm version | ||
0.9.1 | ||
``` |
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
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
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
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.