Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: registers RegisterFormatters for tinygo #1027

Merged
merged 13 commits into from
Apr 2, 2024
Merged

feat: registers RegisterFormatters for tinygo #1027

merged 13 commits into from
Apr 2, 2024

Conversation

M4tteoP
Copy link
Member

@M4tteoP M4tteoP commented Mar 25, 2024

Address

// TODO(jcchavezs): check if newest TinyGo supports json.Marshaler for audit log type.

JSON audit logs should be now supported by tiny go, therefore the PR proposes to build the audit log formatters also for it. See corazawaf/coraza-proxy-wasm#263

@M4tteoP M4tteoP marked this pull request as ready for review March 26, 2024 13:27
@M4tteoP M4tteoP requested a review from a team as a code owner March 26, 2024 13:27
}

// wasmSerial emulates a custom audit log writer that writes to the log in wasm
type wasmSerial struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not call it wasmSerial but redeclare serial here for tinygo only

@@ -13,7 +13,7 @@ func init() {
return noopWriter{}
})
RegisterWriter("serial", func() plugintypes.AuditLogWriter {
return noopWriter{}
return &serialWriter{}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jcchavezs
Copy link
Member

shall we merge this?

@M4tteoP M4tteoP merged commit 0a8c836 into main Apr 2, 2024
7 checks passed
@M4tteoP M4tteoP deleted the json_tinygo branch April 2, 2024 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants