sriracha/extension_attach.go

16 lines
394 B
Go

package sriracha
import "io"
// ExtensionAttach defines the interface for extensions that handle attaching
// files when creating a post.
type ExtensionAttach interface {
Extension
// Types returns a list of attachment types handled by this extension.
Types() []*AttachmentType
// Attach handles an uploaded file.
Attach(file io.Reader, size int64, mime string) (*Attachment, error)
}