Documentation ¶
Index ¶
- Constants
- type BackendType
- type Handler
- func (handler *Handler) CheckSecret(id string, secretKey string) error
- func (handler *Handler) CreateJob(repliconTypeAPI api.RepliconTableType) (*Job, string, error)
- func (handler *Handler) GetJob(id string) (*Job, error)
- func (handler *Handler) GetJobStatus(jobID string) (*Job, error)
- func (handler *Handler) GetJobs(jobIDs []*api.JobAuth) ([]Job, error)
- func (handler *Handler) UpdateK8s(id string, k8s string, conf string) error
- func (handler *Handler) UpdateStatus(id string, status api.JobStatusEnum, errorMsg string, isDeleted bool) error
- type Job
- type UploadFileType
Constants ¶
View Source
const COLLECTIONNAME = "jobs"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct { DB *mongo.Client Collection *mongo.Collection BaseKey string UserDataBucket string DBBucket string ExpiryTime int64 }
Handler Wraps the database with convinence methods
func InitDatabaseHandler ¶
InitDatabaseHandler Initializes the database to store the Job
func (*Handler) CheckSecret ¶
CheckSecret Compares the provided secret/JobID with a job in the database
func (*Handler) GetJobStatus ¶
GetJobStatus Returns the status of an individual job
func (*Handler) UpdateStatus ¶
func (handler *Handler) UpdateStatus(id string, status api.JobStatusEnum, errorMsg string, isDeleted bool) error
UpdateStatus Updates the status of a job
type Job ¶
type Job struct { JobID string Secret string K8sID string Updated primitive.Timestamp Created primitive.Timestamp Status string DataBucket string FastaKey string ProdigalKey string RepliconKey string ResultKey string Error string ExpiryDate primitive.Timestamp ConfString string IsDeleted bool // contains filtered or unexported fields }
Job The database model for a bakta job
type UploadFileType ¶
type UploadFileType string
UploadFileType type of file to upload
const ( //Fasta fasta file Fasta UploadFileType = "fasta" //Replicon replicon file as tsv, see bakta documentation for further details RepliconCSV UploadFileType = "repliconcsv" RepliconTSV UploadFileType = "replicontsv" //Prodigal Prodigal training file, see bakta documentation for further details Prodigal UploadFileType = "prodigal" )
Click to show internal directories.
Click to hide internal directories.