service

package
v0.0.0-...-c119f7d Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const CACHE_LOOKBACK = 90 // days

Variables

This section is empty.

Functions

This section is empty.

Types

type BetterContactData

type BetterContactData struct {
	FirstName     string `json:"first_name"`
	LastName      string `json:"last_name"`
	LinkedInUrl   string `json:"linkedin_url"`
	Company       string `json:"company"`
	CompanyDomain string `json:"company_domain"`
}

type BetterContactRequestBody

type BetterContactRequestBody struct {
	Data              []BetterContactData `json:"data"`
	Webhook           string              `json:"webhook"`
	EnrichPhoneNumber bool                `json:"enrich_phone_number"`
}

type BetterContactResponseBody

type BetterContactResponseBody struct {
	Success bool   `json:"success"`
	ID      string `json:"id"`
	Message string `json:"message"`
}

type BettercontactService

type BettercontactService interface {
	FindWorkEmail(ctx context.Context, linkedInUrl, firstName, lastName, companyName, companyDomain string, enrichPhoneNumber bool) (string, string, *postgresentity.BetterContactResponseBody, error)
}

func NewBettercontactService

func NewBettercontactService(config *config.Config, services *Services, log logger.Logger) BettercontactService

type BrandfetchService

type BrandfetchService interface {
	GetByDomain(ctx context.Context, domain string) (*postgresentity.BrandfetchResponseBody, error)
}

func NewBrandfetchService

func NewBrandfetchService(config *config.Config, services *Services, log logger.Logger) BrandfetchService

type IPIdentityService

type IPIdentityService interface {
	IPIdentity(c context.Context, ip string) (*model.SnitcherResponse, error)
}

func NewIPIdentityService

func NewIPIdentityService(config *config.Config, services *Services) IPIdentityService

type ScrapInSearchRequestParams

type ScrapInSearchRequestParams struct {
	FirstName     string `json:"firstName,omitempty"`
	LastName      string `json:"lastName,omitempty"`
	CompanyDomain string `json:"companyDomain,omitempty"`
	Email         string `json:"email,omitempty"`
	LinkedInUrl   string `json:"linkedInUrl,omitempty"`
}

type ScrapinService

type ScrapinService interface {
	ScrapInPersonProfile(ctx context.Context, linkedInUrl string) (uint64, *postgresentity.ScrapInResponseBody, error)
	ScrapInSearchPerson(ctx context.Context, email, fistName, lastName, domain, companyName string) (uint64, *postgresentity.ScrapInResponseBody, error)
	ScrapInCompanyProfile(ctx context.Context, linkedInUrl string) (uint64, *postgresentity.ScrapInResponseBody, error)
	ScrapInSearchCompany(ctx context.Context, domain string) (uint64, *postgresentity.ScrapInResponseBody, error)
}

func NewScrapInService

func NewScrapInService(config *config.Config, services *Services, log logger.Logger) ScrapinService

type Services

type Services struct {
	Logger               logger.Logger
	CommonServices       *commonservice.Services
	BettercontactService BettercontactService
	BrandfetchService    BrandfetchService
	ScrapeInService      ScrapinService
	IPIdentityService    IPIdentityService
}

func InitServices

func InitServices(config *config.Config, postgresDB *commonConfig.PostgresDB, driver *neo4j.DriverWithContext, logger logger.Logger) *Services

Jump to

Keyboard shortcuts

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