submissions

package
v0.0.0-...-8e63a93 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: BSD-2-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Submission

type Submission struct {
	UUID     string `yaml:"uuid"     json:"uuid"`
	MD5      string `yaml:"md5"      json:"md5"`
	SHA1     string `yaml:"sha1"     json:"sha1"`
	SHA256   string `yaml:"sha256"   json:"sha256"`
	SHA512   string `yaml:"sha512"   json:"sha512"`
	TLP      string `yaml:"tlp"      json:"tlp"`
	Size     int64  `yaml:"size"     json:"size"`
	Filename string `yaml:"filename" json:"filename"`
	TempPath string `json:"-" yaml:"-"`
}

func Create

func Create(sampleFilename string, sampleTLP string, queueDir string, tempDir string) (*Submission, error)

func Read

func Read(queuePath string) (*Submission, error)

func (*Submission) Dequeue

func (s *Submission) Dequeue(queueRoot string) error

func (*Submission) Enqueue

func (s *Submission) Enqueue(queueRoot string, tempRoot string) error

func (*Submission) GetJSON

func (s *Submission) GetJSON() ([]byte, error)

func (*Submission) GetYAML

func (s *Submission) GetYAML() ([]byte, error)

func (*Submission) Hash

func (s *Submission) Hash(tempRoot string) error

Calculate the various basic hashes of the file

func (*Submission) Lock

func (s *Submission) Lock(queueRoot string) error

func (*Submission) QueuedPath

func (s *Submission) QueuedPath(queueRoot string) string

func (*Submission) QueuedSamplePath

func (s *Submission) QueuedSamplePath(queueRoot string) string

func (*Submission) Receive

func (s *Submission) Receive(file io.Reader, tempRoot string) error

func (*Submission) SaveManifest

func (s *Submission) SaveManifest(dir string) error

func (*Submission) TempDirPath

func (s *Submission) TempDirPath(tempRoot string) string

func (*Submission) TempSamplePath

func (s *Submission) TempSamplePath(tempRoot string) string

func (*Submission) Unlock

func (s *Submission) Unlock(queueRoot string) error

Jump to

Keyboard shortcuts

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