sanitize

package
v3.8.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CDR

type CDR struct {
	FileAttachmentsRemoved     int `json:"file_attachments_removed"`
	InteractiveContentsRemoved int `json:"interactive_contents_removed"`
}

CDR represents the CDR PangeaResponseResult.

type Client

type Client interface {
	// Sanitize.
	Sanitize(ctx context.Context, input *SanitizeRequest, file io.ReadSeeker) (*pangea.PangeaResponse[SanitizeResult], error)

	// Sanitize via presigned URL.
	RequestUploadURL(ctx context.Context, input *SanitizeRequest) (*pangea.PangeaResponse[SanitizeResult], error)

	// Base service methods
	pangea.BaseServicer
}

func New

func New(cfg *pangea.Config) Client

type DefangData

type DefangData struct {
	ExternalURLsCount    int    `json:"external_urls_count"`
	ExternalDomainsCount int    `json:"external_domains_count"`
	DefangedCount        int    `json:"defanged_count"`
	URLIntelSummary      string `json:"url_intel_summary"`
	DomainIntelSummary   string `json:"domain_intel_summary"`
}

DefangData represents the DefangData PangeaResponseResult.

type RedactData

type RedactData struct {
	RedactionCount int            `json:"redaction_count"`
	SummaryCounts  map[string]int `json:"summary_counts"`
}

RedactData represents the RedactData PangeaResponseResult.

type SanitizeContent

type SanitizeContent struct {
	URLIntel            *bool  `json:"url_intel,omitempty"`
	URLIntelProvider    string `json:"url_intel_provider,omitempty"`
	DomainIntel         *bool  `json:"domain_intel,omitempty"`
	DomainIntelProvider string `json:"domain_intel_provider,omitempty"`
	Defang              *bool  `json:"defang,omitempty"`
	DefangThreshold     *int   `json:"defang_threshold,omitempty"`
	Redact              *bool  `json:"redact,omitempty"`
	RemoveAttachments   *bool  `json:"remove_attachments,omitempty"`
	RemoveInteractive   *bool  `json:"remove_interactive,omitempty"`
}

SanitizeContent represents the SanitizeContent API request model.

type SanitizeData

type SanitizeData struct {
	Defang        *DefangData `json:"defang,omitempty"`
	Redact        *RedactData `json:"redact,omitempty"`
	MaliciousFile bool        `json:"malicious_file"`
	CDR           *CDR        `json:"cdr,omitempty"`
}

SanitizeData represents the SanitizeData PangeaResponseResult.

type SanitizeFile

type SanitizeFile struct {
	ScanProvider string `json:"scan_provider,omitempty"`
	CDRProvider  string `json:"cdr_provider,omitempty"`
}

SanitizeFile represents the SanitizeFile API request model.

type SanitizeRequest

type SanitizeRequest struct {
	pangea.BaseRequest
	pangea.TransferRequest

	SourceURL        string               `json:"source_url,omitempty"`
	ShareID          string               `json:"share_id,omitempty"`
	File             *SanitizeFile        `json:"file,omitempty"`
	Content          *SanitizeContent     `json:"content,omitempty"`
	ShareOutput      *SanitizeShareOutput `json:"share_output,omitempty"`
	Size             *int                 `json:"size,omitempty"`
	CRC32C           string               `json:"crc32c,omitempty"`
	SHA256           string               `json:"sha256,omitempty"`
	UploadedFileName string               `json:"uploaded_file_name,omitempty"`
}

SanitizeRequest represents the SanitizeRequest API request model.

type SanitizeResult

type SanitizeResult struct {
	DestURL     *string                `json:"dest_url,omitempty"`
	DestShareID *string                `json:"dest_share_id,omitempty"`
	Data        SanitizeData           `json:"data"`
	Parameters  map[string]interface{} `json:"parameters,omitempty"`
}

SanitizeResult represents the SanitizeResult PangeaResponseResult.

type SanitizeShareOutput

type SanitizeShareOutput struct {
	Enabled      *bool  `json:"enabled,omitempty"`
	OutputFolder string `json:"output_folder,omitempty"`
}

SanitizeShareOutput represents the SanitizeShareOutput API request model.

Jump to

Keyboard shortcuts

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