mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00

* feat: support Casdoor storage provider * fix: fix code format and nil pointer error * feat: change cert if statement
20 lines
410 B
Go
20 lines
410 B
Go
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
|
|
}
|