Debian Codegraph @

lib/hooks/mail-deleted.go

raw
1 package hooks
2
3 import (
4 "fmt"
5
6 "git.sr.ht/~rjarry/aerc/config"
7 )
8
9 type MailDeleted struct {
10 Account string
11 Backend string
12 Folder string
13 Role string
14 }
15
16 func (m *MailDeleted) Cmd() string {
17 return config.Hooks().MailDeleted
18 }
19
20 func (m *MailDeleted) Env() []string {
21 return []string{
22 fmt.Sprintf("AERC_ACCOUNT=%s", m.Account),
23 fmt.Sprintf("AERC_ACCOUNT_BACKEND=%s", m.Backend),
24 fmt.Sprintf("AERC_FOLDER=%s", m.Folder),
25 fmt.Sprintf("AERC_FOLDER_ROLE=%s", m.Role),
26 }
27 }