sdk

package
v1.0.0-test.4 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: MIT Imports: 20 Imported by: 1

Documentation

Overview

* Fingerprint Pro Server API * * Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. * * API version: 3 * Contact: support@fingerprint.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Fingerprint Pro Server API * * Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. * * API version: 3 * Contact: support@fingerprint.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Fingerprint Pro Server API * * Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. * * API version: 3 * Contact: support@fingerprint.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Fingerprint Pro Server API * * Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. * * API version: 3 * Contact: support@fingerprint.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Fingerprint Pro Server API * * Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. * * API version: 3 * Contact: support@fingerprint.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Fingerprint Pro Server API * * Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. * * API version: 3 * Contact: support@fingerprint.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Fingerprint Pro Server API * * Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. * * API version: 3 * Contact: support@fingerprint.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Fingerprint Pro Server API * * Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. * * API version: 3 * Contact: support@fingerprint.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Fingerprint Pro Server API * * Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. * * API version: 3 * Contact: support@fingerprint.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Fingerprint Pro Server API * * Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. * * API version: 3 * Contact: support@fingerprint.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Fingerprint Pro Server API * * Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. * * API version: 3 * Contact: support@fingerprint.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Fingerprint Pro Server API * * Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. * * API version: 3 * Contact: support@fingerprint.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Fingerprint Pro Server API * * Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. * * API version: 3 * Contact: support@fingerprint.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Fingerprint Pro Server API * * Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. * * API version: 3 * Contact: support@fingerprint.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Fingerprint Pro Server API * * Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. * * API version: 3 * Contact: support@fingerprint.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes a oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types

type APIClient

