entities

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobModel

type JobModel struct {
	ID   string
	Type string

	URL       string
	UserAgent string

	ScanID uint

	Status      JobStatus
	CreatedAt   time.Time
	UpdatedAt   time.Time
	CompletedAt time.Time
}

JobModel represents a task to be processed by the TaskScheduler

type JobStatus

type JobStatus int

JobStatus indicates the current status of a Job

const (
	Queued JobStatus = iota
	Processing
	Completed
	Failed
)

type ScanModel

type ScanModel struct {
	Id int `db:"id"`

	Url        string `db:"url"`
	Title      string `db:"title"`
	StatusCode int    `db:"status_code"`

	Status ScanStatus `db:"status"`

	Sha256 string `db:"sha256"`
	Sha1   string `db:"sha1"`
	Md5    string `db:"md5"`

	CreatedAt time.Time  `db:"created_at"`
	UpdatedAt time.Time  `db:"updated_at"`
	DeletedAt *time.Time `db:"deleted_at"`
}

type ScanStatus

type ScanStatus string
const (
	ScanStatusArchived ScanStatus = "archived"
	ScanStatusComplete ScanStatus = "complete"
	ScanStatusFailed   ScanStatus = "failed"
	ScanStatusPending  ScanStatus = "pending"
)

Jump to

Keyboard shortcuts

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