From 8d311c85a29dc98d97fc00e64352161571627e42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Csaba=20T=C5=B1z?= Date: Tue, 28 Nov 2023 13:31:01 +0100 Subject: [PATCH] review(@pepov): Applying new doc format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Csaba Tűz --- .../plugins/filters/useragent.md | 69 +++++++++--------- pkg/sdk/logging/model/filter/useragent.go | 70 +++++++++---------- 2 files changed, 69 insertions(+), 70 deletions(-) diff --git a/docs/configuration/plugins/filters/useragent.md b/docs/configuration/plugins/filters/useragent.md index e6656c7b82..4d249734b3 100644 --- a/docs/configuration/plugins/filters/useragent.md +++ b/docs/configuration/plugins/filters/useragent.md @@ -37,40 +37,39 @@ Join hashed data by '_' Default: false - ## Example `UserAgent` filter configurations - ```yaml - apiVersion: logging.banzaicloud.io/v1beta1 - kind: Flow - metadata: - - name: demo-flow - - spec: - - filters: - - useragent: - key_name: my_agent - delete_key: true - out_key: ua_fields - flatten: true - selectors: {} - localOutputRefs: - - demo-output - - ``` - - #### Fluentd Config Result - ```yaml - - - @type ua_parser - @id test_useragent - key_name my_agent - delete_key true - out_key ua_fields - flatten true - - - ``` + +## Example `UserAgent` filter configurations +```yaml +apiVersion: logging.banzaicloud.io/v1beta1 +kind: Flow +metadata: + + name: demo-flow + +spec: + filters: + - useragent: + key_name: my_agent + delete_key: true + out_key: ua_fields + flatten: true + selectors: {} + localOutputRefs: + - demo-output +``` + + +## Fluentd Config Result +```xml + + @type ua_parser + @id test_useragent + key_name my_agent + delete_key true + out_key ua_fields + flatten true + +``` + --- diff --git a/pkg/sdk/logging/model/filter/useragent.go b/pkg/sdk/logging/model/filter/useragent.go index 3e0383618b..94819518b3 100644 --- a/pkg/sdk/logging/model/filter/useragent.go +++ b/pkg/sdk/logging/model/filter/useragent.go @@ -47,41 +47,41 @@ type UserAgent struct { Flatten bool `json:"flatten,omitempty"` } -// ## Example `UserAgent` filter configurations -// ```yaml -// apiVersion: logging.banzaicloud.io/v1beta1 -// kind: Flow -// metadata: -// -// name: demo-flow -// -// spec: -// -// filters: -// - useragent: -// key_name: my_agent -// delete_key: true -// out_key: ua_fields -// flatten: true -// selectors: {} -// localOutputRefs: -// - demo-output -// -// ``` -// -// #### Fluentd Config Result -// ```yaml -// -// -// @type ua_parser -// @id test_useragent -// key_name my_agent -// delete_key true -// out_key ua_fields -// flatten true -// -// -// ``` +/* +## Example `UserAgent` filter configurations +```yaml +apiVersion: logging.banzaicloud.io/v1beta1 +kind: Flow +metadata: + + name: demo-flow + +spec: + filters: + - useragent: + key_name: my_agent + delete_key: true + out_key: ua_fields + flatten: true + selectors: {} + localOutputRefs: + - demo-output +``` +*/ +// +docName:"Fluentd Config Result" +/* +## Fluentd Config Result +```xml + + @type ua_parser + @id test_useragent + key_name my_agent + delete_key true + out_key ua_fields + flatten true + +``` +*/ type _expUserAgent interface{} //nolint:deadcode,unused func (g *UserAgent) ToDirective(secretLoader secret.SecretLoader, id string) (types.Directive, error) {