config

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveConfig

func SaveConfig(config *Config) error

SaveConfig saves the given configuration to the config file.

Types

type Config

type Config struct {
	ServiceProvider string `json:"service_provider"`
	Email           string `json:"email"`
	Password        string `json:"password"`
	Name            string `json:"name"`
}

Config stores the user's email configuration.

func LoadConfig

func LoadConfig() (*Config, error)

LoadConfig loads the configuration from the config file.

func (*Config) IMAPServer

func (c *Config) IMAPServer() string

IMAPServer returns the IMAP server address based on the service provider. This is used to connect to the email provider's IMAP server. It returns an empty string if the service provider is not supported.

Jump to

Keyboard shortcuts

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