client

package
v0.2.102 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Copyright (c) "2024 Verosint, Inc"

Copyright (c) "2024 Verosint, Inc"

Index

Constants

View Source
const (
	RELEASES_URL = "https://gitlab.com/verosint/public/verosint/-/releases/permalink/latest"
)

Variables

View Source
var (
	BuildVersion = build.Version()
	UpdateClient = req.C().SetCommonHeader("User-Agent", USER_AGENT+build.Version()).
					SetCommonRetryCount(1).
					SetCommonRetryFixedInterval(1 * time.Second).
					SetTimeout(10 * time.Second).
					SetRedirectPolicy(req.NoRedirectPolicy())
)
View Source
var (
	BASE_URL             = "https://api.verosint.com"
	RULE_EVALUTION_PATH  = "/v1/rules/evaluate"
	EVENT_INGESTION_PATH = "/v1/signalprint/events"
	ACCOUNT_PATH         = "/v1/accounts"
	USER_AGENT           = "verosint-cli/"
)

Functions

This section is empty.

Types

type DefaultOutComes

type DefaultOutComes struct {
	Outcomes []string `json:"outcomes"`
}

type EvaluationErrors

type EvaluationErrors struct {
	Error string `json:"error,omitempty"`
	Rule  Rule   `json:"rule,omitempty"`
}

type EvaluationResult

type EvaluationResult struct {
	RequestId string                            `json:"requestId,omitempty"`
	Outcomes  []string                          `json:"outcomes,omitempty"`
	Reasons   []string                          `json:"reasons,omitempty"`
	Errors    []EvaluationErrors                `json:"errors,omitempty"`
	Error     string                            `json:"error,omitempty"`
	Signals   map[string]map[string]interface{} `json:"signals,omitempty"`
}

type EventIngestionRequest

type EventIngestionRequest []Identifiers

type EventIngestionResponse

type EventIngestionResponse struct {
	RequestId string `json:"requestId,omitempty"`
	Error     string `json:"error,omitempty"`
}

type Identifiers

type Identifiers map[string]string

type LookupResponse added in v0.2.43

type LookupResponse struct {
	AccountID string   `json:"accountId,omitempty"`
	RequestID string   `json:"requestId,omitempty"`
	Error     string   `json:"error,omitempty"`
	Emails    []string `json:"emails,omitempty"`
	Phones    []string `json:"phones,omitempty"`
	Ips       []string `json:"ips,omitempty"`
	LastEvent *struct {
		PrintID        string      `json:"printId,omitempty"`
		EventTimestamp string      `json:"eventTimestamp,omitempty"`
		EventType      string      `json:"eventType,omitempty"`
		Email          string      `json:"email,omitempty"`
		Phone          string      `json:"phone,omitempty"`
		UserAgent      string      `json:"userAgent,omitempty"`
		IP             string      `json:"ip,omitempty"`
		Signals        interface{} `json:"signals,omitempty"`
	} `json:"lastEvent,omitempty"`
	ConnectedAccounts map[string][]interface{} `json:"connectedAccounts,omitempty"`
}

type Operation

type Operation struct {
	Op    string   `json:"op"`
	Path  string   `json:"path"`
	Value []string `json:"value,omitempty"`
}

type Patch

type Patch struct {
	Operations []Operation `json:"operations"`
}

type Rule

type Rule struct {
	Name     string   `json:"name,omitempty"`
	Query    string   `json:"query,omitempty"`
	Outcomes []string `json:"outcomes,omitempty"`
	Reason   string   `json:"reason,omitempty"`
}

type RulesEvaluationRequest

type RulesEvaluationRequest struct {
	RuleSetUUID string                 `json:"ruleSetUuid"`
	Rules       []Rule                 `json:"rules"`
	Default     DefaultOutComes        `json:"default"`
	Identifiers Identifiers            `json:"identifiers"`
	Parameters  map[string]interface{} `json:"parameters"`
	Verbose     bool                   `json:"verbose"`
}

type VerosintClient added in v0.2.38

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

func New

func New(apiKey string) *VerosintClient

func (*VerosintClient) EvaluateRules added in v0.2.38

func (r *VerosintClient) EvaluateRules(ctx context.Context, request RulesEvaluationRequest) *EvaluationResult

func (*VerosintClient) IngestEvents added in v0.2.38

func (*VerosintClient) LookupAccount added in v0.2.43

func (r *VerosintClient) LookupAccount(ctx context.Context, accountId string) *LookupResponse

type VersionInfo

type VersionInfo struct {
	LatestVersion  string
	CurrentVersion string
	Error          string
}

func (*VersionInfo) GetVersion

func (v *VersionInfo) GetVersion() bool

Jump to

Keyboard shortcuts

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