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 ContentAccessLog

type ContentAccessLog struct {
	Id uint `db:"id"`

	ContentId uint `db:"content_id"`

	AccessedAt time.Time `db:"accessed_at"`
	AccessType string    `db:"access_type"`
	IpAddress  string    `db:"ip_address"`
}

type ContentModel

type ContentModel struct {
	Id uint `db:"id"`

	ScanId uint `db:"scan_id"`

	HashedBody     string    `db:"hashed_body"`
	Source         string    `db:"source"`
	FileSize       int64     `db:"file_size"`
	FileType       string    `db:"file_type"`
	StorageType    string    `db:"storage_type"`
	LastAccessedAt time.Time `db:"last_accessed_at"`
	AccessCount    int64     `db:"access_count"`

	// Relationships
	Tags     []ContentTagsModel  `db:"-"`
	Storage  ContentStorageModel `db:"-"`
	Access   []ContentAccessLog  `db:"-"`
	Findings []FindingModel      `db:"-"`

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

type ContentStorageModel

type ContentStorageModel struct {
	Id uint `db:"id"`

	ContentId       uint   `db:"content_id"`
	BucketName      string `db:"bucket_name"`
	ObjectKey       string `db:"object_key"`
	Location        string `db:"location"`
	StorageEndpoint string `db:"storage_endpoint"`
	Encryption      string `db:"encryption"`
}

type ContentTagsModel

type ContentTagsModel struct {
	Id uint `db:"id"`

	ContentId uint `db:"content_id"`

	Tag string `db:"tag"`
}

type FindingModel

type FindingModel struct {
	Id uint `db:"id"`

	ScanId uint `db:"scan_id"`

	RegexName        string `db:"regex_name"`
	RegexDescription string `db:"regex_description"`

	Match  string `db:"match"`
	Source string `db:"source"`
	Line   int    `db:"line"`

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

Jump to

Keyboard shortcuts

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