handlers

package
v0.0.0-...-7a94dbe Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

AccessControl.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearProcessing

func ClearProcessing(sha256 string)

func ConvertToVirusTotalReport

func ConvertToVirusTotalReport(vtFile *vt.Object) (*db.VirusTotalReport, error)

func IsProcessing

func IsProcessing(sha256 string) bool

func RegisterRoutes

func RegisterRoutes(router *gin.Engine, db *sql.DB)

func SetProcessing

func SetProcessing(sha256 string, status bool)

Types

type AnalysisResponse

type AnalysisResponse struct {
	Data struct {
		ID         string            `json:"id"`
		Type       string            `json:"type"`
		Links      map[string]string `json:"links"`
		Attributes struct {
			Stats struct {
				Malicious        int `json:"malicious"`
				Suspicious       int `json:"suspicious"`
				Undetected       int `json:"undetected"`
				Harmless         int `json:"harmless"`
				Timeout          int `json:"timeout"`
				ConfirmedTimeout int `json:"confirmed-timeout"`
				Failure          int `json:"failure"`
				TypeUnsupported  int `json:"type-unsupported"`
			} `json:"stats"`
			Results map[string]struct {
				Method        string      `json:"method"`
				EngineName    string      `json:"engine_name"`
				EngineVersion string      `json:"engine_version"`
				EngineUpdate  string      `json:"engine_update"`
				Category      string      `json:"category"`
				Result        interface{} `json:"result"`
			} `json:"results"`
			Date   int    `json:"date"`
			Status string `json:"status"`
		} `json:"attributes"`
	} `json:"data"`
	Meta struct {
		FileInfo struct {
			SHA256 string `json:"sha256"`
			MD5    string `json:"md5"`
			SHA1   string `json:"sha1"`
			Size   int    `json:"size"`
		} `json:"file_info"`
	} `json:"meta"`
}

Jump to

Keyboard shortcuts

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