services

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyInput   = errors.New("input is empty")
	ErrInputTooLong = errors.New("input is too long")
)

Functions

This section is empty.

Types

type AutocompleteResult

type AutocompleteResult struct {
	Suggestions []string
}

type AutocompleteSvc

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

func NewAutocompleteService

func NewAutocompleteService(f *finder.Finder, hitList *hitlist.HitList, recipientThreshold uint64, logger logrus.FieldLogger) *AutocompleteSvc

func (*AutocompleteSvc) Autocomplete

func (a *AutocompleteSvc) Autocomplete(ctx context.Context, domain string, limit uint64) (AutocompleteResult, error)

type SuggestResult

type SuggestResult struct {
	Alternatives []string
	HasValidMX   bool
}

type SuggestSvc

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

func NewSuggestService

func NewSuggestService(f *finder.Finder, val validator.CheckFn, prefer preferrer.HasPreferred, logger logrus.FieldLogger) *SuggestSvc

func (*SuggestSvc) Suggest

func (c *SuggestSvc) Suggest(ctx context.Context, email string) (SuggestResult, error)

Jump to

Keyboard shortcuts

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