macaroons: export db filename
This commit is contained in:
parent
1a47d182d3
commit
fc6505a0ff
@ -18,9 +18,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
// dbFileName is the filename within the data directory which contains
|
// DBFilename is the filename within the data directory which contains
|
||||||
// the macaroon stores.
|
// the macaroon stores.
|
||||||
dbFilename = "macaroons.db"
|
DBFilename = "macaroons.db"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Service encapsulates bakery.Bakery and adds a Close() method that zeroes the
|
// Service encapsulates bakery.Bakery and adds a Close() method that zeroes the
|
||||||
@ -42,7 +42,7 @@ type Service struct {
|
|||||||
func NewService(dir string, checks ...Checker) (*Service, error) {
|
func NewService(dir string, checks ...Checker) (*Service, error) {
|
||||||
// Open the database that we'll use to store the primary macaroon key,
|
// Open the database that we'll use to store the primary macaroon key,
|
||||||
// and all generated macaroons+caveats.
|
// and all generated macaroons+caveats.
|
||||||
macaroonDB, err := bolt.Open(path.Join(dir, dbFilename), 0600,
|
macaroonDB, err := bolt.Open(path.Join(dir, DBFilename), 0600,
|
||||||
bolt.DefaultOptions)
|
bolt.DefaultOptions)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
Reference in New Issue
Block a user