config

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package config implements all configuration aspects of KoboMail

Package config implements all configuration aspects of KoboMail

Index

Constants

View Source
const (
	DefaultAddonPath   = "/mnt/onboard/.adds/kobomail"
	DefaultLibraryPath = "/mnt/onboard/KoboMailLibrary"
)

Set default paths

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	IMAPConfig        imapConfigSection        `koanf:"imap_config" validate:"required"`
	ProcessingConfig  processingConfigSection  `koanf:"processing_config" validate:"required"`
	ApplicationConfig applicationConfigSection `koanf:"application_config" validate:"required"`
	// contains filtered or unexported fields
}

Config config struct

func LoadConfig

func LoadConfig(flags *flag.FlagSet) (*Config, error)

LoadConfig instantiates a new Config

func (Config) Messages

func (c Config) Messages() map[string]string

func (*Config) Validate

func (c *Config) Validate() validate.Errors

Validate returns if the given configuration is valid and any validation errors

func (Config) ValidateFolder

func (c Config) ValidateFolder(val string) bool

ValidateFolder validates that the path is a valid folder

func (Config) ValidateLogLevel

func (c Config) ValidateLogLevel(val string) bool

ValidateLogLevel validates that the log level is one of the valid log levels

type EmailFlagType

type EmailFlagType string

EmailFlagType enum

const (
	EmailFlagTypePlus    EmailFlagType = "plus"
	EmailFlagTypeSubject EmailFlagType = "subject"
)

EmailFlagType enum values

Jump to

Keyboard shortcuts

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