open-vault/builtin/logical/consul/backend.go

32 lines
500 B
Go
Raw Normal View History

2015-03-21 16:19:37 +00:00
package consul
import (
"github.com/hashicorp/vault/logical"
"github.com/hashicorp/vault/logical/framework"
)
func Factory(conf *logical.BackendConfig) (logical.Backend, error) {
return Backend().Setup(conf)
2015-03-21 16:19:37 +00:00
}
func Backend() *backend {
2015-03-21 16:19:37 +00:00
var b backend
b.Backend = &framework.Backend{
Paths: []*framework.Path{
pathConfigAccess(),
pathRoles(),
2015-03-21 16:19:37 +00:00
pathToken(&b),
},
Secrets: []*framework.Secret{
secretToken(&b),
2015-03-21 16:19:37 +00:00
},
}
return &b
2015-03-21 16:19:37 +00:00
}
type backend struct {
*framework.Backend
}