Update vendor
This commit is contained in:
parent
ad28263b69
commit
1943cc7380
|
@ -3,8 +3,8 @@ package logical
|
|||
type LogInput struct {
|
||||
Type string
|
||||
Auth *Auth
|
||||
Request interface{}
|
||||
Response interface{}
|
||||
Request *Request
|
||||
Response *Response
|
||||
OuterErr error
|
||||
NonHMACReqDataKeys []string
|
||||
NonHMACRespDataKeys []string
|
||||
|
|
|
@ -124,3 +124,8 @@ type Paths struct {
|
|||
// unless it ends with '/' in which case it will be treated as a prefix.
|
||||
SealWrapStorage []string
|
||||
}
|
||||
|
||||
type Auditor interface {
|
||||
AuditRequest(ctx context.Context, input *LogInput) error
|
||||
AuditResponse(ctx context.Context, input *LogInput) error
|
||||
}
|
||||
|
|
|
@ -70,6 +70,10 @@ type SystemView interface {
|
|||
PluginEnv(context.Context) (*PluginEnvironment, error)
|
||||
}
|
||||
|
||||
type ExtendedSystemView interface {
|
||||
Auditor() Auditor
|
||||
}
|
||||
|
||||
type StaticSystemView struct {
|
||||
DefaultLeaseTTLVal time.Duration
|
||||
MaxLeaseTTLVal time.Duration
|
||||
|
@ -86,6 +90,20 @@ type StaticSystemView struct {
|
|||
PluginEnvironment *PluginEnvironment
|
||||
}
|
||||
|
||||
type noopAuditor struct{}
|
||||
|
||||
func (a noopAuditor) AuditRequest(ctx context.Context, input *LogInput) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (a noopAuditor) AuditResponse(ctx context.Context, input *LogInput) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d StaticSystemView) Auditor() Auditor {
|
||||
return noopAuditor{}
|
||||
}
|
||||
|
||||
func (d StaticSystemView) DefaultLeaseTTL() time.Duration {
|
||||
return d.DefaultLeaseTTLVal
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue