types

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveProfile

func SaveProfile(profile *Profile, path string) error

Types

type Category

type Category string
const (
	CategoryConfig      Category = "config"
	CategoryMailFlow    Category = "mailflow"
	CategorySecurity    Category = "security"
	CategoryPerformance Category = "performance"
)

type CheckResult

type CheckResult struct {
	Check     string                 `json:"check"`
	Category  Category               `json:"category"`
	Severity  Severity               `json:"severity"`
	Status    Status                 `json:"status"`
	Message   string                 `json:"message"`
	Details   map[string]interface{} `json:"details"`
	Duration  int64                  `json:"duration_ms"`
	Error     string                 `json:"error,omitempty"`
	Timestamp time.Time              `json:"timestamp"`
}

type Mode

type Mode string
const (
	ModeLocal  Mode = "local"
	ModeRemote Mode = "remote"
)

type OutputMode

type OutputMode string
const (
	OutputQuiet   OutputMode = "quiet"
	OutputSummary OutputMode = "summary"
	OutputVerbose OutputMode = "verbose"
)

type Profile

type Profile struct {
	Name        string         `yaml:"name"`
	SMTPHost    string         `yaml:"smtp_host"`
	SMTPPort    int            `yaml:"smtp_port"`
	IMAPHost    string         `yaml:"imap_host"`
	IMAPPort    int            `yaml:"imap_port"`
	Domains     []string       `yaml:"domains"`
	TestUser    string         `yaml:"test_user"`
	PasswordEnv string         `yaml:"password_env"`
	Options     ProfileOptions `yaml:"options"`
}

func LoadProfile

func LoadProfile(name string) (*Profile, error)

type ProfileOptions

type ProfileOptions struct {
	TLS      bool          `yaml:"tls"`
	StartTLS bool          `yaml:"starttls"`
	Timeout  time.Duration `yaml:"timeout"`
}

type ServerConfig

type ServerConfig struct {
	SMTPHost    string
	SMTPPort    int
	IMAPHost    string
	IMAPPort    int
	Domains     []string
	TestUser    string
	TestPass    string
	TLS         bool
	StartTLS    bool
	Timeout     time.Duration
	ConfigPath  string
	PasswordEnv string
	DryRun      bool
	AutoCleanup bool
}

func (*ServerConfig) IMAPAddress

func (cfg *ServerConfig) IMAPAddress() string

func (*ServerConfig) SMTPAddress

func (cfg *ServerConfig) SMTPAddress() string

func (*ServerConfig) TLSConfig

func (cfg *ServerConfig) TLSConfig() *tls.Config

type Severity

type Severity string
const (
	SeverityError   Severity = "error"
	SeverityWarning Severity = "warning"
	SeverityInfo    Severity = "info"
)

type Status

type Status string
const (
	StatusPass    Status = "pass"
	StatusFail    Status = "fail"
	StatusWarning Status = "warning"
	StatusSkip    Status = "skip"
)

Jump to

Keyboard shortcuts

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