config

package
v0.0.0-...-9ae858a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Account

type Account struct {
	Name string
	Imap *ImapCfg
	Smtp *SmtpCfg
}

type Command

type Command string

type Config

type Config struct {
	Log struct {
		Level  string
		Output string
	}
	Accounts    []*Account
	Keybindings Keybindings
	Filters     map[string]string
}

func (*Config) Validate

func (c *Config) Validate() error

type Filters

type Filters map[string]string

type ImapCfg

type ImapCfg struct {
	Port    uint16
	Host    string
	User    string
	Tls     bool
	PassCmd string
}

type KeyMode

type KeyMode string
const (
	KEY_MODE_SEARCH  KeyMode = "search"
	KEY_MODE_THREAD  KeyMode = "thread"
	KEY_MODE_GLOBAL  KeyMode = "global"
	KEY_MODE_MBOXES  KeyMode = "mboxes"
	KEY_MODE_MBOX    KeyMode = "mbox"
	KEY_MODE_MAIL    KeyMode = "mail"
	KEY_MODE_PARTS   KeyMode = "parts"
	KEY_MODE_COMPOSE KeyMode = "compose"
)

func (KeyMode) Validate

func (k KeyMode) Validate() error

type Keybindings

type Keybindings map[KeyMode]Mapping

func (Keybindings) Defaults

func (k Keybindings) Defaults()

func (Keybindings) Validate

func (k Keybindings) Validate() error

type Mapping

type Mapping map[string]Command

map key sequence to command

func (Mapping) FindCommand

func (m Mapping) FindCommand(ks []*lib.KeyStroke) string

type SmtpCfg

type SmtpCfg struct {
	Port    uint16
	Host    string
	User    string
	Tls     bool
	PassCmd string
	// either plain, login, none
	Auth string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL