use casdoor

This commit is contained in:
yanghao05
2023-06-09 10:28:34 +08:00
parent d28d9649ed
commit 117d80df57
7 changed files with 111 additions and 2 deletions

20
providers/cert/cert.go Normal file
View 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()...)
}