config.go 968 B

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. // Credential
  11. credentialAccessID = os.Getenv("OSS_CREDENTIAL_KEY_ID")
  12. credentialAccessKey = os.Getenv("OSS_CREDENTIAL_KEY_SECRET")
  13. credentialUID = os.Getenv("OSS_CREDENTIAL_UID")
  14. // The cname endpoint
  15. endpoint4Cname = os.Getenv("OSS_TEST_CNAME_ENDPOINT")
  16. )
  17. const (
  18. // The object name in the sample code
  19. objectKey string = "my-object"
  20. appendObjectKey string = "my-object-append"
  21. // The local files to run sample code.
  22. localFile string = "sample/BingWallpaper-2015-11-07.jpg"
  23. htmlLocalFile string = "sample/The Go Programming Language.html"
  24. )