forked from emersion/go-imap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appendlimit.go
29 lines (23 loc) · 817 Bytes
/
appendlimit.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package backend
import (
"errors"
)
// An error that should be returned by User.CreateMessage when the message size
// is too big.
var ErrTooBig = errors.New("Message size exceeding limit")
// A backend that supports retrieving per-user message size limits.
type AppendLimitBackend interface {
Backend
// Get the fixed maximum message size in octets that the backend will accept
// when creating a new message. If there is no limit, return nil.
CreateMessageLimit() *uint32
}
// A user that supports retrieving per-user message size limits.
type AppendLimitUser interface {
User
// Get the fixed maximum message size in octets that the backend will accept
// when creating a new message. If there is no limit, return nil.
//
// This overrides the global backend limit.
CreateMessageLimit() *uint32
}