aboutsummaryrefslogtreecommitdiff
path: root/internal/imap/cmds.go
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2020-05-03 00:41:36 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2020-05-03 00:41:36 +0200
commit168cce8a935de864eef95f423f128a7bf49aafda (patch)
tree9cc240dd479b1e85fbb55e1cda4a14d3a938d50e /internal/imap/cmds.go
parentfec3ecd257c34fba37703b2999ab5ea902314657 (diff)
downloadfeed2imap-go-168cce8a935de864eef95f423f128a7bf49aafda.tar.gz
feed2imap-go-168cce8a935de864eef95f423f128a7bf49aafda.tar.bz2
feed2imap-go-168cce8a935de864eef95f423f128a7bf49aafda.zip
Update support for IMAP
Diffstat (limited to '')
-rw-r--r--internal/imap/cmds.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/internal/imap/cmds.go b/internal/imap/cmds.go
index d978d80..7c99fc3 100644
--- a/internal/imap/cmds.go
+++ b/internal/imap/cmds.go
@@ -24,3 +24,19 @@ func (cmd addCommando) execute(conn *connection) error {
func (client *Client) PutMessages(folder Folder, messages []string) error {
return client.commander.execute(addCommando{folder, messages})
}
+
+type replaceCommando struct {
+ folder Folder
+ header string
+ value string
+ newContent string
+ force bool
+}
+
+func (cmd replaceCommando) execute(conn *connection) error {
+ return conn.replace(cmd.folder, cmd.header, cmd.value, cmd.newContent, cmd.force)
+}
+
+func (client *Client) Replace(folder Folder, header, value, newContent string, force bool) error {
+ return client.commander.execute(replaceCommando{folder, header, value, newContent, force})
+}