config.go 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. package sample
  2. import "os"
  3. var (
  4. // Sample code's env configuration. You need to specify them with the actual configuration if you want to run sample code
  5. endpoint = os.Getenv("OSS_TEST_ENDPOINT")
  6. accessID = os.Getenv("OSS_TEST_ACCESS_KEY_ID")
  7. accessKey = os.Getenv("OSS_TEST_ACCESS_KEY_SECRET")
  8. bucketName = os.Getenv("OSS_TEST_BUCKET")
  9. kmsID = os.Getenv("OSS_TEST_KMS_ID")
  10. // The cname endpoint
  11. // These information are required to run sample/cname_sample
  12. endpoint4Cname = os.Getenv("OSS_TEST_ENDPOINT")
  13. accessID4Cname = os.Getenv("OSS_TEST_ACCESS_KEY_ID")
  14. accessKey4Cname = os.Getenv("OSS_TEST_ACCESS_KEY_SECRET")
  15. bucketName4Cname = os.Getenv("OSS_TEST_CNAME_BUCKET")
  16. )
  17. const (
  18. // The object name in the sample code
  19. objectKey string = "my-object"
  20. objectAppendKey string = "my-object-append"
  21. // The local files to run sample code.
  22. localFile string = "src/sample/BingWallpaper-2015-11-07.jpg"
  23. htmlLocalFile string = "src/sample/The Go Programming Language.html"
  24. newPicName string = "src/sample/NewBingWallpaper-2015-11-07.jpg"
  25. )