Back to

Package file

Latest Go to latest

The highest tagged major version is .

Published: Oct 15, 2020 | License: Apache-2.0 | Module:


func Actions

func Actions(c echo.Context) error

Actions over a file. Rescan or Download.

func DeleteComment

func DeleteComment(c echo.Context) error

DeleteComment deletes a comment.

func DeleteFile

func DeleteFile(c echo.Context) error

DeleteFile deletes a specific file

func DeleteFiles

func DeleteFiles(c echo.Context) error

DeleteFiles delete all files

func Download

func Download(c echo.Context) error

Download downloads a file.

func DumpRequest

func DumpRequest(req *http.Request)

DumpRequest dumps the headers.

func GetFile

func GetFile(c echo.Context) error

GetFile returns file informations.

func GetFiles

func GetFiles(c echo.Context) error

GetFiles returns list of files.

func PostComment

func PostComment(c echo.Context) error

PostComment creates a new comment.

func PostFiles

func PostFiles(c echo.Context) error

PostFiles creates a new file

func PutFile

func PutFile(c echo.Context) error

PutFile updates a specific file

func PutFiles

func PutFiles(c echo.Context) error

PutFiles bulk updates of files

func ScanFileFromObjectStorage

func ScanFileFromObjectStorage(c echo.Context) error

ScanFileFromObjectStorage scans which was pushed to object storage directly.

type AV

type AV struct {
	Vendor string `json:"vendor,omitempty"`

AV vendor

type Comment

type Comment struct {
	Timestamp *time.Time `json:"timestamp,omitempty"`
	Username  string     `json:"username,omitempty"`
	Body      string     `json:"body,omitempty"`
	ID        string     `json:"id,omitempty"`

type File

type File struct {
	Md5             string                 `json:"md5,omitempty"`
	Sha1            string                 `json:"sha1,omitempty"`
	Sha256          string                 `json:"sha256,omitempty"`
	Sha512          string                 `json:"sha512,omitempty"`
	Ssdeep          string                 `json:"ssdeep,omitempty"`
	Crc32           string                 `json:"crc32,omitempty"`
	Magic           string                 `json:"magic,omitempty"`
	Size            int64                  `json:"size,omitempty"`
	Exif            map[string]string      `json:"exif,omitempty"`
	TriD            []string               `json:"trid,omitempty"`
	Tags            map[string]interface{} `json:"tags,omitempty"`
	Packer          []string               `json:"packer,omitempty"`
	FirstSubmission *time.Time             `json:"first_submission,omitempty"`
	LastSubmission  *time.Time             `json:"last_submission,omitempty"`
	LastScanned     *time.Time             `json:"last_scanned,omitempty"`
	Submissions     []submission           `json:"submissions,omitempty"`
	Strings         []stringStruct         `json:"strings,omitempty"`
	MultiAV         map[string]interface{} `json:"multiav,omitempty"`
	Status          int                    `json:"status,omitempty"`
	Comments        []Comment              `json:"comments,omitempty"`
	PE              *peparser.File         `json:"pe,omitempty"`
	Type            string                 `json:"type,omitempty"`

File represent a sample

func GetAllFiles

func GetAllFiles(fields []string) ([]File, error)

GetAllFiles return all files (optional: selecting fields)

func GetFileByFields

func GetFileByFields(fields []string, sha256 string) (File, error)

GetFileByFields return user by username(optional: selecting fields)

func GetFileBySHA256

func GetFileBySHA256(sha256 string) (File, error)

GetFileBySHA256 return user document

func (*File) Save

func (file *File) Save() error

Save creates a new file

type Response

type Response struct {
	Sha256      string `json:"sha256,omitempty"`
	Message     string `json:"message,omitempty"`
	Description string `json:"description,omitempty"`
	Filename    string `json:"filename,omitempty"`

Response JSON

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier