From 7c193f53c8b00503cdc287172fcc2f584c2ba86c Mon Sep 17 00:00:00 2001 From: ncabatoff Date: Wed, 15 May 2019 09:05:30 -0400 Subject: [PATCH] Copy LogInput from audit package, add OptMarshaler interface (#6735) Adds Type field and makes Request and Response interface{}. Add OptMarshaler interface for doing JSON marshaling with options. --- sdk/logical/audit.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 sdk/logical/audit.go diff --git a/sdk/logical/audit.go b/sdk/logical/audit.go new file mode 100644 index 0000000000..f3bf622b3d --- /dev/null +++ b/sdk/logical/audit.go @@ -0,0 +1,19 @@ +package logical + +type LogInput struct { + Type string + Auth *Auth + Request interface{} + Response interface{} + OuterErr error + NonHMACReqDataKeys []string + NonHMACRespDataKeys []string +} + +type MarshalOptions struct { + ValueHasher func(string) string +} + +type OptMarshaler interface { + MarshalJSONWithOptions(*MarshalOptions) ([]byte, error) +}