type APIClient struct {
	FingerprintApi *FingerprintApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the Fingerprint Pro Server API API v3 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the swagger operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type BrowserDetails

type BrowserDetails struct {
	BrowserName         string `json:"browserName"`
	BrowserMajorVersion string `json:"browserMajorVersion"`
	BrowserFullVersion  string `json:"browserFullVersion"`
	Os                  string `json:"os"`
	OsVersion           string `json:"osVersion"`
	Device              string `json:"device"`
	UserAgent           string `json:"userAgent"`
	BotProbability      int32  `json:"botProbability,omitempty"`
}

type Confidence

type Confidence struct {
	// The confidence score is a floating-point number between 0 and 1 that represents the probability of accurate identification.
	Score float32 `json:"score"`
}

type Configuration

type Configuration struct {
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	HTTPClient    *http.Client
	// contains filtered or unexported fields
}

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

func (*Configuration) ChangeBasePath

func (c *Configuration) ChangeBasePath(path string)

ChangeBasePath Change base path to allow switching to mocks

func (*Configuration) ChangeRegion

func (c *Configuration) ChangeRegion(region Region)

ChangeRegion Changes region and sets basePath for it

func (*Configuration) GetBasePath

func (c *Configuration) GetBasePath() string

func (*Configuration) GetRegion

func (c *Configuration) GetRegion() Region

type FingerprintApiGetVisitsOpts

type FingerprintApiGetVisitsOpts struct {
	RequestId optional.String
	LinkedId  optional.String
	Limit     optional.Int32
	Before    optional.Int32
}

type FingerprintApiService

type FingerprintApiService service

func (*FingerprintApiService) GetVisits

func (a *FingerprintApiService) GetVisits(ctx context.Context, visitorId string, localVarOptionals *FingerprintApiGetVisitsOpts) (Response, *http.Response, error)

type GenericSwaggerError

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

GenericSwaggerError Provides access to the body, error and model on returned errors.

func (GenericSwaggerError) Body

func (e GenericSwaggerError) Body() []byte

Body returns the raw bytes of the response

func (GenericSwaggerError) Error

func (e GenericSwaggerError) Error() string

Error returns non-empty string if there was an error.

func (GenericSwaggerError) Model

func (e GenericSwaggerError) Model() interface{}

Model returns the unpacked model of the error

type IpLocation

type IpLocation struct {
	AccuracyRadius int32           `json:"accuracyRadius"`
	Latitude       float64         `json:"latitude"`
	Longitude      float64         `json:"longitude"`
	PostalCode     string          `json:"postalCode,omitempty"`
	Timezone       string          `json:"timezone"`
	City           *IpLocationCity `json:"city,omitempty"`
	Country        *Location       `json:"country"`
	Continent      *Location       `json:"continent"`
	Subdivisions   []Subdivision   `json:"subdivisions,omitempty"`
}

type IpLocationCity

type IpLocationCity struct {
	Name string `json:"name,omitempty"`
}

type Location

type Location struct {
	Code string `json:"code"`
	Name string `json:"name"`
}

type ManyRequestsResponse

type ManyRequestsResponse struct {
	// Error text.
	Error_ string `json:"error"`
}

type Model

type Model struct{}

type ModelMap

type ModelMap map[string]Model

type Region

type Region string
const (
	RegionEU   Region = "eu"
	RegionUS   Region = "us"
	RegionAsia Region = "asia"
)

type Response

type Response struct {
	VisitorId string  `json:"visitorId"`
	Visits    []Visit `json:"visits"`
	// When more results are available (e.g., you scanned 200 results using `limit` parameter, but a total of 600 results are available), a special `lastTimestamp` top-level attribute is added to the response. If you want to paginate the results further in the past, you should use the value of this attribute.
	LastTimestamp int64 `json:"lastTimestamp,omitempty"`
	// Visit's `requestId` of the last visit in the current page.
	PaginationKey string `json:"paginationKey,omitempty"`
}

Fields `lastTimestamp` and `paginationKey` added when `limit` or `before` parameter provided and there is more data to show

type StSeenAt

type StSeenAt struct {
	Global       time.Time `json:"global"`
	Subscription time.Time `json:"subscription"`
}

type Subdivision

type Subdivision struct {
	IsoCode string `json:"isoCode,omitempty"`
	Name    string `json:"name,omitempty"`
}

type Visit

type Visit struct {
	// Unique identifier of the user's identification request.
	RequestId      string          `json:"requestId"`
	BrowserDetails *BrowserDetails `json:"browserDetails"`
	// Flag if user used incognito session.
	Incognito  bool        `json:"incognito"`
	Ip         string      `json:"ip"`
	IpLocation *IpLocation `json:"ipLocation"`
	// Timestamp of the event with millisecond precision in Unix time.
	Timestamp int64 `json:"timestamp"`
	// Time expressed according to ISO 8601 in UTC format.
	Time time.Time `json:"time"`
	// Page URL from which identification request was sent.
	Url string `json:"url"`
	// A customer-provided value or an object that was sent with identification request.
	Tag ModelMap `json:"tag"`
	// A customer-provided id that was sent with identification request.
	LinkedId   string      `json:"linkedId,omitempty"`
	Confidence *Confidence `json:"confidence"`
	// Attribute represents if a visitor had been identified before.
	VisitorFound bool      `json:"visitorFound"`
	FirstSeenAt  *StSeenAt `json:"firstSeenAt"`
	LastSeenAt   *StSeenAt `json:"lastSeenAt"`
}

type WebhookVisit

type WebhookVisit struct {
	// Unique identifier of the user's identification request.
	RequestId      string          `json:"requestId"`
	BrowserDetails *BrowserDetails `json:"browserDetails"`
	// Flag if user used incognito session.
	Incognito  bool        `json:"incognito"`
	Ip         string      `json:"ip"`
	IpLocation *IpLocation `json:"ipLocation"`
	// Timestamp of the event with millisecond precision in Unix time.
	Timestamp int64 `json:"timestamp"`
	// Time expressed according to ISO 8601 in UTC format.
	Time time.Time `json:"time"`
	// Page URL from which identification request was sent.
	Url string `json:"url"`
	// A customer-provided value or an object that was sent with identification request.
	Tag ModelMap `json:"tag"`
	// A customer-provided id that was sent with identification request.
	LinkedId   string      `json:"linkedId,omitempty"`
	Confidence *Confidence `json:"confidence"`
	// Attribute represents if a visitor had been identified before.
	VisitorFound bool      `json:"visitorFound"`
	FirstSeenAt  *StSeenAt `json:"firstSeenAt"`
	LastSeenAt   *StSeenAt `json:"lastSeenAt"`
}

Jump to

Keyboard shortcuts

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