Documentation
¶
Index ¶
- type CheckRequest
- type CheckResponse
- type Data
- type Device
- type EnrollRequest
- type Fazpass
- func (f *Fazpass) Check(email string, phone string, encData string) (*Data, error)
- func (f *Fazpass) EnrollDevice(email string, phone string, encData string) (*Data, error)
- func (f *Fazpass) RemoveDevice(fazpassId string, encData string) (*Data, error)
- func (f *Fazpass) ValidateDevice(fazpassId string, encData string) (*Data, error)
- type FazpassInterface
- type Flow
- func (flow *Flow) ExtractingData(privKey *rsa.PrivateKey, response *http.Response, data *Data) (*Data, error)
- func (flow *Flow) SendingData(baseUrl string, wrappedMessage []byte, merchantKey string) (*http.Response, error)
- func (flow *Flow) WrappingData(pubKey *rsa.PublicKey, model interface{}) ([]byte, error)
- type FlowInterface
- type FlowMock
- func (fm *FlowMock) ExtractingData(privKey *rsa.PrivateKey, response *http.Response, data *Data) (*Data, error)
- func (fm *FlowMock) SendingData(baseUrl string, wrappedMessage []byte, merchantKey string) (*http.Response, error)
- func (fm *FlowMock) WrappingData(pubKey *rsa.PublicKey, model interface{}) ([]byte, error)
- type Geolocation
- type RemoveRequest
- type Transmission
- type ValidateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckRequest ¶
type CheckResponse ¶
type Device ¶
type Device struct {
Score float64 `json:"score"`
Platform string `json:"platform"`
FazpassId string `json:"fazpass_id"`
IsRooted bool `json:"is_rooted"`
IsEmulator bool `json:"is_emulator"`
IsGpsSpoof bool `json:"is_gps_spoof"`
IsAppTemper bool `json:"is_app_temper"`
IsVpn bool `json:"is_vpn"`
IsScreenSharing bool `json:"is_share_screen"`
IsDebuging bool `json:"is_debuging"`
Name string `json:"name"`
SimSerial []string `json:"sim_serial"`
Geolocation Geolocation `json:"geolocation"`
CPU string `json:"cpu"`
Timezone string `json:"timezone"`
}
type EnrollRequest ¶
type Fazpass ¶
type Fazpass struct {
PrivateKey *rsa.PrivateKey
PublicKey *rsa.PublicKey
MerchantKey string
BaseUrl string
Flow FlowInterface
}
func (*Fazpass) EnrollDevice ¶
func (*Fazpass) RemoveDevice ¶
type FazpassInterface ¶
type FazpassInterface interface {
Check(email string, phone string, encData string) (*Data, error)
EnrollDevice(email string, phone string, encData string) (*Data, error)
ValidateDevice(fazpassId string, encData string) (*Data, error)
RemoveDevice(fazpassId string, encData string) (*Data, error)
}
func Initialize ¶
func Initialize(flow FlowInterface, privatePath string, publicPath string, merchantKey string, url string) (FazpassInterface, error)
type Flow ¶
type Flow struct {
// contains filtered or unexported fields
}
func (*Flow) ExtractingData ¶
func (*Flow) SendingData ¶
type FlowInterface ¶
type FlowInterface interface {
WrappingData(pubKey *rsa.PublicKey, model interface{}) ([]byte, error)
SendingData(baseUrl string, wrappedMessage []byte, merchantKey string) (*http.Response, error)
ExtractingData(privKey *rsa.PrivateKey, response *http.Response, data *Data) (*Data, error)
}
func Default ¶
func Default() FlowInterface
func Init ¶
func Init(f *Flow) FlowInterface
type FlowMock ¶
func (*FlowMock) ExtractingData ¶
func (fm *FlowMock) ExtractingData(privKey *rsa.PrivateKey, response *http.Response, data *Data) (*Data, error)
extractingData implements FlowInterface
type Geolocation ¶
type RemoveRequest ¶
type Transmission ¶
type Transmission struct {
Message string `json:"message"`
}
type ValidateRequest ¶
Click to show internal directories.
Click to hide internal directories.