Skip to content

Commit

Permalink
fix go client docs front matter (#3317)
Browse files Browse the repository at this point in the history
  • Loading branch information
ittuann authored Nov 1, 2024
1 parent 7783d88 commit f29a303
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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/
```
```
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Manage Adapter
description: >
Manage Adapter.
---
<!--
// Licensed to the Apache Software Foundation (ASF) under one or more
// contributor license agreements. See the NOTICE file distributed with
Expand All @@ -16,10 +21,10 @@
//
-->

### Manage StreamPipes Adapter
# Manage StreamPipes Adapter
---
## Initialize Go-Client
```bash
```go
import (
"log"
"github.com/apache/streampipes/streampipes-client-go/streampipes"
Expand All @@ -33,7 +38,7 @@ func main() {
ApiKey: "<Your-API-Key>",
},
}

streamPipesClient, err := streampipes.NewStreamPipesClient(clientConfig)
if err != nil {
log.Fatal(err)
Expand All @@ -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")
```

### ...
### ...
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Manage Pipeline
description: >
Manage Pipeline.
---
<!--
// Licensed to the Apache Software Foundation (ASF) under one or more
// contributor license agreements. See the NOTICE file distributed with
Expand All @@ -16,10 +21,10 @@
//
-->

### Manage StreamPipes Pipeline
# Manage StreamPipes Pipeline
---
## Initialize Go-Client
```bash
```go
import (
"log"
"github.com/apache/streampipes/streampipes-client-go/streampipes"
Expand All @@ -33,7 +38,7 @@ func main() {
ApiKey: "<Your-API-Key>",
},
}

streamPipesClient, err := streampipes.NewStreamPipesClient(clientConfig)
if err != nil {
log.Fatal(err)
Expand All @@ -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")
```

### ...
### ...

0 comments on commit f29a303

Please sign in to comment.