opt.go 702 B

1234567891011121314151617181920212223242526272829
  1. package mailbox
  2. import "time"
  3. // Opt represents an e-mail POP/IMAP mailbox configuration.
  4. type Opt struct {
  5. // Host is the server's hostname.
  6. Host string `json:"host"`
  7. // Port is the server port.
  8. Port int `json:"port"`
  9. AuthProtocol string `json:"auth_protocol"`
  10. // Username is the mail server login username.
  11. Username string `json:"username"`
  12. // Password is the mail server login password.
  13. Password string `json:"password"`
  14. // Folder is the name of the IMAP folder to scan for e-mails.
  15. Folder string `json:"folder"`
  16. // Optional TLS settings.
  17. TLSEnabled bool `json:"tls_enabled"`
  18. TLSSkipVerify bool `json:"tls_skip_verify"`
  19. ScanInterval time.Duration `json:"scan_interval"`
  20. }