pks

package
v1.0.0-...-9f5453b Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2018 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultSMTPHost = "localhost:25"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	From string     `toml:"from"`
	To   []string   `toml:"to"`
	SMTP SMTPConfig `toml:"smtp"`
}

type SMTPConfig

type SMTPConfig struct {
	Host     string `toml:"host"`
	ID       string `toml:"id"`
	User     string `toml:"user"`
	Password string `toml:"pass"`
}

type Sender

type Sender struct {
	// contains filtered or unexported fields
}

Basic implementation of outbound PKS synchronization

func NewSender

func NewSender(hkpStorage storage.Storage, pksStorage Storage, config *Config) (*Sender, error)

Initialize from command line switches if fields not set.

func (*Sender) SendKey

func (sender *Sender) SendKey(addr string, key *openpgp.PrimaryKey) error

Email an updated public key to a PKS server.

func (*Sender) SendKeys

func (sender *Sender) SendKeys(status Status) error

func (*Sender) Start

func (sender *Sender) Start()

Start PKS synchronization

func (*Sender) Stop

func (sender *Sender) Stop() error

type Status

type Status struct {
	// Email address of the PKS server.
	Addr string
	// Timestamp of the last sync to this server.
	LastSync time.Time
}

Status of PKS synchronization

type Storage

type Storage interface {
	Init(addr string) error
	All() ([]Status, error)
	Update(status Status) error
}

Jump to

Keyboard shortcuts

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