Documentation ¶
Index ¶
- type Config
- type S3Storage
- func (s *S3Storage) GetLog(date, scanID, checkID string) ([]byte, error)
- func (s *S3Storage) GetReport(date, scanID, checkID string) ([]byte, error)
- func (s *S3Storage) SaveLogs(scanID, checkID string, startedAt time.Time, logs []byte) (link string, err error)
- func (s *S3Storage) SaveReports(scanID, checkID string, startedAt time.Time, report []byte, vulnerable bool) (link string, err error)
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { BucketVulnerableReports string BucketReports string BucketLogs string Region string LinkBase string Endpoint string PathStyle bool }
Config represents the configuration options for S3Storage objects
type S3Storage ¶
type S3Storage struct { Conf Config // contains filtered or unexported fields }
S3Storage implements the Storage interface storing the results in S3.
func NewS3Storage ¶
NewS3Storage creates a S3Storage for a specified bucket.
func (*S3Storage) GetLog ¶
GetLog downloads from S3 and returns the report that corresponds to the input params.
func (*S3Storage) GetReport ¶
GetReport downloads from S3 and returns the report that corresponds to the input params.
type Storage ¶
type Storage interface { SaveReports(scanID, checkID string, startedAt time.Time, report []byte, vulnerable bool) (link string, err error) SaveLogs(scanID, checkID string, startedAt time.Time, logs []byte) (link string, err error) GetReport(date, scanID, checkID string) ([]byte, error) GetLog(date, scanID, checkID string) ([]byte, error) }
Storage is an interface of a type that can save a result.
Click to show internal directories.
Click to hide internal directories.