-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathfile_validation.go
More file actions
24 lines (19 loc) · 991 Bytes
/
file_validation.go
File metadata and controls
24 lines (19 loc) · 991 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package zerobouncego
import "io"
// BulkValidationSubmit - submit a file with emails for validation
func BulkValidationSubmit(csv_file CsvFile, remove_duplicate bool) (*FileValidationResponse, error) {
return GenericFileSubmit(csv_file, remove_duplicate, ENDPOINT_FILE_SEND)
}
// BulkValidationFileStatus - check the percentage of completion of a file uploaded
// for bulk validation
func BulkValidationFileStatus(file_id string) (*FileStatusResponse, error) {
return GenericFileStatusCheck(file_id, ENDPOINT_FILE_STATUS)
}
// BulkValidationResult - save a csv containing the results of the file with the given file ID
func BulkValidationResult(file_id string, file_writer io.Writer) error {
return GenericResultFetch(file_id, ENDPOINT_FILE_RESULT, file_writer)
}
// BulkValidationFileDelete - delete the result file associated with a file ID
func BulkValidationFileDelete(file_id string) (*FileValidationResponse, error) {
return GenericFileDelete(file_id, ENDPOINT_FILE_DELETE)
}