Skip to content

Commit

Permalink
refactor!: file system provider rename (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
dadrus authored Oct 21, 2022
1 parent 5ff495c commit 04a33f2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions docs/content/docs/configuration/rules/providers.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Supported providers, including the corresponding configuration options are descr

== Filesystem

The filesystem provider allows loading of rule sets from a file system. The configuration of this provider goes into the `file` property. This provider is handy for e.g. starting playing around with Heimdall, e.g. locally, or using Docker, as well as if your deployment strategy considers deploying a Heimdall instance as a Side-Car for each of your services.
The filesystem provider allows loading of rule sets from a file system. The configuration of this provider goes into the `file_system` property. This provider is handy for e.g. starting playing around with Heimdall, e.g. locally, or using Docker, as well as if your deployment strategy considers deploying a Heimdall instance as a Side-Car for each of your services.

Following configuration options are supported:

Expand All @@ -33,7 +33,7 @@ This provider doesn't need any additional configuration for a rule set. So the c
====
[source, yaml]
----
file:
file_system:
src: /path/to/rules/dir
watch: true
----
Expand All @@ -43,7 +43,7 @@ file:
====
[source, yaml]
----
file:
file_system:
src: /path/to/rules.yaml
----
====
Expand Down
2 changes: 1 addition & 1 deletion internal/config/rule_provider.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package config

type RuleProviders struct {
FileSystem *FileBasedRuleProviderConfig `koanf:"file,omitempty"`
FileSystem *FileBasedRuleProviderConfig `koanf:"file_system,omitempty"`
HTTPEndpoint map[string]any `koanf:"http_endpoint,omitempty"`
}

Expand Down
2 changes: 1 addition & 1 deletion internal/config/test_data/test_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ rules:
- error_handler: authenticate_with_kratos

providers:
file:
file_system:
src: test_rules.yaml
watch: true

Expand Down
2 changes: 1 addition & 1 deletion schema/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1685,7 +1685,7 @@
"type": "object",
"additionalProperties": false,
"properties": {
"file": {
"file_system": {
"$ref": "#/definitions/fileSystemProvider"
},
"http_endpoint": {
Expand Down
2 changes: 1 addition & 1 deletion test_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ rules:
- error_handler: authenticate_with_kratos

providers:
file:
file_system:
src: test_rules.yaml
watch: true

Expand Down

0 comments on commit 04a33f2

Please sign in to comment.