Documentation ¶
Index ¶
- Constants
- func AddrsFromInputFile(orgID, groupID int, addrFile io.Reader, t *testing.T) []*am.ScanGroupAddress
- func BuildCTRecords(etld string, insertedTS int64, count int) map[string]*am.CTRecord
- func BuildSubdomainsForCT(etld string, count int) map[string]*am.CTSubdomain
- func CreateAddressOnly(orgID, groupID int, ipAddress, hostAddress string, t *testing.T) *am.ScanGroupAddress
- func CreateEnterpriseOrg(p *pgx.ConnPool, name string, t *testing.T)
- func CreateMediumOrg(p *pgx.ConnPool, name string, t *testing.T)
- func CreateModuleConfig() *am.ModuleConfiguration
- func CreateMultiWebData(address *am.ScanGroupAddress, host, ip string) []*am.WebData
- func CreateMultiWebDataWithSub(address *am.ScanGroupAddress, host, ip string, total int) []*am.WebData
- func CreateOrg(p *pgx.ConnPool, name string, t *testing.T)
- func CreateOrgFromOrg(p *pgx.ConnPool, org *am.Organization, t *testing.T)
- func CreateOrgInstance(orgName string) *am.Organization
- func CreateScanGroup(p *pgx.ConnPool, orgName, groupName string, t *testing.T) int
- func CreateScanGroupAddress(p *pgx.ConnPool, orgID, groupID int, t *testing.T) *am.ScanGroupAddress
- func CreateScanGroupAddressWithAddress(p *pgx.ConnPool, a *am.ScanGroupAddress, t *testing.T) int64
- func CreateScanGroupOnly(orgID, groupID int) *am.ScanGroup
- func CreateSmallOrg(p *pgx.ConnPool, name string, t *testing.T)
- func CreateUserContext(orgID, userID int) *mock.UserContext
- func CreateWebData(address *am.ScanGroupAddress, host, ip string) *am.WebData
- func DeleteOrg(p *pgx.ConnPool, name string, t *testing.T)
- func Float32EqualEPS(a, b float32, eps float32) bool
- func Float32Equals(a, b float32) bool
- func Float64EqualEPS(a, b float64, eps float64) bool
- func Float64Equals(a, b float64) bool
- func GenerateAddrs(orgID, groupID, count int) []*am.ScanGroupAddress
- func GenerateID(t *testing.T) string
- func GetOrgID(p *pgx.ConnPool, name string, t *testing.T) int
- func GetUser(p *pgx.ConnPool, orgID int, name string, t *testing.T) *am.User
- func GetUserId(p *pgx.ConnPool, orgID int, name string, t *testing.T) int
- func InitDB(env string, t *testing.T) *pgx.ConnPool
- func MockAddressService(orgID int, addresses []*am.ScanGroupAddress) *mock.AddressService
- func MockAuthorizer() *mock.Authorizer
- func MockBigDataState() *mock.BigDataState
- func MockBigQueryClient() *mock.BigQuerier
- func MockBruteState() *mock.BruteState
- func MockCertListener() *mock.CertListener
- func MockDispatcherState(wg *sync.WaitGroup, groups []*am.ScanGroup) *mock.DispatcherState
- func MockEmptyAuthorizer() *mock.Authorizer
- func MockEventService() *mock.EventService
- func MockNSState() *mock.NSState
- func MockPortScanService(orgID, groupID int, ports []int32) *mock.PortScannerService
- func MockRoleManager() *mock.RoleManager
- func MockScanGroupService(orgID, groupID int) *mock.ScanGroupService
- func MockStorage() *mock.Storage
- func MockWebDataService(orgID, groupID int) *mock.WebDataService
- func MockWebDetector() *mock.Detector
- func MockWebState() *mock.WebState
- func MockWebhooker() *mock.Webhooker
- func RunAggregates(db *pgx.ConnPool, t *testing.T)
- func SortEqualInt(expected, returned []int, t *testing.T) bool
- func SortEqualInt32(expected, returned []int32, t *testing.T) bool
- func SortEqualInt64(expected, returned []int64, t *testing.T) bool
- func SortEqualString(expected, returned []string, t *testing.T) bool
- func TestCompareAddress(e, r *am.ScanGroupAddress, t *testing.T)
- func TestCompareAddresses(expected, returned map[string]*am.ScanGroupAddress, t *testing.T)
- func TestCompareCTRecords(expected, returned map[string]*am.CTRecord, t *testing.T)
- func TestCompareGroupModules(e, r *am.ModuleConfiguration, t *testing.T)
- func TestCompareOrganizations(expected, returned *am.Organization, t *testing.T)
- func TestComparePortData(e, r *am.PortData, t *testing.T)
- func TestComparePorts(e, r *am.PortResults, t *testing.T)
- func TestComparePortsWithPrevious(e, r *am.PortResults, t *testing.T)
- func TestCompareScanGroup(group1, group2 *am.ScanGroup, t *testing.T)
- func TestCompareWebhookSettings(e, r *am.WebhookEventSettings, t *testing.T)
Constants ¶
View Source
const ( CreateOrgStmt = `` /* 619-byte string literal not displayed */ CreateUserStmt = `` /* 167-byte string literal not displayed */ CreateScanGroupStmt = `` /* 250-byte string literal not displayed */ CreateAddressStmt = `` /* 535-byte string literal not displayed */ DeleteOrgStmt = "select am.delete_org((select organization_id from am.organizations where organization_name=$1))" DeleteUserStmt = "delete from am.users where organization_id=(select organization_id from am.organizations where organization_name=$1)" GetOrgIDStmt = "select organization_id from am.organizations where organization_name=$1" GetUserIDStmt = "select user_id from am.users where organization_id=$1 and email=$2" GetUserStmt = `` /* 225-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
func AddrsFromInputFile ¶
func BuildCTRecords ¶
func BuildSubdomainsForCT ¶
func BuildSubdomainsForCT(etld string, count int) map[string]*am.CTSubdomain
func CreateAddressOnly ¶
func CreateModuleConfig ¶
func CreateModuleConfig() *am.ModuleConfiguration
func CreateMultiWebData ¶
func CreateMultiWebData(address *am.ScanGroupAddress, host, ip string) []*am.WebData
func CreateOrgFromOrg ¶
func CreateOrgInstance ¶
func CreateOrgInstance(orgName string) *am.Organization
func CreateScanGroup ¶
func CreateScanGroupAddress ¶
func CreateScanGroupOnly ¶
func CreateUserContext ¶
func CreateUserContext(orgID, userID int) *mock.UserContext
func CreateWebData ¶
func CreateWebData(address *am.ScanGroupAddress, host, ip string) *am.WebData
func Float32EqualEPS ¶
func Float32Equals ¶
func Float64EqualEPS ¶
func Float64Equals ¶
func GenerateAddrs ¶
func GenerateAddrs(orgID, groupID, count int) []*am.ScanGroupAddress
func GenerateID ¶
func MockAddressService ¶
func MockAddressService(orgID int, addresses []*am.ScanGroupAddress) *mock.AddressService
func MockAuthorizer ¶
func MockAuthorizer() *mock.Authorizer
func MockBigDataState ¶
func MockBigDataState() *mock.BigDataState
func MockBigQueryClient ¶
func MockBigQueryClient() *mock.BigQuerier
func MockBruteState ¶
func MockBruteState() *mock.BruteState
func MockCertListener ¶
func MockCertListener() *mock.CertListener
func MockDispatcherState ¶
func MockEmptyAuthorizer ¶
func MockEmptyAuthorizer() *mock.Authorizer
func MockEventService ¶
func MockEventService() *mock.EventService
func MockNSState ¶
func MockPortScanService ¶
func MockPortScanService(orgID, groupID int, ports []int32) *mock.PortScannerService
func MockRoleManager ¶
func MockRoleManager() *mock.RoleManager
func MockScanGroupService ¶
func MockScanGroupService(orgID, groupID int) *mock.ScanGroupService
func MockStorage ¶
func MockWebDataService ¶
func MockWebDataService(orgID, groupID int) *mock.WebDataService
func MockWebDetector ¶
func MockWebState ¶
func MockWebhooker ¶
func TestCompareAddress ¶
func TestCompareAddress(e, r *am.ScanGroupAddress, t *testing.T)
TestCompareAddress details
func TestCompareAddresses ¶
func TestCompareAddresses(expected, returned map[string]*am.ScanGroupAddress, t *testing.T)
TestCompareAddresses tests all addresses in both maps' details
func TestCompareCTRecords ¶
func TestCompareGroupModules ¶
func TestCompareGroupModules(e, r *am.ModuleConfiguration, t *testing.T)
func TestCompareOrganizations ¶
func TestCompareOrganizations(expected, returned *am.Organization, t *testing.T)
TestCompareOrganizations does not compare fields that are unknown prior to creation time (creation time, org id, orgcid)
func TestComparePorts ¶
func TestComparePorts(e, r *am.PortResults, t *testing.T)
func TestComparePortsWithPrevious ¶
func TestComparePortsWithPrevious(e, r *am.PortResults, t *testing.T)
func TestCompareWebhookSettings ¶
func TestCompareWebhookSettings(e, r *am.WebhookEventSettings, t *testing.T)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.