autoconfig

package module
v0.0.0-...-5bcb3ad Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MIT Imports: 12 Imported by: 0

README

go-autoconfig

Discover configuration parameters for e-mail, contact and calendar servers.

License

MIT

Documentation

Overview

Package autoconfig discovers configuration parameters for e-mail, contact and calendar servers.

The following mechanisms are implemented:

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SMTP *SMTP
	IMAP *IMAP
	JMAP *JMAP
}

Config contains the result of a service discovery.

func DiscoverMail

func DiscoverMail(ctx context.Context, addr string, st ServiceType) (*Config, error)

DiscoverMail performs service discovery from an e-mail address.

type IMAP

type IMAP struct {
	Addr     string
	StartTLS bool

	Username string
}

IMAP returns configuration for an IMAP server.

type JMAP

type JMAP struct {
	SessionEndpoint string
}

JMAP returns configuration for a JMAP server.

type SMTP

type SMTP struct {
	Addr     string
	StartTLS bool

	Username string
}

SMTP returns configuration for an SMTP server.

type ServiceType

type ServiceType int

ServiceType is a set of service types to be discovered.

const (
	ServiceTypeSMTP ServiceType = 1 << iota
	ServiceTypeIMAP
	ServiceTypeJMAP
)

Jump to

Keyboard shortcuts

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