Documentation ¶
Index ¶
- func ValidateSubDomain(fl validator.FieldLevel) bool
- func VerifyWebScanPorts(webPorts, tcpPorts []int32) ([]int32, []int32, bool)
- type ScanGroupDetails
- type ScanGroupEnv
- type ScanGroupHandlers
- func (h *ScanGroupHandlers) CreateScanGroup(w http.ResponseWriter, req *http.Request)
- func (h *ScanGroupHandlers) DeleteScanGroup(w http.ResponseWriter, req *http.Request)
- func (h *ScanGroupHandlers) GetGroupStats(w http.ResponseWriter, req *http.Request)
- func (h *ScanGroupHandlers) GetScanGroupByID(w http.ResponseWriter, req *http.Request)
- func (h *ScanGroupHandlers) GetScanGroupByName(w http.ResponseWriter, req *http.Request)
- func (h *ScanGroupHandlers) GetScanGroups(w http.ResponseWriter, req *http.Request)
- func (h *ScanGroupHandlers) UpdateScanGroup(w http.ResponseWriter, req *http.Request)
- func (h *ScanGroupHandlers) UpdateScanGroupStatus(w http.ResponseWriter, req *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateSubDomain ¶
func ValidateSubDomain(fl validator.FieldLevel) bool
TODO: should probably make this better/find a good example.
Types ¶
type ScanGroupDetails ¶
type ScanGroupDetails struct { GroupName string `json:"group_name" validate:"required,gte=1,lte=128,excludesall=/"` PortScanEnabled bool `json:"port_scan_enabled"` CustomSubNames []string `json:"custom_sub_names" validate:"omitempty,max=100,dive,gte=1,lte=128,subdomain"` CustomWebPorts []int32 `json:"custom_web_ports" validate:"omitempty,max=10,dive,gte=1,lte=65535"` TCPPorts []int32 `json:"tcp_ports" validate:"omitempty,max=50,dive,gte=1,lte=65535"` AllowedTLDs []string `json:"allowed_tlds" validate:"omitempty,max=100"` AllowedHosts []string `json:"allowed_hosts" validate:"omitempty,max=5000"` DisallowedTLDs []string `json:"disallowed_tlds" validate:"omitempty,max=100"` DisallowedHosts []string `json:"disallowed_hosts" validate:"omitempty,max=5000"` PortsPerSecond int32 `json:"ports_per_second" validate:"omitempty,gte=1,lte=50"` ConcurrentRequests int32 `json:"concurrent_requests" validate:"required,gte=1,lte=20"` // lte 25, beta is limited to 10 ArchiveAfterDays int32 `json:"archive_after_days" validate:"required,gte=2,lte=14"` }
type ScanGroupEnv ¶
type ScanGroupHandlers ¶
type ScanGroupHandlers struct { ContextExtractor middleware.UserContextExtractor // contains filtered or unexported fields }
func New ¶
func New(scanGroupClient am.ScanGroupService, userClient am.UserService, orgClient am.OrganizationService, env *ScanGroupEnv) *ScanGroupHandlers
func (*ScanGroupHandlers) CreateScanGroup ¶
func (h *ScanGroupHandlers) CreateScanGroup(w http.ResponseWriter, req *http.Request)
func (*ScanGroupHandlers) DeleteScanGroup ¶
func (h *ScanGroupHandlers) DeleteScanGroup(w http.ResponseWriter, req *http.Request)
func (*ScanGroupHandlers) GetGroupStats ¶
func (h *ScanGroupHandlers) GetGroupStats(w http.ResponseWriter, req *http.Request)
func (*ScanGroupHandlers) GetScanGroupByID ¶
func (h *ScanGroupHandlers) GetScanGroupByID(w http.ResponseWriter, req *http.Request)
func (*ScanGroupHandlers) GetScanGroupByName ¶
func (h *ScanGroupHandlers) GetScanGroupByName(w http.ResponseWriter, req *http.Request)
func (*ScanGroupHandlers) GetScanGroups ¶
func (h *ScanGroupHandlers) GetScanGroups(w http.ResponseWriter, req *http.Request)
func (*ScanGroupHandlers) UpdateScanGroup ¶
func (h *ScanGroupHandlers) UpdateScanGroup(w http.ResponseWriter, req *http.Request)
func (*ScanGroupHandlers) UpdateScanGroupStatus ¶
func (h *ScanGroupHandlers) UpdateScanGroupStatus(w http.ResponseWriter, req *http.Request)
Click to show internal directories.
Click to hide internal directories.