Documentation
¶
Index ¶
- Constants
- Variables
- type APIAttacks
- type APIAttacksInput
- type AdvancedSetting
- type AdvancedSettingInput
- type CreateWebAPIPracticeInput
- type FileSchema
- type FileWrapper
- type IPS
- type IPSInput
- type SchemaAPIAttacks
- type SchemaAdvancedSetting
- type SchemaIPS
- type SchemaValidation
- type SchemaValidationInput
- type UpdateAPIAttacksInput
- type UpdateIPSInput
- type UpdatePracticeInput
- type UpdateSchemaValidationInput
- type WebAPIPractice
Constants ¶
View Source
const ( FileDataFilenameFormat = "%s;$$:$$;" FileDataFormat = "data:application/octet-stream;base64,%s" )
Variables ¶
View Source
var (
ErrorInvalidDataFormat = errors.New("invalid data format")
)
Functions ¶
This section is empty.
Types ¶
type APIAttacks ¶
type APIAttacks struct { ID string `json:"id"` MinimumSeverity string `json:"minimumSeverity"` AdvancedSetting AdvancedSetting `json:"advancedSetting"` }
APIAttacks represents the APIAttacks field of the WebAPIPractice returned from the API
type APIAttacksInput ¶
type APIAttacksInput struct { ID string `json:"id,omitempty"` MinimumSeverity string `json:"minimumSeverity,omitempty"` AdvancedSetting AdvancedSettingInput `json:"advancedSetting,omitempty"` }
type AdvancedSetting ¶
type AdvancedSetting struct { ID string `json:"id"` IllegalHttpMethods string `json:"illegalHttpMethods,omitempty"` BodySize int `json:"bodySize,omitempty"` URLSize int `json:"urlSize,omitempty"` HeaderSize int `json:"headerSize,omitempty"` MaxObjectDepth int `json:"maxObjectDepth,omitempty"` }
AdvancedSetting represents the AdvancedSetting field of the APIAttacks field of the WebAPIPractice returned from the API
type AdvancedSettingInput ¶
type AdvancedSettingInput struct { ID string `json:"id,omitempty"` IllegalHttpMethods string `json:"illegalHttpMethods,omitempty"` BodySize int `json:"bodySize,omitempty"` URLSize int `json:"urlSize,omitempty"` HeaderSize int `json:"headerSize,omitempty"` MaxObjectDepth int `json:"maxObjectDepth,omitempty"` }
type CreateWebAPIPracticeInput ¶
type CreateWebAPIPracticeInput struct { Name string `json:"name"` Visibility string `json:"visibility,omitempty"` IPS IPSInput `json:"IPS,omitempty"` APIAttacks APIAttacksInput `json:"APIAttacks,omitempty"` SchemaValidation SchemaValidationInput `json:"SchemaValidation,omitempty"` }
CreateWebAPIPracticeInput represents the api input for creating a web API practice
type FileSchema ¶
type FileSchema struct { ID string `json:"id,omitempty"` Filename string `json:"filename,omitempty"` Data string `json:"data"` }
func NewFileSchemaDecode ¶
func NewFileSchemaDecode(filename, b64Data string) (*FileSchema, error)
func NewFileSchemaEncode ¶
func NewFileSchemaEncode(filename, fileData string) FileSchema
type FileWrapper ¶
type FileWrapper struct { Data string `json:"data"` Name string `json:"name"` Size uint64 `json:"size"` }
FileWrapper represents the OASSchema field of the SchemaValidation field of the WebAPIPractice returned from the API
type IPS ¶
type IPS struct { ID string `json:"id"` PerformanceImpact string `json:"performanceImpact"` SeverityLevel string `json:"severityLevel"` ProtectionsFromYear string `json:"protectionsFromYear"` HighConfidence string `json:"highConfidence"` MediumConfidence string `json:"mediumConfidence"` LowConfidence string `json:"lowConfidence"` }
IPS represents the IPS field of the WebAPIPractice returned from the API
type IPSInput ¶
type IPSInput struct { ID string `json:"id,omitempty"` PerformanceImpact string `json:"performanceImpact,omitempty"` SeverityLevel string `json:"severityLevel,omitempty"` ProtectionsFromYear string `json:"protectionsFromYear,omitempty"` HighConfidence string `json:"highConfidence,omitempty"` MediumConfidence string `json:"mediumConfidence,omitempty"` LowConfidence string `json:"lowConfidence,omitempty"` }
type SchemaAPIAttacks ¶
type SchemaAPIAttacks struct { ID string `json:"id"` MinimumSeverity string `json:"minimum_severity"` AdvancedSetting []SchemaAdvancedSetting `json:"advanced_setting"` }
type SchemaAdvancedSetting ¶
type SchemaAdvancedSetting struct { ID string `json:"id"` IllegalHttpMethods bool `json:"illegal_http_methods,omitempty"` BodySize int `json:"body_size,omitempty"` URLSize int `json:"url_size,omitempty"` HeaderSize int `json:"header_size,omitempty"` MaxObjectDepth int `json:"max_object_depth,omitempty"` }
type SchemaIPS ¶
type SchemaIPS struct { ID string `json:"id"` PerformanceImpact string `json:"performance_impact"` SeverityLevel string `json:"severity_level"` ProtectionsFromYear string `json:"protections_from_year"` HighConfidence string `json:"high_confidence"` MediumConfidence string `json:"medium_confidence"` LowConfidence string `json:"low_confidence"` }
type SchemaValidation ¶
type SchemaValidation struct { ID string `json:"id"` OASSchema FileWrapper `json:"OasSchema"` }
SchemaValidation represents the SchemaValidation field of the WebAPIPractice returned from the API
type SchemaValidationInput ¶
type UpdateAPIAttacksInput ¶
type UpdateAPIAttacksInput struct { ID string `json:"id,omitempty"` MinimumSeverity string `json:"minimumSeverity,omitempty"` AdvancedSetting AdvancedSettingInput `json:"advancedSetting,omitempty"` }
type UpdateIPSInput ¶
type UpdateIPSInput struct { ID string `json:"id,omitempty"` PerformanceImpact string `json:"performanceImpact,omitempty"` SeverityLevel string `json:"severityLevel,omitempty"` ProtectionsFromYear string `json:"protectionsFromYear,omitempty"` HighConfidence string `json:"highConfidence,omitempty"` MediumConfidence string `json:"mediumConfidence,omitempty"` LowConfidence string `json:"lowConfidence,omitempty"` }
type UpdatePracticeInput ¶
type UpdatePracticeInput struct { Name string `json:"name,omitempty"` Visibility string `json:"visibility,omitempty"` IPS UpdateIPSInput `json:"IPS,omitempty"` APIAttacks UpdateAPIAttacksInput `json:"APIAttacks,omitempty"` SchemaValidation UpdateSchemaValidationInput `json:"SchemaValidation,omitempty"` }
type WebAPIPractice ¶
type WebAPIPractice struct { ID string `json:"id"` IPS IPS `json:"IPS"` Name string `json:"name"` Category string `json:"category"` PracticeType string `json:"practiceType"` APIAttacks APIAttacks `json:"APIAttacks"` Default bool `json:"default"` SchemaValidation SchemaValidation `json:"SchemaValidation"` }
WebAPIPractice represents the response from the API after creating the web API practice
Click to show internal directories.
Click to hide internal directories.