models

package
v0.0.0-...-7bf970c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package models contains the models required by the file uploader service

Index

Constants

View Source
const (
	//FileUploadStatusUploaded indicates that the file has been uploaded
	FileUploadStatusUploaded = "UPLOADED"
	//FileUploadStatusValidatingError indicates that the validation occurred due to some error
	FileUploadStatusValidatingError = "VALIDATING_ERROR"
	//FileUploadStatusValidated indicates that the validation process is completed. The errors will be available in the file upoload error records for the file
	FileUploadStatusValidated = "VALIDATED"
)
View Source
const (
	//FileUploadTypeCSV indicates that the uploaded file's type is csv
	FileUploadTypeCSV = "CSV"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FileDataset

type FileDataset struct {
	//Info has the info about the dataset
	Info FileUpload
	//Errors has the list errors of the dataset upload
	Errors []FileUploadError
}

FileDataset has the info about an uploaded datatset and its errors

type FileUpload

type FileUpload struct {
	gorm.Model
	//Name of the upload
	Name string
	//UserID is the id of the user with whom the file is associated with
	UserID uint
	//Location is the location where the file is stored
	Location string
	//Type is the type of file uploaded
	Type string
	//Status is the status of the uploaded file
	Status string
}

FileUpload represents the file uploads in the system

type FileUploadError

type FileUploadError struct {
	gorm.Model
	//FileUploadID is the id of the upload
	FileUploadID uint
	//Error is the error associated with the file upload
	Error string
}

FileUploadError stores the errors happened while uploading a file

Directories

Path Synopsis
Package db contains the db interactions for the models Package db contains the db interactions for the models
Package db contains the db interactions for the models Package db contains the db interactions for the models

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL