-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement plugin documentation generator (#86)
Co-authored-by: traut <[email protected]>
- Loading branch information
Showing
17 changed files
with
735 additions
and
13 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
GitHub | ||
Fabric | ||
boolean | ||
namespace |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
title: Plugins | ||
type: docs | ||
weight: 5 | ||
--- | ||
|
||
# Plugins | ||
|
||
Fabric relies on plugins to implement data sources and content providers. To utilise a plugin's data sources and content providers, it must be installed by Fabric. The global configuration should specify all required plugins (see [Global configuration]({{< ref "../language/configs.md/#global-configuration" >}}) for the details). Additionally, some data sources and content providers require configuration (for example, API keys, URLs, credentials, etc). | ||
|
||
A plugin name consists of a namespace (a name of a plugin vendor) and a short name. For example, `blackstork/elasticsearch` plugin implements Elasticsearch client data source and is released by [BlackStork](https://blackstork.io). | ||
|
||
## Where to get the plugins | ||
|
||
Plugins are released and distributed independently from Fabric, with their own release cycle and version. | ||
You can find a list of plugins released by BlackStork at the [Releases page](https://github.com/blackstork-io/fabric/releases) in Fabric GitHub. |
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,163 @@ | ||
--- | ||
title: Built-in | ||
weight: 10 | ||
type: docs | ||
--- | ||
|
||
# Built-in data sources and content providers | ||
|
||
`fabric` binary includes a set of built-in data sources and content providers, available out-of-the-box. | ||
|
||
## Data sources | ||
|
||
### `csv` | ||
|
||
#### Configuration | ||
|
||
The data source supports the following configuration parameters: | ||
|
||
```hcl | ||
config data csv { | ||
delimiter = <string> # optional | ||
} | ||
``` | ||
|
||
#### Usage | ||
|
||
The data source supports the following parameters in the data blocks: | ||
|
||
```hcl | ||
data csv { | ||
path = <string> # required | ||
} | ||
``` | ||
|
||
### `inline` | ||
|
||
#### Configuration | ||
|
||
The data source doesn't support configuration. | ||
|
||
#### Usage | ||
|
||
The data source doesn't define any parameters in the `data` block. | ||
|
||
### `json` | ||
|
||
#### Configuration | ||
|
||
The data source doesn't support configuration. | ||
|
||
#### Usage | ||
|
||
The data source supports the following parameters in the data blocks: | ||
|
||
```hcl | ||
data json { | ||
glob = <string> # required | ||
} | ||
``` | ||
|
||
### `txt` | ||
|
||
#### Configuration | ||
|
||
The data source doesn't support configuration. | ||
|
||
#### Usage | ||
|
||
The data source supports the following parameters in the data blocks: | ||
|
||
```hcl | ||
data txt { | ||
path = <string> # required | ||
} | ||
``` | ||
|
||
## Content providers | ||
|
||
### `frontmatter` | ||
|
||
#### Configuration | ||
|
||
The content provider doesn't support configuration. | ||
|
||
#### Usage | ||
|
||
The content source supports the following parameters in the content blocks: | ||
|
||
```hcl | ||
content frontmatter { | ||
content = <map of dynamic> # optional | ||
format = <string> # optional | ||
} | ||
``` | ||
|
||
### `image` | ||
|
||
#### Configuration | ||
|
||
The content provider doesn't support configuration. | ||
|
||
#### Usage | ||
|
||
The content source supports the following parameters in the content blocks: | ||
|
||
```hcl | ||
content image { | ||
alt = <string> # optional | ||
src = <string> # required | ||
} | ||
``` | ||
|
||
### `list` | ||
|
||
#### Configuration | ||
|
||
The content provider doesn't support configuration. | ||
|
||
#### Usage | ||
|
||
The content source supports the following parameters in the content blocks: | ||
|
||
```hcl | ||
content list { | ||
format = <string> # optional | ||
item_template = <string> # required | ||
} | ||
``` | ||
|
||
### `table` | ||
|
||
#### Configuration | ||
|
||
The content provider doesn't support configuration. | ||
|
||
#### Usage | ||
|
||
The content source supports the following parameters in the content blocks: | ||
|
||
```hcl | ||
content table { | ||
columns = <list of object> # required | ||
} | ||
``` | ||
|
||
### `text` | ||
|
||
#### Configuration | ||
|
||
The content provider doesn't support configuration. | ||
|
||
#### Usage | ||
|
||
The content source supports the following parameters in the content blocks: | ||
|
||
```hcl | ||
content text { | ||
absolute_title_size = <number> # optional | ||
code_language = <string> # optional | ||
format_as = <string> # optional | ||
text = <string> # required | ||
} | ||
``` |
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,56 @@ | ||
--- | ||
title: blackstork/elasticsearch | ||
weight: 20 | ||
type: docs | ||
--- | ||
|
||
# `blackstork/elasticsearch` plugin | ||
|
||
## Installation | ||
|
||
To install the plugin, add it to `plugin_versions` map in the Fabric global configuration block (see [Global configuration]({{< ref "configs.md#global-configuration" >}}) for more details), with a version constraint restricting which available versions of the plugin the codebase is compatible with: | ||
|
||
```hcl | ||
fabric { | ||
plugin_versions = { | ||
"blackstork/elasticsearch" = "=> v0.0.0-dev" | ||
} | ||
} | ||
``` | ||
|
||
## Data sources | ||
|
||
The plugin has the following data sources available: | ||
|
||
### `elasticsearch` | ||
|
||
#### Configuration | ||
|
||
The data source supports the following configuration parameters: | ||
|
||
```hcl | ||
config data elasticsearch { | ||
api_key = <list of string> # optional | ||
api_key_str = <string> # optional | ||
base_url = <string> # required | ||
basic_auth_password = <string> # optional | ||
basic_auth_username = <string> # optional | ||
bearer_auth = <string> # optional | ||
ca_certs = <string> # optional | ||
cloud_id = <string> # optional | ||
} | ||
``` | ||
|
||
#### Usage | ||
|
||
The data source supports the following parameters in the data blocks: | ||
|
||
```hcl | ||
data elasticsearch { | ||
fields = <list of string> # optional | ||
id = <string> # optional | ||
index = <string> # required | ||
query = <map of dynamic> # optional | ||
query_string = <string> # optional | ||
} | ||
``` |
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,55 @@ | ||
--- | ||
title: blackstork/github | ||
weight: 20 | ||
type: docs | ||
--- | ||
|
||
# `blackstork/github` plugin | ||
|
||
## Installation | ||
|
||
To install the plugin, add it to `plugin_versions` map in the Fabric global configuration block (see [Global configuration]({{< ref "configs.md#global-configuration" >}}) for more details), with a version constraint restricting which available versions of the plugin the codebase is compatible with: | ||
|
||
```hcl | ||
fabric { | ||
plugin_versions = { | ||
"blackstork/github" = "=> v0.0.0-dev" | ||
} | ||
} | ||
``` | ||
|
||
## Data sources | ||
|
||
The plugin has the following data sources available: | ||
|
||
### `github_issues` | ||
|
||
#### Configuration | ||
|
||
The data source supports the following configuration parameters: | ||
|
||
```hcl | ||
config data github_issues { | ||
github_token = <string> # required | ||
} | ||
``` | ||
|
||
#### Usage | ||
|
||
The data source supports the following parameters in the data blocks: | ||
|
||
```hcl | ||
data github_issues { | ||
assignee = <string> # optional | ||
creator = <string> # optional | ||
direction = <string> # optional | ||
labels = <list of string> # optional | ||
limit = <number> # optional | ||
mentioned = <string> # optional | ||
milestone = <string> # optional | ||
repository = <string> # required | ||
since = <string> # optional | ||
sort = <string> # optional | ||
state = <string> # optional | ||
} | ||
``` |
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,46 @@ | ||
--- | ||
title: blackstork/graphql | ||
weight: 20 | ||
type: docs | ||
--- | ||
|
||
# `blackstork/graphql` plugin | ||
|
||
## Installation | ||
|
||
To install the plugin, add it to `plugin_versions` map in the Fabric global configuration block (see [Global configuration]({{< ref "configs.md#global-configuration" >}}) for more details), with a version constraint restricting which available versions of the plugin the codebase is compatible with: | ||
|
||
```hcl | ||
fabric { | ||
plugin_versions = { | ||
"blackstork/graphql" = "=> v0.0.0-dev" | ||
} | ||
} | ||
``` | ||
|
||
## Data sources | ||
|
||
The plugin has the following data sources available: | ||
|
||
### `graphql` | ||
|
||
#### Configuration | ||
|
||
The data source supports the following configuration parameters: | ||
|
||
```hcl | ||
config data graphql { | ||
auth_token = <string> # optional | ||
url = <string> # required | ||
} | ||
``` | ||
|
||
#### Usage | ||
|
||
The data source supports the following parameters in the data blocks: | ||
|
||
```hcl | ||
data graphql { | ||
query = <string> # required | ||
} | ||
``` |
Oops, something went wrong.