summaryrefslogtreecommitdiff
path: root/internal/media/types.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/media/types.go')
-rw-r--r--internal/media/types.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/media/types.go b/internal/media/types.go
index a6b38b467..cceff216c 100644
--- a/internal/media/types.go
+++ b/internal/media/types.go
@@ -119,3 +119,9 @@ type AdditionalEmojiInfo struct {
// DataFunc represents a function used to retrieve the raw bytes of a piece of media.
type DataFunc func(ctx context.Context) (reader io.Reader, fileSize int, err error)
+
+// PostDataCallbackFunc represents a function executed after the DataFunc has been executed,
+// and the returned reader has been read. It can be used to clean up any remaining resources.
+//
+// This can be set to nil, and will then not be executed.
+type PostDataCallbackFunc func(ctx context.Context) error