Documentation ¶
Index ¶
- func AddressModeToVault(mode AddressMode) vault.AddressMode
- func GetAddrID(apiAddrs map[string]proton.Address, email string) (string, error)
- func GetAddrIdx(apiAddrs map[string]proton.Address, idx int) (proton.Address, error)
- func GetPrimaryAddr(apiAddrs map[string]proton.Address) (proton.Address, error)
- func GroupBy[Key comparable, Value any](items []Value, key func(Value) Key) map[Key]Value
- func MapTo[From, To any](from []From) []To
- func NewProtonAPIScheduler(panicHandler async.PanicHandler) proton.Scheduler
- func SanitizeEmail(email string) string
- func WithAddrKR(apiUser proton.User, apiAddr proton.Address, keyPass []byte, ...) error
- func WithAddrKRs(apiUser proton.User, apiAddr map[string]proton.Address, keyPass []byte, ...) error
- type AddressMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddressModeToVault ¶
func AddressModeToVault(mode AddressMode) vault.AddressMode
func GetAddrIdx ¶
GetAddrIdx returns the address with the given index.
func GetPrimaryAddr ¶
func GroupBy ¶
func GroupBy[Key comparable, Value any](items []Value, key func(Value) Key) map[Key]Value
GroupBy returns a map of the given slice grouped by the given key. Duplicate keys are overwritten.
func MapTo ¶
func MapTo[From, To any](from []From) []To
MapTo converts the slice to the given type. This is not runtime safe, so make sure the slice is of the correct type! (This is a workaround for the fact that slices cannot be converted to other types generically).
func NewProtonAPIScheduler ¶
func NewProtonAPIScheduler(panicHandler async.PanicHandler) proton.Scheduler
func SanitizeEmail ¶
func WithAddrKR ¶
Types ¶
type AddressMode ¶
type AddressMode int
const ( AddressModeCombined AddressMode = iota AddressModeSplit )
func VaultToAddressMode ¶
func VaultToAddressMode(mode vault.AddressMode) AddressMode
Click to show internal directories.
Click to hide internal directories.