mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-28 04:10:44 -04:00
Update vendor
This commit is contained in:
parent
6c836bcd9b
commit
19c78dc490
3 changed files with 25 additions and 2 deletions
4
vendor/github.com/hashicorp/vault/sdk/logical/audit.go
generated
vendored
4
vendor/github.com/hashicorp/vault/sdk/logical/audit.go
generated
vendored
|
|
@ -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
|
||||
|
|
|
|||
5
vendor/github.com/hashicorp/vault/sdk/logical/logical.go
generated
vendored
5
vendor/github.com/hashicorp/vault/sdk/logical/logical.go
generated
vendored
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
18
vendor/github.com/hashicorp/vault/sdk/logical/system_view.go
generated
vendored
18
vendor/github.com/hashicorp/vault/sdk/logical/system_view.go
generated
vendored
|
|
@ -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 a new issue