Documentation ¶
Index ¶
- type BackendType
- type Handler
- func (handler *Handler) CheckSecret(id string, secretKey string) error
- func (handler *Handler) CreateJob() (*Job, string, error)
- func (handler *Handler) GetJob(id string) (*Job, error)
- func (handler *Handler) GetJobStatus(jobID string) (*Job, error)
- func (handler *Handler) GetJobsStatus(jobIDs []string) ([]Job, error)
- func (handler *Handler) GetRunningJobs() ([]*Job, error)
- func (handler *Handler) UpdateK8s(id string, k8s string, conf string) error
- func (handler *Handler) UpdateStatus(id string, status api.JobStatusEnum, errorMsg string) error
- type Job
- type UploadFileType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackendType ¶
type BackendType string
BackendType The type of the database backend to use
const ( //SQLite Use an sqlite database in the backend SQLite BackendType = "SQLite" //Postgres User a postgres database in the backend Postgres BackendType = "Postgres" )
type Handler ¶
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) GetJobsStatus ¶
GetJobsStatus Returns the status of a list of jobs
func (*Handler) GetRunningJobs ¶ added in v0.2.0
func (*Handler) UpdateStatus ¶
UpdateStatus Updates the status of a job
type Job ¶
type Job struct { JobID string `gorm:"primaryKey"` Secret string K8sID string `gorm:"index"` Updated int64 `gorm:"autoUpdateTime"` // Use unix milli seconds as updating time Created int64 `gorm:"autoCreateTime"` // Use unix seconds as creating time Status string `gorm:"index"` DataBucket string FastaKey string ProdigalKey string RepliconKey string ResultKey string Error string ExpiryDate time.Time ConfString string }
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 Replicon UploadFileType = "replicons" //Prodigal Prodigal training file, see bakta documentation for further details Prodigal UploadFileType = "prodigal" )
Click to show internal directories.
Click to hide internal directories.