big update: added reactions, groups, media share
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
// Package media provides file storage and image thumbnail generation
|
||||
// for attachments shared in conversations.
|
||||
package media
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
)
|
||||
|
||||
// ErrNotFound is returned when a stored object does not exist.
|
||||
var ErrNotFound = errors.New("media: not found")
|
||||
|
||||
// Storage is an S3-like object store for attachment bytes.
|
||||
type Storage interface {
|
||||
Save(ctx context.Context, key string, r io.Reader) error
|
||||
Open(ctx context.Context, key string) (io.ReadCloser, error)
|
||||
Delete(ctx context.Context, key string) error
|
||||
}
|
||||
Reference in New Issue
Block a user