123456789101112131415161718 |
- package api
- import (
- "mesh/conf"
- "github.com/gin-gonic/gin"
- )
- func UploadPolicy(c *gin.Context, apictx *ApiSession) (interface{}, error) {
- saveType := apictx.Svc.Conf.SaveType
- if saveType == conf.SaveType_Obs {
- return ServiceObsUploadPolicy(c, apictx)
- }
- if saveType == conf.SaveType_Minio {
- return MinioCreateUserPolicy(c, apictx)
- }
- return nil, NewError("不支持的存储类型")
- }
|