Documentation
¶
Index ¶
- Variables
- type Client
- type Enum
- type ImageService
- func (imageService *ImageService) ImageFileToBase64(filePath string) string
- func (imageService *ImageService) UploadIdentity(imageUpload ImageUpload) (*ImageUploadResponse, *http.Response, error)
- func (imageService *ImageService) UploadProfile(imageUpload ImageUpload) (*ImageUploadResponse, *http.Response, error)
- type ImageUpload
- type ImageUploadResponse
- type User
- type UserResponse
- type UserService
- type UserVerificationResponse
- type VerifyUser
Constants ¶
This section is empty.
Variables ¶
var ImageType = &imageTypeList{
Identity: 0,
Profile: 1,
}
ImageType types of image requests.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
User *UserService
Image *ImageService
// contains filtered or unexported fields
}
Client is a Verification Layer client for making requests.
func NewImageService ¶
NewImageService returns a new UserService.
func NewUserService ¶
NewUserService returns a new UserService.
type Enum ¶
type Enum int
Enum a kind of alias for int values.
func (Enum) ValueOfImageType ¶
ValueOfImageType returns value for ImageType.
type ImageService ¶
type ImageService struct {
// contains filtered or unexported fields
}
ImageService provides an interface for image endpoints.
func (*ImageService) ImageFileToBase64 ¶
func (imageService *ImageService) ImageFileToBase64(filePath string) string
ImageFileToBase64 read image file and creates base64 encoded string.
func (*ImageService) UploadIdentity ¶
func (imageService *ImageService) UploadIdentity(imageUpload ImageUpload) (*ImageUploadResponse, *http.Response, error)
UploadIdentity uploads identity image of user. Takes user id and image path as parameters. Returns image upload response, http response and error.
func (*ImageService) UploadProfile ¶
func (imageService *ImageService) UploadProfile(imageUpload ImageUpload) (*ImageUploadResponse, *http.Response, error)
UploadProfile uploads profile image of user. Takes user id and image path as parameters. Returns image upload response, http response and error.
type ImageUpload ¶
ImageUpload is request model for image upload.
type ImageUploadResponse ¶
type ImageUploadResponse struct {
Code int `json:"code"`
Message string `json:"message"`
Type string `json:"type"`
}
ImageUploadResponse is response model for image upload.
type User ¶
type User struct {
Country string `json:"country"`
DateOfBirth string `json:"dateOfBirth"`
Name string `json:"name"`
Surname string `json:"surname"`
}
User is request body for sending user data.
type UserResponse ¶
type UserResponse struct {
Code int `json:"code"`
Message string `json:"message"`
Type string `json:"type"`
UserID string `json:"userId,omitempty"`
}
UserResponse is the response model of send user data request.
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
UserService provides an interface for user endpoints.
func (*UserService) SendUserData ¶
func (s *UserService) SendUserData(user User) (*UserResponse, *http.Response, error)
SendUserData sends user data using with Client. Takes user as a parameter. Returns user response, http response and error.
func (*UserService) VerifyUser ¶
func (s *UserService) VerifyUser(verifyUser VerifyUser) (*UserVerificationResponse, *http.Response, error)
VerifyUser verifies user with given user id and language. func (client *Client) VerifyUser(verifyUser VerifyUser) (*UserVerificationResponse, *http.Response, error) {
type UserVerificationResponse ¶
type UserVerificationResponse struct {
Code int `json:"code"`
VerificationRate int `json:"verificationRate"`
}
UserVerificationResponse is response model of user verification request.
type VerifyUser ¶
VerifyUser is request model of user verification.