Debian Codegraph @

models/templates.go

raw
1 package models
2
3 import (
4 "time"
5
6 "github.com/emersion/go-message/mail"
7 )
8
9 // This interface needs to be implemented for compliance with aerc-templates(7)
10 type TemplateData interface {
11 Account() string
12 AccountBackend() string
13 AccountFrom() *mail.Address
14 Folder() string
15 To() []*mail.Address
16 Cc() []*mail.Address
17 Bcc() []*mail.Address
18 From() []*mail.Address
19 Peer() []*mail.Address
20 ReplyTo() []*mail.Address
21 Date() time.Time
22 DateAutoFormat(date time.Time) string
23 Header(name string) string
24 ThreadPrefix() string
25 ThreadCount() int
26 ThreadUnread() int
27 ThreadFolded() bool
28 ThreadContext() bool
29 ThreadOrphan() bool
30 Subject() string
31 Body() string
32 SubjectBase() string
33 Number() int
34 Labels() []string
35 Filename() string
36 Filenames() []string
37 Flags() []string
38 IsReplied() bool
39 HasAttachment() bool
40 Attach(string) string
41 IsFlagged() bool
42 IsRecent() bool
43 IsUnread() bool
44 IsMarked() bool
45 IsDraft() bool
46 IsForwarded() bool
47 MessageId() string
48 Role() string
49 Size() int
50 OriginalText() string
51 OriginalDate() time.Time
52 OriginalFrom() []*mail.Address
53 OriginalMIMEType() string
54 OriginalHeader(name string) string
55 Recent(folders ...string) int
56 Unread(folders ...string) int
57 Exists(folders ...string) int
58 RUE(folders ...string) string
59 HasNew() bool
60 Connected() bool
61 ConnectionInfo() string
62 ContentInfo() string
63 StatusInfo() string
64 TrayInfo() string
65 PendingKeys() string
66 Style(string, string) string
67 StyleSwitch(string, ...Case) string
68 StyleMap([]string, ...Case) []string
69 Signature() string
70 Bell() bool
71 Title() string
72 }
73
74 type Case interface {
75 Matches(string) bool
76 Value() string
77 Skip() bool
78 }