mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 04:10:20 +08:00
feat: support Casdoor storage provider (#3147)
* feat: support Casdoor storage provider * fix: fix code format and nil pointer error * feat: change cert if statement
This commit is contained in:
19
storage/casdoor.go
Normal file
19
storage/casdoor.go
Normal file
@ -0,0 +1,19 @@
|
||||
package storage
|
||||
|
||||
import (
|
||||
"github.com/casdoor/oss"
|
||||
"github.com/casdoor/oss/casdoor"
|
||||
)
|
||||
|
||||
func NewCasdoorStorageProvider(providerType string, clientId string, clientSecret string, region string, bucket string, endpoint string, cert string, content string) oss.StorageInterface {
|
||||
sp := casdoor.New(&casdoor.Config{
|
||||
clientId,
|
||||
clientSecret,
|
||||
endpoint,
|
||||
cert,
|
||||
region,
|
||||
content,
|
||||
bucket,
|
||||
})
|
||||
return sp
|
||||
}
|
Reference in New Issue
Block a user