Also return google bucket url in response

This commit is contained in:
2022-12-17 14:23:47 +01:00
parent 576a4e1579
commit 79d7c4068b
5 changed files with 25 additions and 21 deletions

View File

@@ -1,8 +1,15 @@
package util
import "fmt"
import (
"fmt"
)
// ImageURL creates imageURL from hostname and image name
func ImageURL(hostname, name string) string {
return fmt.Sprintf("https://%s/api/v1/images/%s", hostname, name)
}
// ImageRemoteURL creates imageURL to bucket file
func ImageRemoteURL(bucketname string, path string) string {
return fmt.Sprintf("https://storage.googleapis.com/%s/%s", bucketname, path)
}