use casdoor
This commit is contained in:
20
providers/cert/cert.go
Normal file
20
providers/cert/cert.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package cert
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
"github.com/rogeecn/atom/container"
|
||||
"github.com/rogeecn/atom/utils/opt"
|
||||
)
|
||||
|
||||
func Provide(opts ...opt.Option) error {
|
||||
o := opt.New(opts...)
|
||||
var config Cert
|
||||
if err := o.UnmarshalConfig(&config); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
return container.Container.Provide(func() (*Cert, error) {
|
||||
return &config, nil
|
||||
}, o.DiOptions()...)
|
||||
}
|
||||
Reference in New Issue
Block a user