2015-03-21 10:18:46 +00:00
|
|
|
package aws
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"github.com/hashicorp/vault/logical"
|
|
|
|
"github.com/hashicorp/vault/logical/framework"
|
|
|
|
)
|
|
|
|
|
2016-04-19 01:06:26 +00:00
|
|
|
var walRollbackMap = map[string]framework.WALRollbackFunc{
|
2015-03-21 10:18:46 +00:00
|
|
|
"user": pathUserRollback,
|
|
|
|
}
|
|
|
|
|
2016-04-19 01:06:26 +00:00
|
|
|
func walRollback(req *logical.Request, kind string, data interface{}) error {
|
|
|
|
f, ok := walRollbackMap[kind]
|
2015-03-21 10:18:46 +00:00
|
|
|
if !ok {
|
|
|
|
return fmt.Errorf("unknown type to rollback")
|
|
|
|
}
|
|
|
|
|
|
|
|
return f(req, kind, data)
|
|
|
|
}
|