client

package
v0.0.0-...-0e0368c Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractIP

func ExtractIP(r *http.Request) string

extracts the client's IP address from a request

Types

type Authenticator

type Authenticator interface {
	Authenticate(email, password string) (success bool, err error) // should not be called if Available() returns false
	Available() bool
	Name() string
}

type Authenticators

type Authenticators []Authenticator

func (Authenticators) Authenticate

func (as Authenticators) Authenticate(email, password string) (bool, error)

Tries the contained authenticators with the given credentials. If an authenticator returns an error, we continue with the next one. The last error is returned.

func (Authenticators) Available

func (as Authenticators) Available() bool

type SASLPlain

type SASLPlain struct {
	Socket string
}

Authenticates against an unix socket which receivers a SASL PLAIN request and returns "authenticated" if authentication was successful.

func (SASLPlain) Authenticate

func (s SASLPlain) Authenticate(email, password string) (bool, error)

func (SASLPlain) Available

func (s SASLPlain) Available() bool

func (SASLPlain) Name

func (s SASLPlain) Name() string

type SMTPS

type SMTPS struct {
	Port uint
}

func (SMTPS) Authenticate

func (s SMTPS) Authenticate(email, password string) (bool, error)

func (SMTPS) Available

func (s SMTPS) Available() bool

func (SMTPS) Name

func (s SMTPS) Name() string

type STARTTLS

type STARTTLS struct {
	Port uint
}

func (STARTTLS) Authenticate

func (s STARTTLS) Authenticate(email, password string) (bool, error)

func (STARTTLS) Available

func (s STARTTLS) Available() bool

func (STARTTLS) Name

func (s STARTTLS) Name() string

Jump to

Keyboard shortcuts

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