Documentation ¶
Index ¶
Constants ¶
const ( //HTTPMethodPost Post HTTP method HTTPMethodPost = "POST" //HTTPMethodGet Get HTTP method HTTPMethodGet = "GET" //HTTPMethodPut Put HTTP method HTTPMethodPut = "PUT" //HTTPMethodPatch Patch HTTP method HTTPMethodPatch = "PATCH" )
Variables ¶
var ( //ErrProfileNotFound profile was not found during activity retrieval for the provided token ErrProfileNotFound = errors.New("ProfileNotFound") //ErrFailure there was a failure during activity retrieval ErrFailure = errors.New("Failure") //ErrSharingFailure there was a failure when sharing ErrSharingFailure = errors.New("SharingFailure") )
Functions ¶
This section is empty.
Types ¶
type AmlAddress ¶ added in v1.1.0
AmlAddress Address for Anti Money Laundering (AML) purposes
type AmlProfile ¶ added in v1.1.0
type AmlProfile struct { GivenNames string `json:"given_names"` FamilyName string `json:"family_name"` Address AmlAddress `json:"address"` SSN string `json:"ssn"` }
AmlProfile User profile for Anti Money Laundering (AML) checks
type AmlResult ¶ added in v1.1.0
type AmlResult struct { OnFraudList bool `json:"on_fraud_list"` OnPEPList bool `json:"on_pep_list"` OnWatchList bool `json:"on_watch_list"` }
AmlResult Result of Anti Money Laundering (AML) check for a particular user
func GetAmlResultFromResponse ¶ added in v1.1.0
GetAmlResultFromResponse Parses AML result from response
type AttributeType ¶
type AttributeType int
AttributeType format of the attribute
const ( //AttributeTypeDate date format AttributeTypeDate AttributeType = 1 + iota //AttributeTypeText text format AttributeTypeText //AttributeTypeJpeg JPEG format AttributeTypeJpeg //AttributeTypePng PNG fornmat AttributeTypePng )
type AttributeValue ¶ added in v1.1.0
type AttributeValue struct { // Type represents the format of the piece of user data, whether it is a date, a piece of text or a picture // // Note the potential values for this variable are stored in constants with names beginning with // 'AttributeType'. These include: // yoti.AttributeTypeDate // yoti.AttributeTypeText // yoti.AttributeTypeJpeg // yoti.AttributeTypePng Type AttributeType Value []byte }
AttributeValue represents a small piece of information about a Yoti user such as a photo of the user or the user's date of birth.
func (AttributeValue) GetContentType ¶ added in v1.1.0
func (val AttributeValue) GetContentType() (result string)
GetContentType returns the MIME type of this piece of Yoti user information. For more information see: https://en.wikipedia.org/wiki/Media_type
type Client ¶ added in v1.1.0
type Client struct { // SdkID represents the SDK ID and NOT the App ID. This can be found in the integration section of your // application dashboard at https://www.yoti.com/dashboard/ SdkID string // Key should be the security key given to you by yoti (see: security keys section of // https://www.yoti.com/dashboard/) for more information about how to load your key from a file see: // https://github.com/getyoti/yoti-go-sdk/blob/master/README.md Key []byte }
Client represents a client that can communicate with yoti and return information about Yoti users.
func (*Client) GetUserProfile ¶ added in v1.1.0
func (client *Client) GetUserProfile(token string) (UserProfile, error)
GetUserProfile requests information about a Yoti user using the token generated by the Yoti login process. It returns the outcome of the request. If the request was successful it will include the users details, otherwise it will specify a reason the request failed.
func (*Client) PerformAmlCheck ¶ added in v1.1.0
func (client *Client) PerformAmlCheck(amlProfile AmlProfile) (AmlResult, error)
PerformAmlCheck performs an Anti Money Laundering Check (AML) for a particular user. Returns three boolean values: 'OnPEPList', 'OnWatchList' and 'OnFraudList'.
type Image ¶
Image format of the image and the image data
func (*Image) GetContentType ¶
GetContentType returns the MIME type of this piece of Yoti user information. For more information see: https://en.wikipedia.org/wiki/Media_type
type UserProfile ¶ added in v1.1.0
type UserProfile struct { // ID is a unique identifier Yoti assigns to your user, but only for your app // if the same user logs into your app again, you get the same id // if she/he logs into another application, Yoti will assign a different id for that app ID string // Selfie is a photograph of the user. This will be nil if not provided by Yoti Selfie *Image // GivenNames represents the user's given names. This will be an empty string if not provided by Yoti GivenNames string // Family represents the user's family name. This will be an empty string if not provided by Yoti FamilyName string // Full name represents the user's full name. This will be an empty string if not provided by Yoti FullName string // MobileNumber represents the user's mobile phone number. This will be an empty string if not provided by Yoti MobileNumber string // EmailAddress represents the user's email address. This will be an empty string if not provided by Yoti EmailAddress string // DateOfBirth represents the user's date of birth. This will be nil if not provided by Yoti DateOfBirth *time.Time // Address represents the user's address. This will be an empty string if not provided by Yoti Address string // Gender represents the user's gender. This will be an empty string if not provided by Yoti Gender string // Nationality represents the user's nationality. This will be an empty string if not provided by Yoti Nationality string // OtherAttributes is a map of any other information about the user provided by Yoti. The key will be the name // of the piece of information, and the keys associated value will be the piece of information itself. OtherAttributes map[string]AttributeValue }
UserProfile represents the details retrieved for a particular
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package attrpubapi_v1 is a generated protocol buffer package.
|
Package attrpubapi_v1 is a generated protocol buffer package. |
Package compubapi_v1 is a generated protocol buffer package.
|
Package compubapi_v1 is a generated protocol buffer package. |
examples
|
|