Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Scan(ctx context.Context, input *FileScanRequest, file *os.File) (*pangea.PangeaResponse[FileScanResult], error) RequestUploadURL(ctx context.Context, input *FileScanGetURLRequest, file *os.File) (*pangea.PangeaResponse[FileScanResult], error) // Base service methods pangea.BaseServicer }
type FileScan ¶
type FileScan struct {
pangea.BaseService
}
func (*FileScan) RequestUploadURL ¶ added in v3.3.0
func (e *FileScan) RequestUploadURL(ctx context.Context, input *FileScanGetURLRequest, file *os.File) (*pangea.PangeaResponse[FileScanResult], error)
func (*FileScan) Scan ¶
func (e *FileScan) Scan(ctx context.Context, input *FileScanRequest, file *os.File) (*pangea.PangeaResponse[FileScanResult], error)
@summary Scan
@description Scan a file for malicious content.
@operationId file_scan_post_v1_scan
@example
input := &file_scan.FileScanRequest{ Raw: true, Verbose: true, Provider: "crowdstrike", } // This should be your own file to scan file, err := os.Open("./path/to/file.pdf") if err != nil { log.Fatal("expected no error got: %v", err) } resp, err := client.Scan(ctx, input, file) if err != nil { log.Fatal(err.Error()) }
type FileScanData ¶
type FileScanFileParams ¶ added in v3.1.0
type FileScanFileParams struct { Size int `json:"size,omitempty"` CRC string `json:"crc32c,omitempty"` SHA256 string `json:"sha256,omitempty"` }
func GetUploadFileParams ¶ added in v3.3.0
func GetUploadFileParams(file *os.File) (*FileScanFileParams, error)
type FileScanFullRequest ¶ added in v3.1.0
type FileScanFullRequest struct { FileScanRequest FileScanFileParams }
type FileScanGetURLRequest ¶ added in v3.3.0
type FileScanGetURLRequest struct { TransferMethod pangea.TransferMethod Verbose bool Raw bool Provider string FileParams *FileScanFileParams }
type FileScanRequest ¶
type FileScanRequest struct { // Base request has ConfigID for multi-config projects pangea.BaseRequest pangea.TransferRequest Verbose bool `json:"verbose,omitempty"` Raw bool `json:"raw,omitempty"` Provider string `json:"provider,omitempty"` SourceURL string `json:"source_url,omitempty"` }
type FileScanResult ¶
type FileScanResult struct { Data FileScanData `json:"data"` Parameters interface{} `json:"parameters,omitempty"` RawData interface{} `json:"raw_data,omitempty"` }
type FileUploader ¶ added in v3.3.0
type FileUploader struct {
// contains filtered or unexported fields
}
func NewFileUploader ¶ added in v3.3.0
func NewFileUploader() FileUploader
func (*FileUploader) UploadFile ¶ added in v3.3.0
func (fu *FileUploader) UploadFile(ctx context.Context, url string, tm pangea.TransferMethod, fd pangea.FileData) error
Click to show internal directories.
Click to hide internal directories.