mirror of
https://github.com/smallstep/certificates.git
synced 2024-10-31 03:20:16 +00:00
17 lines
370 B
Go
17 lines
370 B
Go
|
package authority
|
||
|
|
||
|
import (
|
||
|
"github.com/smallstep/certificates/db"
|
||
|
)
|
||
|
|
||
|
// Option sets options to the Authority.
|
||
|
type Option func(*Authority)
|
||
|
|
||
|
// WithDatabase sets an already initialized authority database to a new
|
||
|
// authority. This option is intended to be use on graceful reloads.
|
||
|
func WithDatabase(db db.AuthDB) Option {
|
||
|
return func(a *Authority) {
|
||
|
a.db = db
|
||
|
}
|
||
|
}
|