attachment

package
v0.0.0-...-c9ce307 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2022 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCreate   = errors.New("cannot allocate resource")
	ErrWrite    = errors.New("cannot write file content")
	ErrFileType = errors.New("unsupported MIME type")
	ErrNotFound = errors.New("file not found")
)

Functions

This section is empty.

Types

type AttachmentResponse

type AttachmentResponse struct {
	AttachID string `json:"attachId"`
}

type Handler

type Handler interface {
	Upload(data []byte) (string, error)
	Get(attachID string) (io.Reader, string, error)
	Clear() error
}

func NewLocalHandler

func NewLocalHandler(sessionID string) Handler

NewLocalHandler create a new attachment Handler for storing attachment in the local filesystem.

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL