service

package
v0.0.0-...-674ac6f Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const MaxDurationCallMailSherpa = 10 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressValidationService

type AddressValidationService interface {
	ValidateUsAddress(address string) (*extract.Lookup, error)
	ValidateInternationalAddress(address, country string) (*international_street.Lookup, error)
}

func NewAddressValidationService

func NewAddressValidationService(config *config.Config, services *Services) AddressValidationService

type EmailValidationService

type EmailValidationService interface {
	ValidateEmailWithMailSherpa(ctx context.Context, email string) (*model.ValidateEmailMailSherpaData, error)
	ValidateEmailScrubby(ctx context.Context, email string) (string, error)
	ValidateEmailWithTrueinbox(ctx context.Context, email string) (*postgresentity.TrueInboxResponseBody, error)
	ValidateEmailWithEnrow(ctx context.Context, email string, extendedWaitingTimeForResponse bool) (string, error)
}

func NewEmailValidationService

func NewEmailValidationService(config *config.Config, services *Services, log logger.Logger) EmailValidationService

type EnrowRequest

type EnrowRequest struct {
	Email    string `json:"email"`
	Settings struct {
		Webhook string `json:"webhook"`
	} `json:"settings"`
}

type EnrowResponse

type EnrowResponse struct {
	Id          string  `json:"id"`
	CreditsUsed float64 `json:"credits_used"`
	Message     string  `json:"message"`
}

type IpIntelligenceService

type IpIntelligenceService interface {
	LookupIp(ctx context.Context, ip string) (*postgresentity.IPDataResponseBody, error)
}

func NewIpIntelligenceService

func NewIpIntelligenceService(config *config.Config, services *Services, log logger.Logger) IpIntelligenceService

type PhoneNumberValidationService

type PhoneNumberValidationService interface {
	ValidatePhoneNumber(ctx context.Context, countryCodeA2 string, phoneNumber string) (*string, *string, error)
}

func NewPhoneNumberValidationService

func NewPhoneNumberValidationService(services *Services) PhoneNumberValidationService

type ScrubbyIoRequest

type ScrubbyIoRequest struct {
	Email       string `json:"email"`
	CallbackUrl string `json:"callback_url"`
	Identifier  string `json:"identifier"`
}

type ScrubbyIoResponse

type ScrubbyIoResponse struct {
	Email      string `json:"email"`
	Status     string `json:"status"`
	Identifier string `json:"identifier"`
}

type Services

type Services struct {
	CommonServices *commonService.Services

	AddressValidationService     AddressValidationService
	PhoneNumberValidationService PhoneNumberValidationService
	EmailValidationService       EmailValidationService
	IpIntelligenceService        IpIntelligenceService
}

func InitServices

func InitServices(config *config.Config, gormDb *gorm.DB, driver *neo4j.DriverWithContext, log logger.Logger) *Services

Jump to

Keyboard shortcuts

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