Update vendor

This commit is contained in:
Jeff Mitchell 2019-05-23 10:44:19 -04:00
parent ad28263b69
commit 1943cc7380
3 changed files with 25 additions and 2 deletions

View File

@ -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

View File

@ -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
}

View File

@ -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
}