From f29a30300ca4d50218cf68679ef3f7b5c9352d35 Mon Sep 17 00:00:00 2001 From: airwish Date: Fri, 1 Nov 2024 14:09:44 +0800 Subject: [PATCH] fix go client docs front matter (#3317) --- .../en/docs/getting-started/first-steps.md | 4 +-- .../en/docs/tutorials/ManageAdapter.md | 25 +++++++++++-------- .../en/docs/tutorials/ManagePipeline.md | 23 ++++++++++------- 3 files changed, 31 insertions(+), 21 deletions(-) diff --git a/streampipes-client-go/docs/content/en/docs/getting-started/first-steps.md b/streampipes-client-go/docs/content/en/docs/getting-started/first-steps.md index 2d28e4391f..b4cf2ca010 100644 --- a/streampipes-client-go/docs/content/en/docs/getting-started/first-steps.md +++ b/streampipes-client-go/docs/content/en/docs/getting-started/first-steps.md @@ -52,9 +52,9 @@ Once these requirements are met, you are ready to proceed with the next step Qui The StreamPipes Go library is meant to work with Go 1.21 and above. You can install the latest development version from GitHub, as so: -```bash +```shell go get https://github.com/apache/streampipes // if you want to have the current development state you can also execute go get https://github.com/apache/streampipes/streampipes-client-go // the corresponding documentation can be found here: https://streampipes.apache.org/docs/docs/python/dev/ -``` \ No newline at end of file +``` diff --git a/streampipes-client-go/docs/content/en/docs/tutorials/ManageAdapter.md b/streampipes-client-go/docs/content/en/docs/tutorials/ManageAdapter.md index 059700c2c6..cc11a0a286 100644 --- a/streampipes-client-go/docs/content/en/docs/tutorials/ManageAdapter.md +++ b/streampipes-client-go/docs/content/en/docs/tutorials/ManageAdapter.md @@ -1,3 +1,8 @@ +--- +title: Manage Adapter +description: > + Manage Adapter. +--- -### Manage StreamPipes Adapter +# Manage StreamPipes Adapter --- ## Initialize Go-Client -```bash +```go import ( "log" "github.com/apache/streampipes/streampipes-client-go/streampipes" @@ -33,7 +38,7 @@ func main() { ApiKey: "", }, } - + streamPipesClient, err := streampipes.NewStreamPipesClient(clientConfig) if err != nil { log.Fatal(err) @@ -44,29 +49,29 @@ func main() { ### Create a StreamPipes Adapter -```bash +```go // Populating go-model as a data source is not supported at this time,This is because the inheritance of the model has not been resolved for the time being. adapterData = `json` - adapter = []byte(adapterData) - err := streamPipesClient.Adapter().CreateAdapter(adapterData) + adapter = []byte(adapterData) + err := streamPipesClient.Adapter().CreateAdapter(adapterData) ``` ### Get a StreamPipes Adapter -```bash +```go streampipesAdapter, err := streamPipesClient.Adapter().GetSingleAdapter("adapterId") ``` ### Start a StreamPipes Adapter -```bash +```go err := streamPipesClient.Adapter().StartSingleAdapter("adapterId") ``` ### Stop a StreamPipes Adapter -```bash +```go err := streamPipesClient.Adapter().StopSingleAdapter("adapterId") ``` -### ... \ No newline at end of file +### ... diff --git a/streampipes-client-go/docs/content/en/docs/tutorials/ManagePipeline.md b/streampipes-client-go/docs/content/en/docs/tutorials/ManagePipeline.md index 39bf323ecd..7807471ee9 100644 --- a/streampipes-client-go/docs/content/en/docs/tutorials/ManagePipeline.md +++ b/streampipes-client-go/docs/content/en/docs/tutorials/ManagePipeline.md @@ -1,3 +1,8 @@ +--- +title: Manage Pipeline +description: > + Manage Pipeline. +--- -### Manage StreamPipes Pipeline +# Manage StreamPipes Pipeline --- ## Initialize Go-Client -```bash +```go import ( "log" "github.com/apache/streampipes/streampipes-client-go/streampipes" @@ -33,7 +38,7 @@ func main() { ApiKey: "", }, } - + streamPipesClient, err := streampipes.NewStreamPipesClient(clientConfig) if err != nil { log.Fatal(err) @@ -44,29 +49,29 @@ func main() { ### Create a StreamPipes Pipeline -```bash +```go // Populating go-model as a data source is not supported at this time,This is because the inheritance of the model has not been resolved for the time being. pipelineData = `json` - pipeline = []byte(pipelineData) + pipeline = []byte(pipelineData) responseMsg,err := streamPipesClient.Pipeline().CreatePipeline(pipelineData) ``` ### Get a StreamPipes Pipeline -```bash +```go streampipesPipeline, err := streamPipesClient.Pipeline().GetSinglePipelineStatus("pipelineId") ``` ### Start a StreamPipes Pipeline -```bash +```go operationStatus, err := streamPipesClient.Pipeline().StartSinglePipeline("pipelineId") ``` ### Stop a StreamPipes Pipeline -```bash +```go operationStatus, err := streamPipesClient.Pipeline().StopSinglePipeline("pipelineId") ``` -### ... \ No newline at end of file +### ...