Skip to content

Commit

Permalink
Copy LogInput from audit package, add OptMarshaler interface (#6735)
Browse files Browse the repository at this point in the history
Adds Type field and makes Request and Response interface{}.  

Add OptMarshaler interface for doing JSON marshaling with options.
  • Loading branch information
ncabatoff authored May 15, 2019
1 parent 3eb1346 commit 7c193f5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions sdk/logical/audit.go
Original file line number Diff line number Diff line change
@@ -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)
}

0 comments on commit 7c193f5

Please sign in to comment.