github.com/openimsdk/tools@v0.0.49/s3/minio/cache.go (about) 1 package minio 2 3 import "context" 4 5 type ImageInfo struct { 6 IsImg bool `json:"isImg"` 7 Width int `json:"width"` 8 Height int `json:"height"` 9 Format string `json:"format"` 10 Etag string `json:"etag"` 11 } 12 13 type Cache interface { 14 GetImageObjectKeyInfo(ctx context.Context, key string, fn func(ctx context.Context) (*ImageInfo, error)) (*ImageInfo, error) 15 GetThumbnailKey(ctx context.Context, key string, format string, width int, height int, minioCache func(ctx context.Context) (string, error)) (string, error) 16 DelObjectImageInfoKey(ctx context.Context, keys ...string) error 17 DelImageThumbnailKey(ctx context.Context, key string, format string, width int, height int) error 18 }