blob: 499d6c0f557eb4e2ada895579901f5057a356907 (
plain)
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
|
package imap
type ensureCommando struct {
folder Folder
}
func (cmd ensureCommando) execute(conn *connection) error {
return conn.ensureFolder(cmd.folder)
}
func (client *Client) EnsureFolder(folder Folder) error {
return client.commander.execute(ensureCommando{folder})
}
type addCommando struct {
folder Folder
messages []string
}
func (cmd addCommando) execute(conn *connection) error {
return conn.putMessages(cmd.folder, cmd.messages)
}
func (client *Client) PutMessages(folder Folder, messages []string) error {
return client.commander.execute(addCommando{folder, messages})
}
|