add swagger

This commit is contained in:
yanghao05
2023-06-09 14:32:21 +08:00
parent 37bf456102
commit 3f27dee0b2
23 changed files with 245 additions and 89 deletions

View File

@@ -1,22 +1,19 @@
package casdoor
import (
"log"
"github.com/casdoor/casdoor-go-sdk/casdoorsdk"
"github.com/rogeecn/atom/container"
"github.com/rogeecn/atom/providers/cert"
"github.com/rogeecn/atom/utils/opt"
)
type Casdoor struct {
}
type Casdoor struct{}
func Provide(opts ...opt.Option) error {
o := opt.New(opts...)
var config Config
if err := o.UnmarshalConfig(&config); err != nil {
log.Fatal(err)
return err
}
return container.Container.Provide(func(cert *cert.Cert) *Casdoor {
certificate := config.Certificate