Versions in this module Expand all Collapse all v1 v1.0.0 Jan 24, 2025 Changes in this version + type BatchStatusJobs struct + CreatedAt string + Error string + JobID string + ResultURL string + Status string + type BatchStatusResponse struct + BatchID string + CreatedAt string + Error string + Jobs []BatchStatusJobs + Service string + Status string + type Client struct + AuthBaseURL string + AutoRefresh bool + BaseURL string + ClientID string + ClientSecret string + Expires int + ExpiresAt time.Time + HttpClient HttpClient + Interval int + Timeout int + Token string + func NewClient() Client + func (client *Client) Authenticate(ctx context.Context, clientID, clientSecret string, expires int) error + func (client *Client) CreateAndWaitBatch(ctx context.Context, service, filePath string, metadata []map[string]any, ...) (BatchStatusResponse, error) + func (client *Client) CreateAndWaitJob(ctx context.Context, ...) (JobResultResponse, error) + func (client *Client) GenerateSignedUrl(ctx context.Context, service, resource string, metadata any, ...) (SignedUrlResponse, error) + func (client *Client) GetBatchStatus(ctx context.Context, ID string) (BatchStatusResponse, error) + func (client *Client) GetJobResult(ctx context.Context, batchID, jobID string) (JobResultResponse, error) + func (client *Client) GetJobs(ctx context.Context, start, end string) ([]JobResultResponse, error) + func (client *Client) SendBatch(ctx context.Context, service, filePath string, metadata []map[string]any, ...) (CreatedResponse, error) + func (client *Client) SendBatchBase64(ctx context.Context, service, file string, metadata []map[string]any, ...) (CreatedResponse, error) + func (client *Client) SendJob(ctx context.Context, ...) (CreatedResponse, error) + func (client *Client) SendJobBase64(ctx context.Context, service, file, facematchFile, extraFile string, ...) (CreatedResponse, error) + func (client *Client) SendJobSingleStep(ctx context.Context, service, file, facematchFile, extraFile string, ...) (CreatedResponse, error) + func (client *Client) SetAuthBaseURL(url string) + func (client *Client) SetAutoRefresh(clientID, clientSecret string, expires int) + func (client *Client) SetBaseURL(url string) + func (client *Client) SetHttpClient(httpClient HttpClient) + func (client *Client) SetInterval(interval int) + func (client *Client) SetTimeout(timeout int) + func (client *Client) WaitForBatchDone(ctx context.Context, ID string, waitJobs bool) (BatchStatusResponse, error) + func (client *Client) WaitForJobDone(ctx context.Context, batchID, jobID string) (JobResultResponse, error) + func (client Client) UploadFile(ctx context.Context, url string, path string) error + func (client Client) UploadFileBase64(ctx context.Context, url string, data string) error + type CreatedResponse struct + Id string + StatusURL string + type GetJobsResponse struct + Jobs []JobResultResponse + NextPageToken string + type HttpClient interface + Do func(req *http.Request) (*http.Response, error) + type JobResultResponse struct + ClientData interface{} + CreatedAt string + Error string + Filename string + JobID string + ProcessTime string + Result Result + Service string + Status string + Validation interface{} + ValidationStatus string + type Response struct + type Result struct + Document interface{} + Quantity int + Time string + type SignedUrlResponse struct + Expires int + Id string + StatusURL string + URLs map[string]string