You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
626 B
27 lines
626 B
package cachekey
|
|
|
|
import "strconv"
|
|
|
|
const (
|
|
object = "OBJECT:"
|
|
s3 = "S3:"
|
|
minioImageInfo = "MINIO:IMAGE:"
|
|
minioThumbnail = "MINIO:THUMBNAIL:"
|
|
)
|
|
|
|
func GetObjectKey(engine string, name string) string {
|
|
return object + engine + ":" + name
|
|
}
|
|
|
|
func GetS3Key(engine string, name string) string {
|
|
return s3 + engine + ":" + name
|
|
}
|
|
|
|
func GetObjectImageInfoKey(key string) string {
|
|
return minioImageInfo + key
|
|
}
|
|
|
|
func GetMinioImageThumbnailKey(key string, format string, width int, height int) string {
|
|
return minioThumbnail + format + ":w" + strconv.Itoa(width) + ":h" + strconv.Itoa(height) + ":" + key
|
|
}
|