common.go 272 B

1234567891011121314151617
  1. package system
  2. import (
  3. "go-nc/pkg/oss"
  4. "github.com/gin-gonic/gin"
  5. )
  6. // OSS STS 获取临时凭证
  7. func GetSTSInfo(c *gin.Context) {
  8. credentials, err := oss.GetAliyunStsClientCredential()
  9. if err != nil {
  10. c.Error(err)
  11. return
  12. }
  13. c.Set("res_data", credentials)
  14. }