Documentation
¶
Index ¶
- Variables
- func Bool(b bool) *bool
- func Byte(b byte) *byte
- func Bytes(b []byte) *[]byte
- func Complex64(c complex64) *complex64
- func Complex128(c complex128) *complex128
- func Float32(f float32) *float32
- func Float64(f float64) *float64
- func Int(i int) *int
- func Int8(i int8) *int8
- func Int16(i int16) *int16
- func Int32(i int32) *int32
- func Int64(i int64) *int64
- func MustParseDate(date string) time.Time
- func MustParseDateTime(datetime string) time.Time
- func Rune(r rune) *rune
- func String(s string) *string
- func Time(t time.Time) *time.Time
- func UUID(u uuid.UUID) *uuid.UUID
- func Uint(u uint) *uint
- func Uint8(u uint8) *uint8
- func Uint16(u uint16) *uint16
- func Uint32(u uint32) *uint32
- func Uint64(u uint64) *uint64
- func Uintptr(u uintptr) *uintptr
- type APIError
- func (a *APIError) GetCode() string
- func (a *APIError) GetDetails() map[string]string
- func (a *APIError) GetExtraProperties() map[string]interface{}
- func (a *APIError) GetMessage() string
- func (a *APIError) MarshalJSON() ([]byte, error)
- func (a *APIError) SetCode(code string)
- func (a *APIError) SetDetails(details map[string]string)
- func (a *APIError) SetMessage(message string)
- func (a *APIError) String() string
- func (a *APIError) UnmarshalJSON(data []byte) error
- type BadRequestError
- type ContentTooLargeError
- type ErrorResponse
- func (e *ErrorResponse) GetError() *APIError
- func (e *ErrorResponse) GetExtraProperties() map[string]interface{}
- func (e *ErrorResponse) MarshalJSON() ([]byte, error)
- func (e *ErrorResponse) SetError(error_ *APIError)
- func (e *ErrorResponse) String() string
- func (e *ErrorResponse) UnmarshalJSON(data []byte) error
- type FileParam
- type FileParamOption
- type ForbiddenError
- type GetScanRequest
- type HealthResponse
- func (h *HealthResponse) GetExtraProperties() map[string]interface{}
- func (h *HealthResponse) GetStatus() HealthResponseStatus
- func (h *HealthResponse) MarshalJSON() ([]byte, error)
- func (h *HealthResponse) SetStatus(status HealthResponseStatus)
- func (h *HealthResponse) String() string
- func (h *HealthResponse) UnmarshalJSON(data []byte) error
- type HealthResponseStatus
- type InternalServerError
- type ListScansRequest
- func (l *ListScansRequest) SetCursor(cursor *string)
- func (l *ListScansRequest) SetDetectionRule(detectionRule *string)
- func (l *ListScansRequest) SetEngineSignature(engineSignature *string)
- func (l *ListScansRequest) SetFailure(failure *ListScansRequestFailure)
- func (l *ListScansRequest) SetFilename(filename *string)
- func (l *ListScansRequest) SetLimit(limit *int)
- func (l *ListScansRequest) SetScanID(scanID *string)
- func (l *ListScansRequest) SetSourceType(sourceType *ListScansRequestSourceType)
- func (l *ListScansRequest) SetStorageIntegrationID(storageIntegrationID *string)
- func (l *ListScansRequest) SetVerdict(verdict *string)
- type ListScansRequestFailure
- type ListScansRequestSourceType
- type NotFoundError
- type Scan
- func (s *Scan) GetCreatedAt() time.Time
- func (s *Scan) GetDetections() []string
- func (s *Scan) GetDurationMs() float64
- func (s *Scan) GetExtraProperties() map[string]interface{}
- func (s *Scan) GetFailure() *ScanFailure
- func (s *Scan) GetFilename() string
- func (s *Scan) GetID() string
- func (s *Scan) GetSha256() string
- func (s *Scan) GetSizeBytes() int64
- func (s *Scan) GetSource() *ScanSource
- func (s *Scan) GetStatus() ScanStatus
- func (s *Scan) GetTimings() *ScanTimings
- func (s *Scan) GetTypeAnalysis() *TypeAnalysis
- func (s *Scan) GetVerdict() ScanVerdict
- func (s *Scan) MarshalJSON() ([]byte, error)
- func (s *Scan) SetCreatedAt(createdAt time.Time)
- func (s *Scan) SetDetections(detections []string)
- func (s *Scan) SetDurationMs(durationMs float64)
- func (s *Scan) SetFailure(failure *ScanFailure)
- func (s *Scan) SetFilename(filename string)
- func (s *Scan) SetID(id string)
- func (s *Scan) SetSha256(sha256 string)
- func (s *Scan) SetSizeBytes(sizeBytes int64)
- func (s *Scan) SetSource(source *ScanSource)
- func (s *Scan) SetStatus(status ScanStatus)
- func (s *Scan) SetTimings(timings *ScanTimings)
- func (s *Scan) SetTypeAnalysis(typeAnalysis *TypeAnalysis)
- func (s *Scan) SetVerdict(verdict ScanVerdict)
- func (s *Scan) String() string
- func (s *Scan) UnmarshalJSON(data []byte) error
- type ScanBatchResponse
- func (s *ScanBatchResponse) GetExtraProperties() map[string]interface{}
- func (s *ScanBatchResponse) GetResults() []*ScanBatchResult
- func (s *ScanBatchResponse) MarshalJSON() ([]byte, error)
- func (s *ScanBatchResponse) SetResults(results []*ScanBatchResult)
- func (s *ScanBatchResponse) String() string
- func (s *ScanBatchResponse) UnmarshalJSON(data []byte) error
- type ScanBatchResult
- func (s *ScanBatchResult) GetError() *APIError
- func (s *ScanBatchResult) GetExtraProperties() map[string]interface{}
- func (s *ScanBatchResult) GetFilename() string
- func (s *ScanBatchResult) GetHTTPStatus() int
- func (s *ScanBatchResult) GetIndex() int
- func (s *ScanBatchResult) GetScan() *Scan
- func (s *ScanBatchResult) MarshalJSON() ([]byte, error)
- func (s *ScanBatchResult) SetError(error_ *APIError)
- func (s *ScanBatchResult) SetFilename(filename string)
- func (s *ScanBatchResult) SetHTTPStatus(httpStatus int)
- func (s *ScanBatchResult) SetIndex(index int)
- func (s *ScanBatchResult) SetScan(scan *Scan)
- func (s *ScanBatchResult) String() string
- func (s *ScanBatchResult) UnmarshalJSON(data []byte) error
- type ScanFailure
- func (s *ScanFailure) GetCode() ScanFailureCode
- func (s *ScanFailure) GetExtraProperties() map[string]interface{}
- func (s *ScanFailure) GetMessage() string
- func (s *ScanFailure) MarshalJSON() ([]byte, error)
- func (s *ScanFailure) SetCode(code ScanFailureCode)
- func (s *ScanFailure) SetMessage(message string)
- func (s *ScanFailure) String() string
- func (s *ScanFailure) UnmarshalJSON(data []byte) error
- type ScanFailureCode
- type ScanList
- func (s *ScanList) GetExtraProperties() map[string]interface{}
- func (s *ScanList) GetItems() []*Scan
- func (s *ScanList) GetNextCursor() *string
- func (s *ScanList) MarshalJSON() ([]byte, error)
- func (s *ScanList) SetItems(items []*Scan)
- func (s *ScanList) SetNextCursor(nextCursor *string)
- func (s *ScanList) String() string
- func (s *ScanList) UnmarshalJSON(data []byte) error
- type ScanSource
- func (s *ScanSource) GetExtraProperties() map[string]interface{}
- func (s *ScanSource) GetIntegrationID() *string
- func (s *ScanSource) GetIntegrationName() *string
- func (s *ScanSource) GetType() ScanSourceType
- func (s *ScanSource) MarshalJSON() ([]byte, error)
- func (s *ScanSource) SetIntegrationID(integrationID *string)
- func (s *ScanSource) SetIntegrationName(integrationName *string)
- func (s *ScanSource) SetType(type_ ScanSourceType)
- func (s *ScanSource) String() string
- func (s *ScanSource) UnmarshalJSON(data []byte) error
- type ScanSourceType
- type ScanStatus
- type ScanTimings
- func (s *ScanTimings) GetExtraProperties() map[string]interface{}
- func (s *ScanTimings) GetFileTypeMs() float64
- func (s *ScanTimings) GetMalwareScanMs() float64
- func (s *ScanTimings) MarshalJSON() ([]byte, error)
- func (s *ScanTimings) SetFileTypeMs(fileTypeMs float64)
- func (s *ScanTimings) SetMalwareScanMs(malwareScanMs float64)
- func (s *ScanTimings) String() string
- func (s *ScanTimings) UnmarshalJSON(data []byte) error
- type ScanVerdict
- type ServiceUnavailableError
- type TooManyRequestsError
- type TypeAnalysis
- func (t *TypeAnalysis) GetConfidence() TypeAnalysisConfidence
- func (t *TypeAnalysis) GetDeclared() *TypeDeclaration
- func (t *TypeAnalysis) GetExtraProperties() map[string]interface{}
- func (t *TypeAnalysis) GetIdentified() *TypeIdentification
- func (t *TypeAnalysis) GetReason() *TypeAnalysisReason
- func (t *TypeAnalysis) GetStatus() TypeAnalysisStatus
- func (t *TypeAnalysis) GetStructurallyValid() *bool
- func (t *TypeAnalysis) MarshalJSON() ([]byte, error)
- func (t *TypeAnalysis) SetConfidence(confidence TypeAnalysisConfidence)
- func (t *TypeAnalysis) SetDeclared(declared *TypeDeclaration)
- func (t *TypeAnalysis) SetIdentified(identified *TypeIdentification)
- func (t *TypeAnalysis) SetReason(reason *TypeAnalysisReason)
- func (t *TypeAnalysis) SetStatus(status TypeAnalysisStatus)
- func (t *TypeAnalysis) SetStructurallyValid(structurallyValid *bool)
- func (t *TypeAnalysis) String() string
- func (t *TypeAnalysis) UnmarshalJSON(data []byte) error
- type TypeAnalysisConfidence
- type TypeAnalysisReason
- func (t *TypeAnalysisReason) GetClaimed() *string
- func (t *TypeAnalysisReason) GetCode() TypeAnalysisReasonCode
- func (t *TypeAnalysisReason) GetDetected() *string
- func (t *TypeAnalysisReason) GetExtraProperties() map[string]interface{}
- func (t *TypeAnalysisReason) MarshalJSON() ([]byte, error)
- func (t *TypeAnalysisReason) SetClaimed(claimed *string)
- func (t *TypeAnalysisReason) SetCode(code TypeAnalysisReasonCode)
- func (t *TypeAnalysisReason) SetDetected(detected *string)
- func (t *TypeAnalysisReason) String() string
- func (t *TypeAnalysisReason) UnmarshalJSON(data []byte) error
- type TypeAnalysisReasonCode
- type TypeAnalysisStatus
- type TypeDeclaration
- func (t *TypeDeclaration) GetExtension() *string
- func (t *TypeDeclaration) GetExtraProperties() map[string]interface{}
- func (t *TypeDeclaration) GetMime() *string
- func (t *TypeDeclaration) MarshalJSON() ([]byte, error)
- func (t *TypeDeclaration) SetExtension(extension *string)
- func (t *TypeDeclaration) SetMime(mime *string)
- func (t *TypeDeclaration) String() string
- func (t *TypeDeclaration) UnmarshalJSON(data []byte) error
- type TypeIdentification
- func (t *TypeIdentification) GetExtraProperties() map[string]interface{}
- func (t *TypeIdentification) GetFormat() *string
- func (t *TypeIdentification) GetMime() *string
- func (t *TypeIdentification) MarshalJSON() ([]byte, error)
- func (t *TypeIdentification) SetFormat(format *string)
- func (t *TypeIdentification) SetMime(mime *string)
- func (t *TypeIdentification) String() string
- func (t *TypeIdentification) UnmarshalJSON(data []byte) error
- type UnauthorizedError
Constants ¶
This section is empty.
Variables ¶
var Environments = struct { Default string }{ Default: "https://api.detectant.com", }
Environments defines all of the API environments. These values can be used with the WithBaseURL RequestOption to override the client's default environment, if any.
var ErrorCodes internal.ErrorCodes = internal.ErrorCodes{ 503: func(apiError *core.APIError) error { return &ServiceUnavailableError{ APIError: apiError, } }, 400: func(apiError *core.APIError) error { return &BadRequestError{ APIError: apiError, } }, 401: func(apiError *core.APIError) error { return &UnauthorizedError{ APIError: apiError, } }, 429: func(apiError *core.APIError) error { return &TooManyRequestsError{ APIError: apiError, } }, 500: func(apiError *core.APIError) error { return &InternalServerError{ APIError: apiError, } }, 404: func(apiError *core.APIError) error { return &NotFoundError{ APIError: apiError, } }, 403: func(apiError *core.APIError) error { return &ForbiddenError{ APIError: apiError, } }, 413: func(apiError *core.APIError) error { return &ContentTooLargeError{ APIError: apiError, } }, }
Functions ¶
func Complex128 ¶
func Complex128(c complex128) *complex128
Complex128 returns a pointer to the given complex128 value.
func MustParseDate ¶
MustParseDate attempts to parse the given string as a date time.Time, and panics upon failure.
func MustParseDateTime ¶
MustParseDateTime attempts to parse the given string as a datetime time.Time, and panics upon failure.
Types ¶
type APIError ¶
type APIError struct {
// Stable machine-readable error code.
Code string `json:"code" url:"code"`
// Human-readable error message.
Message string `json:"message" url:"message"`
// Context such as the ID of a failed stored scan. Empty when no context applies.
Details map[string]string `json:"details" url:"details"`
// contains filtered or unexported fields
}
func (*APIError) GetDetails ¶
func (*APIError) GetExtraProperties ¶
func (*APIError) GetMessage ¶
func (*APIError) MarshalJSON ¶
func (*APIError) SetCode ¶
SetCode sets the Code field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*APIError) SetDetails ¶
SetDetails sets the Details field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*APIError) SetMessage ¶
SetMessage sets the Message field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*APIError) UnmarshalJSON ¶
type BadRequestError ¶
type BadRequestError struct {
*core.APIError
Body *ErrorResponse
}
The request parameters or upload are invalid.
func (*BadRequestError) MarshalJSON ¶
func (b *BadRequestError) MarshalJSON() ([]byte, error)
func (*BadRequestError) UnmarshalJSON ¶
func (b *BadRequestError) UnmarshalJSON(data []byte) error
func (*BadRequestError) Unwrap ¶
func (b *BadRequestError) Unwrap() error
type ContentTooLargeError ¶
type ContentTooLargeError struct {
*core.APIError
Body *ErrorResponse
}
The upload or safely expanded content exceeds a scanner limit.
func (*ContentTooLargeError) MarshalJSON ¶
func (c *ContentTooLargeError) MarshalJSON() ([]byte, error)
func (*ContentTooLargeError) UnmarshalJSON ¶
func (c *ContentTooLargeError) UnmarshalJSON(data []byte) error
func (*ContentTooLargeError) Unwrap ¶
func (c *ContentTooLargeError) Unwrap() error
type ErrorResponse ¶
type ErrorResponse struct {
Error *APIError `json:"error" url:"error"`
// contains filtered or unexported fields
}
func (*ErrorResponse) GetError ¶
func (e *ErrorResponse) GetError() *APIError
func (*ErrorResponse) GetExtraProperties ¶
func (e *ErrorResponse) GetExtraProperties() map[string]interface{}
func (*ErrorResponse) MarshalJSON ¶
func (e *ErrorResponse) MarshalJSON() ([]byte, error)
func (*ErrorResponse) SetError ¶
func (e *ErrorResponse) SetError(error_ *APIError)
SetError sets the Error field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ErrorResponse) String ¶
func (e *ErrorResponse) String() string
func (*ErrorResponse) UnmarshalJSON ¶
func (e *ErrorResponse) UnmarshalJSON(data []byte) error
type FileParam ¶
FileParam is a file type suitable for multipart/form-data uploads.
func NewFileParam ¶
func NewFileParam( reader io.Reader, filename string, contentType string, opts ...FileParamOption, ) *FileParam
NewFileParam returns a *FileParam type suitable for multipart/form-data uploads. All file upload endpoints accept a simple io.Reader, which is usually created by opening a file via os.Open.
However, some endpoints require additional metadata about the file such as a specific Content-Type or custom filename. FileParam makes it easier to create the correct type signature for these endpoints.
func (*FileParam) ContentType ¶
type FileParamOption ¶
type FileParamOption interface {
// contains filtered or unexported methods
}
FileParamOption adapts the behavior of the FileParam. No options are implemented yet, but this interface allows for future extensibility.
type ForbiddenError ¶
type ForbiddenError struct {
*core.APIError
Body *ErrorResponse
}
A dashboard session was supplied where an API key is required.
func (*ForbiddenError) MarshalJSON ¶
func (f *ForbiddenError) MarshalJSON() ([]byte, error)
func (*ForbiddenError) UnmarshalJSON ¶
func (f *ForbiddenError) UnmarshalJSON(data []byte) error
func (*ForbiddenError) Unwrap ¶
func (f *ForbiddenError) Unwrap() error
type GetScanRequest ¶
type GetScanRequest struct {
// Scan identifier returned by `createScan` or `listScans`.
ScanID string `json:"-" url:"-"`
// contains filtered or unexported fields
}
func (*GetScanRequest) SetScanID ¶
func (g *GetScanRequest) SetScanID(scanID string)
SetScanID sets the ScanID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
type HealthResponse ¶
type HealthResponse struct {
Status HealthResponseStatus `json:"status" url:"status"`
// contains filtered or unexported fields
}
func (*HealthResponse) GetExtraProperties ¶
func (h *HealthResponse) GetExtraProperties() map[string]interface{}
func (*HealthResponse) GetStatus ¶
func (h *HealthResponse) GetStatus() HealthResponseStatus
func (*HealthResponse) MarshalJSON ¶
func (h *HealthResponse) MarshalJSON() ([]byte, error)
func (*HealthResponse) SetStatus ¶
func (h *HealthResponse) SetStatus(status HealthResponseStatus)
SetStatus sets the Status field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*HealthResponse) String ¶
func (h *HealthResponse) String() string
func (*HealthResponse) UnmarshalJSON ¶
func (h *HealthResponse) UnmarshalJSON(data []byte) error
type HealthResponseStatus ¶
type HealthResponseStatus string
const ( HealthResponseStatusOk HealthResponseStatus = "ok" HealthResponseStatusDegraded HealthResponseStatus = "degraded" )
func NewHealthResponseStatusFromString ¶
func NewHealthResponseStatusFromString(s string) (HealthResponseStatus, error)
func (HealthResponseStatus) Ptr ¶
func (h HealthResponseStatus) Ptr() *HealthResponseStatus
type InternalServerError ¶
type InternalServerError struct {
*core.APIError
Body *ErrorResponse
}
An unexpected internal failure occurred.
func (*InternalServerError) MarshalJSON ¶
func (i *InternalServerError) MarshalJSON() ([]byte, error)
func (*InternalServerError) UnmarshalJSON ¶
func (i *InternalServerError) UnmarshalJSON(data []byte) error
func (*InternalServerError) Unwrap ¶
func (i *InternalServerError) Unwrap() error
type ListScansRequest ¶
type ListScansRequest struct {
// Maximum results to return. Values above 200 are capped at 200; omission uses 50.
Limit *int `json:"-" url:"limit,omitempty"`
// Opaque cursor returned as `next_cursor` by a previous request.
Cursor *string `json:"-" url:"cursor,omitempty"`
// Case-sensitive PostgreSQL `LIKE` fragment matched against the stored verdict; `%` and `_` act as wildcards.
Verdict *string `json:"-" url:"verdict,omitempty"`
// Case-insensitive fragment matched against the scan identifier.
ScanID *string `json:"-" url:"scan_id,omitempty"`
// Return direct API scans or scans submitted by an S3 integration.
SourceType *ListScansRequestSourceType `json:"-" url:"source_type,omitempty"`
// Return scans submitted by this S3 integration.
StorageIntegrationID *string `json:"-" url:"storage_integration_id,omitempty"`
// Return scans by failure presence or customer-facing failure code.
Failure *ListScansRequestFailure `json:"-" url:"failure,omitempty"`
// Case-sensitive PostgreSQL `LIKE` fragment matched against the stored filename; `%` and `_` act as wildcards.
Filename *string `json:"-" url:"filename,omitempty"`
// Case-sensitive PostgreSQL `LIKE` fragment matched against the stored engine signature; `%` and `_` act as wildcards.
EngineSignature *string `json:"-" url:"engine_signature,omitempty"`
// Case-sensitive PostgreSQL `LIKE` fragment matched against stored detection rules; `%` and `_` act as wildcards.
DetectionRule *string `json:"-" url:"detection_rule,omitempty"`
// contains filtered or unexported fields
}
func (*ListScansRequest) SetCursor ¶
func (l *ListScansRequest) SetCursor(cursor *string)
SetCursor sets the Cursor field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ListScansRequest) SetDetectionRule ¶
func (l *ListScansRequest) SetDetectionRule(detectionRule *string)
SetDetectionRule sets the DetectionRule field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ListScansRequest) SetEngineSignature ¶
func (l *ListScansRequest) SetEngineSignature(engineSignature *string)
SetEngineSignature sets the EngineSignature field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ListScansRequest) SetFailure ¶
func (l *ListScansRequest) SetFailure(failure *ListScansRequestFailure)
SetFailure sets the Failure field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ListScansRequest) SetFilename ¶
func (l *ListScansRequest) SetFilename(filename *string)
SetFilename sets the Filename field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ListScansRequest) SetLimit ¶
func (l *ListScansRequest) SetLimit(limit *int)
SetLimit sets the Limit field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ListScansRequest) SetScanID ¶
func (l *ListScansRequest) SetScanID(scanID *string)
SetScanID sets the ScanID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ListScansRequest) SetSourceType ¶
func (l *ListScansRequest) SetSourceType(sourceType *ListScansRequestSourceType)
SetSourceType sets the SourceType field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ListScansRequest) SetStorageIntegrationID ¶
func (l *ListScansRequest) SetStorageIntegrationID(storageIntegrationID *string)
SetStorageIntegrationID sets the StorageIntegrationID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ListScansRequest) SetVerdict ¶
func (l *ListScansRequest) SetVerdict(verdict *string)
SetVerdict sets the Verdict field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
type ListScansRequestFailure ¶
type ListScansRequestFailure string
const ( ListScansRequestFailureAny ListScansRequestFailure = "any" ListScansRequestFailureNone ListScansRequestFailure = "none" ListScansRequestFailureContentExpansionLimitExceeded ListScansRequestFailure = "CONTENT_EXPANSION_LIMIT_EXCEEDED" )
func NewListScansRequestFailureFromString ¶
func NewListScansRequestFailureFromString(s string) (ListScansRequestFailure, error)
func (ListScansRequestFailure) Ptr ¶
func (l ListScansRequestFailure) Ptr() *ListScansRequestFailure
type ListScansRequestSourceType ¶
type ListScansRequestSourceType string
const ( ListScansRequestSourceTypeAPI ListScansRequestSourceType = "api" ListScansRequestSourceTypeS3 ListScansRequestSourceType = "s3" )
func NewListScansRequestSourceTypeFromString ¶
func NewListScansRequestSourceTypeFromString(s string) (ListScansRequestSourceType, error)
func (ListScansRequestSourceType) Ptr ¶
func (l ListScansRequestSourceType) Ptr() *ListScansRequestSourceType
type NotFoundError ¶
type NotFoundError struct {
*core.APIError
Body *ErrorResponse
}
No scan with this identifier exists for the authenticated account.
func (*NotFoundError) MarshalJSON ¶
func (n *NotFoundError) MarshalJSON() ([]byte, error)
func (*NotFoundError) UnmarshalJSON ¶
func (n *NotFoundError) UnmarshalJSON(data []byte) error
func (*NotFoundError) Unwrap ¶
func (n *NotFoundError) Unwrap() error
type Scan ¶
type Scan struct {
// Server-generated scan identifier.
ID string `json:"id" url:"id"`
CreatedAt time.Time `json:"created_at" url:"created_at"`
Status ScanStatus `json:"status" url:"status"`
Verdict ScanVerdict `json:"verdict" url:"verdict"`
// Filename supplied by the multipart upload.
Filename string `json:"filename" url:"filename"`
Sha256 string `json:"sha256" url:"sha256"`
SizeBytes int64 `json:"size_bytes" url:"size_bytes"`
DurationMs float64 `json:"duration_ms" url:"duration_ms"`
Timings *ScanTimings `json:"timings" url:"timings"`
// Failure information, or `null` when the scan completed.
Failure *ScanFailure `json:"failure,omitempty" url:"failure,omitempty"`
// Detection names reported for the file. Empty when no threats were detected.
Detections []string `json:"detections" url:"detections"`
TypeAnalysis *TypeAnalysis `json:"type_analysis" url:"type_analysis"`
Source *ScanSource `json:"source" url:"source"`
// contains filtered or unexported fields
}
func (*Scan) GetCreatedAt ¶
func (*Scan) GetDetections ¶
func (*Scan) GetDurationMs ¶
func (*Scan) GetExtraProperties ¶
func (*Scan) GetFailure ¶
func (s *Scan) GetFailure() *ScanFailure
func (*Scan) GetFilename ¶
func (*Scan) GetSizeBytes ¶
func (*Scan) GetSource ¶
func (s *Scan) GetSource() *ScanSource
func (*Scan) GetStatus ¶
func (s *Scan) GetStatus() ScanStatus
func (*Scan) GetTimings ¶
func (s *Scan) GetTimings() *ScanTimings
func (*Scan) GetTypeAnalysis ¶
func (s *Scan) GetTypeAnalysis() *TypeAnalysis
func (*Scan) GetVerdict ¶
func (s *Scan) GetVerdict() ScanVerdict
func (*Scan) MarshalJSON ¶
func (*Scan) SetCreatedAt ¶
SetCreatedAt sets the CreatedAt field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Scan) SetDetections ¶
SetDetections sets the Detections field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Scan) SetDurationMs ¶
SetDurationMs sets the DurationMs field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Scan) SetFailure ¶
func (s *Scan) SetFailure(failure *ScanFailure)
SetFailure sets the Failure field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Scan) SetFilename ¶
SetFilename sets the Filename field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Scan) SetID ¶
SetID sets the ID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Scan) SetSha256 ¶
SetSha256 sets the Sha256 field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Scan) SetSizeBytes ¶
SetSizeBytes sets the SizeBytes field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Scan) SetSource ¶
func (s *Scan) SetSource(source *ScanSource)
SetSource sets the Source field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Scan) SetStatus ¶
func (s *Scan) SetStatus(status ScanStatus)
SetStatus sets the Status field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Scan) SetTimings ¶
func (s *Scan) SetTimings(timings *ScanTimings)
SetTimings sets the Timings field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Scan) SetTypeAnalysis ¶
func (s *Scan) SetTypeAnalysis(typeAnalysis *TypeAnalysis)
SetTypeAnalysis sets the TypeAnalysis field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Scan) SetVerdict ¶
func (s *Scan) SetVerdict(verdict ScanVerdict)
SetVerdict sets the Verdict field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Scan) UnmarshalJSON ¶
type ScanBatchResponse ¶
type ScanBatchResponse struct {
// One outcome per submitted file, in submission order.
Results []*ScanBatchResult `json:"results" url:"results"`
// contains filtered or unexported fields
}
func (*ScanBatchResponse) GetExtraProperties ¶
func (s *ScanBatchResponse) GetExtraProperties() map[string]interface{}
func (*ScanBatchResponse) GetResults ¶
func (s *ScanBatchResponse) GetResults() []*ScanBatchResult
func (*ScanBatchResponse) MarshalJSON ¶
func (s *ScanBatchResponse) MarshalJSON() ([]byte, error)
func (*ScanBatchResponse) SetResults ¶
func (s *ScanBatchResponse) SetResults(results []*ScanBatchResult)
SetResults sets the Results field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ScanBatchResponse) String ¶
func (s *ScanBatchResponse) String() string
func (*ScanBatchResponse) UnmarshalJSON ¶
func (s *ScanBatchResponse) UnmarshalJSON(data []byte) error
type ScanBatchResult ¶
type ScanBatchResult struct {
// Zero-based position of the submitted file.
Index int `json:"index" url:"index"`
// Filename supplied by the multipart part.
Filename string `json:"filename" url:"filename"`
// HTTP status that the equivalent single-file request would return.
HTTPStatus int `json:"http_status" url:"http_status"`
// Stored scan result, including its scan ID, or null when validation failed before a scan was created.
Scan *Scan `json:"scan,omitempty" url:"scan,omitempty"`
// Per-file validation or scanning error, or null when the scan completed.
Error *APIError `json:"error,omitempty" url:"error,omitempty"`
// contains filtered or unexported fields
}
func (*ScanBatchResult) GetError ¶
func (s *ScanBatchResult) GetError() *APIError
func (*ScanBatchResult) GetExtraProperties ¶
func (s *ScanBatchResult) GetExtraProperties() map[string]interface{}
func (*ScanBatchResult) GetFilename ¶
func (s *ScanBatchResult) GetFilename() string
func (*ScanBatchResult) GetHTTPStatus ¶
func (s *ScanBatchResult) GetHTTPStatus() int
func (*ScanBatchResult) GetIndex ¶
func (s *ScanBatchResult) GetIndex() int
func (*ScanBatchResult) GetScan ¶
func (s *ScanBatchResult) GetScan() *Scan
func (*ScanBatchResult) MarshalJSON ¶
func (s *ScanBatchResult) MarshalJSON() ([]byte, error)
func (*ScanBatchResult) SetError ¶
func (s *ScanBatchResult) SetError(error_ *APIError)
SetError sets the Error field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ScanBatchResult) SetFilename ¶
func (s *ScanBatchResult) SetFilename(filename string)
SetFilename sets the Filename field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ScanBatchResult) SetHTTPStatus ¶
func (s *ScanBatchResult) SetHTTPStatus(httpStatus int)
SetHTTPStatus sets the HTTPStatus field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ScanBatchResult) SetIndex ¶
func (s *ScanBatchResult) SetIndex(index int)
SetIndex sets the Index field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ScanBatchResult) SetScan ¶
func (s *ScanBatchResult) SetScan(scan *Scan)
SetScan sets the Scan field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ScanBatchResult) String ¶
func (s *ScanBatchResult) String() string
func (*ScanBatchResult) UnmarshalJSON ¶
func (s *ScanBatchResult) UnmarshalJSON(data []byte) error
type ScanFailure ¶
type ScanFailure struct {
Code ScanFailureCode `json:"code" url:"code"`
Message string `json:"message" url:"message"`
// contains filtered or unexported fields
}
func (*ScanFailure) GetCode ¶
func (s *ScanFailure) GetCode() ScanFailureCode
func (*ScanFailure) GetExtraProperties ¶
func (s *ScanFailure) GetExtraProperties() map[string]interface{}
func (*ScanFailure) GetMessage ¶
func (s *ScanFailure) GetMessage() string
func (*ScanFailure) MarshalJSON ¶
func (s *ScanFailure) MarshalJSON() ([]byte, error)
func (*ScanFailure) SetCode ¶
func (s *ScanFailure) SetCode(code ScanFailureCode)
SetCode sets the Code field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ScanFailure) SetMessage ¶
func (s *ScanFailure) SetMessage(message string)
SetMessage sets the Message field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ScanFailure) String ¶
func (s *ScanFailure) String() string
func (*ScanFailure) UnmarshalJSON ¶
func (s *ScanFailure) UnmarshalJSON(data []byte) error
type ScanFailureCode ¶
type ScanFailureCode string
const ( ScanFailureCodeContentExpansionLimitExceeded ScanFailureCode = "CONTENT_EXPANSION_LIMIT_EXCEEDED" )
func NewScanFailureCodeFromString ¶
func NewScanFailureCodeFromString(s string) (ScanFailureCode, error)
func (ScanFailureCode) Ptr ¶
func (s ScanFailureCode) Ptr() *ScanFailureCode
type ScanList ¶
type ScanList struct {
// Scan records. Empty when the account has no scans.
Items []*Scan `json:"items" url:"items"`
// Opaque cursor for the next page, or `null` when no next page exists.
NextCursor *string `json:"next_cursor,omitempty" url:"next_cursor,omitempty"`
// contains filtered or unexported fields
}
func (*ScanList) GetExtraProperties ¶
func (*ScanList) GetNextCursor ¶
func (*ScanList) MarshalJSON ¶
func (*ScanList) SetItems ¶
SetItems sets the Items field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ScanList) SetNextCursor ¶
SetNextCursor sets the NextCursor field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ScanList) UnmarshalJSON ¶
type ScanSource ¶
type ScanSource struct {
Type ScanSourceType `json:"type" url:"type"`
// S3 integration identifier, or `null` for direct API scans.
IntegrationID *string `json:"integration_id,omitempty" url:"integration_id,omitempty"`
// S3 integration name, or `null` for direct API scans.
IntegrationName *string `json:"integration_name,omitempty" url:"integration_name,omitempty"`
// contains filtered or unexported fields
}
func (*ScanSource) GetExtraProperties ¶
func (s *ScanSource) GetExtraProperties() map[string]interface{}
func (*ScanSource) GetIntegrationID ¶
func (s *ScanSource) GetIntegrationID() *string
func (*ScanSource) GetIntegrationName ¶
func (s *ScanSource) GetIntegrationName() *string
func (*ScanSource) GetType ¶
func (s *ScanSource) GetType() ScanSourceType
func (*ScanSource) MarshalJSON ¶
func (s *ScanSource) MarshalJSON() ([]byte, error)
func (*ScanSource) SetIntegrationID ¶
func (s *ScanSource) SetIntegrationID(integrationID *string)
SetIntegrationID sets the IntegrationID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ScanSource) SetIntegrationName ¶
func (s *ScanSource) SetIntegrationName(integrationName *string)
SetIntegrationName sets the IntegrationName field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ScanSource) SetType ¶
func (s *ScanSource) SetType(type_ ScanSourceType)
SetType sets the Type field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ScanSource) String ¶
func (s *ScanSource) String() string
func (*ScanSource) UnmarshalJSON ¶
func (s *ScanSource) UnmarshalJSON(data []byte) error
type ScanSourceType ¶
type ScanSourceType string
const ( ScanSourceTypeAPI ScanSourceType = "api" ScanSourceTypeS3 ScanSourceType = "s3" )
func NewScanSourceTypeFromString ¶
func NewScanSourceTypeFromString(s string) (ScanSourceType, error)
func (ScanSourceType) Ptr ¶
func (s ScanSourceType) Ptr() *ScanSourceType
type ScanStatus ¶
type ScanStatus string
const ( ScanStatusCompleted ScanStatus = "completed" ScanStatusFailed ScanStatus = "failed" )
func NewScanStatusFromString ¶
func NewScanStatusFromString(s string) (ScanStatus, error)
func (ScanStatus) Ptr ¶
func (s ScanStatus) Ptr() *ScanStatus
type ScanTimings ¶
type ScanTimings struct {
FileTypeMs float64 `json:"file_type_ms" url:"file_type_ms"`
MalwareScanMs float64 `json:"malware_scan_ms" url:"malware_scan_ms"`
// contains filtered or unexported fields
}
func (*ScanTimings) GetExtraProperties ¶
func (s *ScanTimings) GetExtraProperties() map[string]interface{}
func (*ScanTimings) GetFileTypeMs ¶
func (s *ScanTimings) GetFileTypeMs() float64
func (*ScanTimings) GetMalwareScanMs ¶
func (s *ScanTimings) GetMalwareScanMs() float64
func (*ScanTimings) MarshalJSON ¶
func (s *ScanTimings) MarshalJSON() ([]byte, error)
func (*ScanTimings) SetFileTypeMs ¶
func (s *ScanTimings) SetFileTypeMs(fileTypeMs float64)
SetFileTypeMs sets the FileTypeMs field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ScanTimings) SetMalwareScanMs ¶
func (s *ScanTimings) SetMalwareScanMs(malwareScanMs float64)
SetMalwareScanMs sets the MalwareScanMs field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ScanTimings) String ¶
func (s *ScanTimings) String() string
func (*ScanTimings) UnmarshalJSON ¶
func (s *ScanTimings) UnmarshalJSON(data []byte) error
type ScanVerdict ¶
type ScanVerdict string
const ( ScanVerdictClean ScanVerdict = "clean" ScanVerdictMalicious ScanVerdict = "malicious" ScanVerdictSuspicious ScanVerdict = "suspicious" ScanVerdictUnknown ScanVerdict = "unknown" )
func NewScanVerdictFromString ¶
func NewScanVerdictFromString(s string) (ScanVerdict, error)
func (ScanVerdict) Ptr ¶
func (s ScanVerdict) Ptr() *ScanVerdict
type ServiceUnavailableError ¶
type ServiceUnavailableError struct {
}
One or more required dependencies are unavailable or degraded.
func (*ServiceUnavailableError) MarshalJSON ¶
func (s *ServiceUnavailableError) MarshalJSON() ([]byte, error)
func (*ServiceUnavailableError) UnmarshalJSON ¶
func (s *ServiceUnavailableError) UnmarshalJSON(data []byte) error
func (*ServiceUnavailableError) Unwrap ¶
func (s *ServiceUnavailableError) Unwrap() error
type TooManyRequestsError ¶
type TooManyRequestsError struct {
*core.APIError
Body *ErrorResponse
}
The plan's current-period scan allowance, global request rate, or concurrent scanner capacity was exceeded. Plan exhaustion uses `USAGE_LIMIT_EXCEEDED` and includes the plan, limit, and reset time in `details`.
func (*TooManyRequestsError) MarshalJSON ¶
func (t *TooManyRequestsError) MarshalJSON() ([]byte, error)
func (*TooManyRequestsError) UnmarshalJSON ¶
func (t *TooManyRequestsError) UnmarshalJSON(data []byte) error
func (*TooManyRequestsError) Unwrap ¶
func (t *TooManyRequestsError) Unwrap() error
type TypeAnalysis ¶
type TypeAnalysis struct {
Declared *TypeDeclaration `json:"declared" url:"declared"`
Identified *TypeIdentification `json:"identified" url:"identified"`
Status TypeAnalysisStatus `json:"status" url:"status"`
StructurallyValid *bool `json:"structurally_valid,omitempty" url:"structurally_valid,omitempty"`
Confidence TypeAnalysisConfidence `json:"confidence" url:"confidence"`
Reason *TypeAnalysisReason `json:"reason,omitempty" url:"reason,omitempty"`
// contains filtered or unexported fields
}
func (*TypeAnalysis) GetConfidence ¶
func (t *TypeAnalysis) GetConfidence() TypeAnalysisConfidence
func (*TypeAnalysis) GetDeclared ¶
func (t *TypeAnalysis) GetDeclared() *TypeDeclaration
func (*TypeAnalysis) GetExtraProperties ¶
func (t *TypeAnalysis) GetExtraProperties() map[string]interface{}
func (*TypeAnalysis) GetIdentified ¶
func (t *TypeAnalysis) GetIdentified() *TypeIdentification
func (*TypeAnalysis) GetReason ¶
func (t *TypeAnalysis) GetReason() *TypeAnalysisReason
func (*TypeAnalysis) GetStatus ¶
func (t *TypeAnalysis) GetStatus() TypeAnalysisStatus
func (*TypeAnalysis) GetStructurallyValid ¶
func (t *TypeAnalysis) GetStructurallyValid() *bool
func (*TypeAnalysis) MarshalJSON ¶
func (t *TypeAnalysis) MarshalJSON() ([]byte, error)
func (*TypeAnalysis) SetConfidence ¶
func (t *TypeAnalysis) SetConfidence(confidence TypeAnalysisConfidence)
SetConfidence sets the Confidence field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*TypeAnalysis) SetDeclared ¶
func (t *TypeAnalysis) SetDeclared(declared *TypeDeclaration)
SetDeclared sets the Declared field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*TypeAnalysis) SetIdentified ¶
func (t *TypeAnalysis) SetIdentified(identified *TypeIdentification)
SetIdentified sets the Identified field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*TypeAnalysis) SetReason ¶
func (t *TypeAnalysis) SetReason(reason *TypeAnalysisReason)
SetReason sets the Reason field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*TypeAnalysis) SetStatus ¶
func (t *TypeAnalysis) SetStatus(status TypeAnalysisStatus)
SetStatus sets the Status field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*TypeAnalysis) SetStructurallyValid ¶
func (t *TypeAnalysis) SetStructurallyValid(structurallyValid *bool)
SetStructurallyValid sets the StructurallyValid field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*TypeAnalysis) String ¶
func (t *TypeAnalysis) String() string
func (*TypeAnalysis) UnmarshalJSON ¶
func (t *TypeAnalysis) UnmarshalJSON(data []byte) error
type TypeAnalysisConfidence ¶
type TypeAnalysisConfidence string
const ( TypeAnalysisConfidenceHigh TypeAnalysisConfidence = "high" TypeAnalysisConfidenceMedium TypeAnalysisConfidence = "medium" TypeAnalysisConfidenceLow TypeAnalysisConfidence = "low" )
func NewTypeAnalysisConfidenceFromString ¶
func NewTypeAnalysisConfidenceFromString(s string) (TypeAnalysisConfidence, error)
func (TypeAnalysisConfidence) Ptr ¶
func (t TypeAnalysisConfidence) Ptr() *TypeAnalysisConfidence
type TypeAnalysisReason ¶
type TypeAnalysisReason struct {
Code TypeAnalysisReasonCode `json:"code" url:"code"`
Claimed *string `json:"claimed,omitempty" url:"claimed,omitempty"`
Detected *string `json:"detected,omitempty" url:"detected,omitempty"`
// contains filtered or unexported fields
}
func (*TypeAnalysisReason) GetClaimed ¶
func (t *TypeAnalysisReason) GetClaimed() *string
func (*TypeAnalysisReason) GetCode ¶
func (t *TypeAnalysisReason) GetCode() TypeAnalysisReasonCode
func (*TypeAnalysisReason) GetDetected ¶
func (t *TypeAnalysisReason) GetDetected() *string
func (*TypeAnalysisReason) GetExtraProperties ¶
func (t *TypeAnalysisReason) GetExtraProperties() map[string]interface{}
func (*TypeAnalysisReason) MarshalJSON ¶
func (t *TypeAnalysisReason) MarshalJSON() ([]byte, error)
func (*TypeAnalysisReason) SetClaimed ¶
func (t *TypeAnalysisReason) SetClaimed(claimed *string)
SetClaimed sets the Claimed field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*TypeAnalysisReason) SetCode ¶
func (t *TypeAnalysisReason) SetCode(code TypeAnalysisReasonCode)
SetCode sets the Code field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*TypeAnalysisReason) SetDetected ¶
func (t *TypeAnalysisReason) SetDetected(detected *string)
SetDetected sets the Detected field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*TypeAnalysisReason) String ¶
func (t *TypeAnalysisReason) String() string
func (*TypeAnalysisReason) UnmarshalJSON ¶
func (t *TypeAnalysisReason) UnmarshalJSON(data []byte) error
type TypeAnalysisReasonCode ¶
type TypeAnalysisReasonCode string
const ( TypeAnalysisReasonCodeMalformedFile TypeAnalysisReasonCode = "malformed_file" TypeAnalysisReasonCodeEncryptedArchive TypeAnalysisReasonCode = "encrypted_archive" TypeAnalysisReasonCodeUnsupportedArchive TypeAnalysisReasonCode = "unsupported_archive" TypeAnalysisReasonCodeContentExpansionLimitExceeded TypeAnalysisReasonCode = "content_expansion_limit_exceeded" TypeAnalysisReasonCodeFileTypeMismatch TypeAnalysisReasonCode = "file_type_mismatch" )
func NewTypeAnalysisReasonCodeFromString ¶
func NewTypeAnalysisReasonCodeFromString(s string) (TypeAnalysisReasonCode, error)
func (TypeAnalysisReasonCode) Ptr ¶
func (t TypeAnalysisReasonCode) Ptr() *TypeAnalysisReasonCode
type TypeAnalysisStatus ¶
type TypeAnalysisStatus string
const ( TypeAnalysisStatusMatch TypeAnalysisStatus = "match" TypeAnalysisStatusCompatible TypeAnalysisStatus = "compatible" TypeAnalysisStatusMismatch TypeAnalysisStatus = "mismatch" TypeAnalysisStatusMalformed TypeAnalysisStatus = "malformed" TypeAnalysisStatusUnscannable TypeAnalysisStatus = "unscannable" TypeAnalysisStatusUnknown TypeAnalysisStatus = "unknown" )
func NewTypeAnalysisStatusFromString ¶
func NewTypeAnalysisStatusFromString(s string) (TypeAnalysisStatus, error)
func (TypeAnalysisStatus) Ptr ¶
func (t TypeAnalysisStatus) Ptr() *TypeAnalysisStatus
type TypeDeclaration ¶
type TypeDeclaration struct {
// Raw extension from the uploaded filename, without the leading dot.
Extension *string `json:"extension,omitempty" url:"extension,omitempty"`
// Normalized MIME type declared by the multipart part.
Mime *string `json:"mime,omitempty" url:"mime,omitempty"`
// contains filtered or unexported fields
}
func (*TypeDeclaration) GetExtension ¶
func (t *TypeDeclaration) GetExtension() *string
func (*TypeDeclaration) GetExtraProperties ¶
func (t *TypeDeclaration) GetExtraProperties() map[string]interface{}
func (*TypeDeclaration) GetMime ¶
func (t *TypeDeclaration) GetMime() *string
func (*TypeDeclaration) MarshalJSON ¶
func (t *TypeDeclaration) MarshalJSON() ([]byte, error)
func (*TypeDeclaration) SetExtension ¶
func (t *TypeDeclaration) SetExtension(extension *string)
SetExtension sets the Extension field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*TypeDeclaration) SetMime ¶
func (t *TypeDeclaration) SetMime(mime *string)
SetMime sets the Mime field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*TypeDeclaration) String ¶
func (t *TypeDeclaration) String() string
func (*TypeDeclaration) UnmarshalJSON ¶
func (t *TypeDeclaration) UnmarshalJSON(data []byte) error
type TypeIdentification ¶
type TypeIdentification struct {
// Canonical format identified from file content.
Format *string `json:"format,omitempty" url:"format,omitempty"`
// Canonical MIME type identified from file content.
Mime *string `json:"mime,omitempty" url:"mime,omitempty"`
// contains filtered or unexported fields
}
func (*TypeIdentification) GetExtraProperties ¶
func (t *TypeIdentification) GetExtraProperties() map[string]interface{}
func (*TypeIdentification) GetFormat ¶
func (t *TypeIdentification) GetFormat() *string
func (*TypeIdentification) GetMime ¶
func (t *TypeIdentification) GetMime() *string
func (*TypeIdentification) MarshalJSON ¶
func (t *TypeIdentification) MarshalJSON() ([]byte, error)
func (*TypeIdentification) SetFormat ¶
func (t *TypeIdentification) SetFormat(format *string)
SetFormat sets the Format field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*TypeIdentification) SetMime ¶
func (t *TypeIdentification) SetMime(mime *string)
SetMime sets the Mime field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*TypeIdentification) String ¶
func (t *TypeIdentification) String() string
func (*TypeIdentification) UnmarshalJSON ¶
func (t *TypeIdentification) UnmarshalJSON(data []byte) error
type UnauthorizedError ¶
type UnauthorizedError struct {
}
The API key is missing or invalid.
func (*UnauthorizedError) MarshalJSON ¶
func (u *UnauthorizedError) MarshalJSON() ([]byte, error)
func (*UnauthorizedError) UnmarshalJSON ¶
func (u *UnauthorizedError) UnmarshalJSON(data []byte) error
func (*UnauthorizedError) Unwrap ¶
func (u *UnauthorizedError) Unwrap() error