controllers

package
v0.0.0-...-f03aceb Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobController

type JobController struct {
	// contains filtered or unexported fields
}

JobController is a struct that contains the configuration and the job model

func NewJobController

func NewJobController(config config.Config, jobID int, userID int) (*JobController, error)

constructor for JobController

func (*JobController) MarkAsFinished

func (c *JobController) MarkAsFinished(ctx context.Context, model models.DBModel, jobID int)

MarkAsFinished marks the job as finished

func (*JobController) Run

func (c *JobController) Run(ctx context.Context, model models.DBModel) error

Run function handles the job and performs the scan

func (*JobController) RunReporter

func (c *JobController) RunReporter(ctx context.Context, model *models.DBModel) error

func (*JobController) UpdateJobStatus

func (c *JobController) UpdateJobStatus(ctx context.Context, model models.DBModel, jobStatus jobstatus.JobStatus)

UpdateJobStatus updates the status of the job

Jump to

Keyboard shortcuts

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