Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/assetnote/newtowner
/ functions
Functions
244 in github.com/assetnote/newtowner
⨍
Functions
244
◇
Types & classes
33
↓ 87 callers
Method
String
()
internal/providers/bitbucket/bitbucket.go:36
↓ 37 callers
Function
AppendError
AppendError appends a new error string to an existing one.
internal/util/comparison.go:1113
↓ 29 callers
Method
Close
()
internal/providers/ssh/ssh.go:195
↓ 16 callers
Function
TruncateString
TruncateString truncates a string to a max length and adds "..." if truncated. If maxLength is less than 3, it will truncate to maxLength without addi
internal/util/stringutil.go:5
↓ 8 callers
Function
ResolveHostAndGetGeoLocation
ResolveHostAndGetGeoLocation resolves a hostname to an IP address (the first one found) and then looks up its geolocation.
internal/util/geolocation.go:103
↓ 7 callers
Method
Close
()
internal/providers/aws/ec2.go:313
↓ 7 callers
Function
CompareHTTPResponses
(direct RequestDetails, proxied RequestDetails)
internal/util/comparison.go:773
↓ 7 callers
Function
DisplaySingleURLCheckResult
DisplaySingleURLCheckResult takes a result that implements ProviderResultDisplay and prints its details in a standardized format using the provided st
internal/display/display.go:395
↓ 7 callers
Function
MakeHTTPRequest
makeHTTPRequest remains largely the same but might need to add X-My-X-Forwarded-For if we decide to do it client-side
internal/util/http.go:21
↓ 7 callers
Function
TrimmedString
TrimmedString shortens a string to a max length, adding "..." if truncated.
internal/util/comparison.go:1025
↓ 7 callers
Method
cleanupRemoteFile
cleanupRemoteFile attempts to delete a file on the remote server.
internal/providers/ssh/ssh.go:464
↓ 7 callers
Method
cleanupRemoteFile
cleanupRemoteFile attempts to delete a file on the remote server.
internal/providers/aws/ec2.go:599
↓ 6 callers
Function
compareAndRecord
Helper function to compare string values and record differences
internal/util/comparison.go:672
↓ 5 callers
Method
GetBypassReason
()
internal/display/display.go:42
↓ 4 callers
Method
CheckURLs
(urls []string)
internal/providers/ssh/ssh.go:205
↓ 4 callers
Method
GetDirectRequestDetails
Overall error for this URL check by the provider
internal/display/display.go:33
↓ 4 callers
Method
GetProviderRequestDetails
()
internal/display/display.go:34
↓ 4 callers
Function
IndentString
IndentString prepends each line of a given string with a specified prefix. If the input string is empty, it returns an empty string. If the input stri
internal/util/comparison.go:1077
↓ 4 callers
Function
ParseCertificateFromPEM
ParseCertificateFromPEM parses a PEM encoded certificate and returns an x509.Certificate
internal/util/comparison.go:541
↓ 4 callers
Function
SanitizeFilename
Added \s to also replace spaces SanitizeFilename removes or replaces characters that are invalid in filenames.
internal/util/fileutil.go:38
↓ 3 callers
Function
GetAWSRegionFromGeo
GetAWSRegionFromGeo attempts to map a geographic location (country code, city/area name) to a suitable AWS region. It uses a predefined, simplified ma
internal/util/geolocation.go:128
↓ 3 callers
Method
GetProviderDisplayName
e.g., "Direct Request Details", "SSH/us-east-1", etc.
internal/display/display.go:37
↓ 3 callers
Function
maxInt
(a, b int)
internal/display/display.go:116
↓ 2 callers
Function
FormatFullResponse
(details RequestDetails)
internal/util/comparison.go:1035
↓ 2 callers
Method
GetComparisonResult
e.g., "Region: us-east-1, ID: xyz", "Workflow Run ID: 12345"
internal/display/display.go:40
↓ 2 callers
Method
GetDirectDisplayName
()
internal/display/display.go:36
↓ 2 callers
Method
ShouldSkipBodyDiff
ShouldSkipBodyDiff indicates if the body diff section should be skipped.
internal/display/display.go:45
↓ 2 callers
Function
buildTableRows
Helper to build table rows from two columns
internal/display/display.go:137
↓ 2 callers
Function
compareDatesAndRecord
Helper function to compare dates and record differences
internal/util/comparison.go:681
↓ 2 callers
Method
executeRemoteCheck
executeRemoteCheck is a generic method to execute remote SSH checks.
internal/providers/aws/ec2.go:456
↓ 2 callers
Function
formatCertLines
(cert *x509.Certificate, certErr string, compare *x509.Certificate, styles DisplayStyles, isLeft bool)
internal/display/display.go:233
↓ 2 callers
Function
formatExtKeyUsages
Helper function to format ExtKeyUsages
internal/util/comparison.go:1210
↓ 2 callers
Function
formatIPAddresses
Helper function to format IP addresses
internal/util/comparison.go:1271
↓ 2 callers
Function
formatKeyUsage
Helper function to format KeyUsage
internal/util/comparison.go:1174
↓ 2 callers
Function
formatRequestLines
Helper to format request details lines
internal/display/display.go:124
↓ 2 callers
Function
getCertDisplay
(cert *x509.Certificate)
internal/display/display.go:222
↓ 2 callers
Function
getKeyFile
(keyPath string, passphrase string)
internal/providers/aws/ec2.go:686
↓ 2 callers
Method
getSshClient
getSshClient establishes or returns an existing SSH client for the provider. It centralizes SSH connection logic.
internal/providers/ssh/ssh.go:155
↓ 2 callers
Function
min
(a, b int)
internal/providers/aws/apigateway.go:519
↓ 2 callers
Function
parseCookieNames
(setCookieHeaders []string)
internal/util/comparison.go:321
↓ 2 callers
Function
renderSideBySideTable
Helper to render a side-by-side table
internal/display/display.go:153
↓ 2 callers
Method
transferRunnerScriptToTarget
(ctx context.Context, clientGetter func(context.Context) (*ssh.Client, error), targetPath string, logPrefix st
internal/providers/aws/ec2.go:648
↓ 1 callers
Method
CheckURLs
CheckURLs performs checks for the given URLs comparing between SSH and EC2 instance
internal/providers/aws/ec2.go:339
↓ 1 callers
Method
CheckURLs
CheckURLs performs checks for the given URLs using GitLab Pipelines.
internal/providers/gitlab/gitlab.go:330
↓ 1 callers
Method
CheckURLs
CheckURLs performs checks for the given URLs using Bitbucket Pipelines.
internal/providers/bitbucket/bitbucket.go:308
↓ 1 callers
Function
CloseGeoLiteDB
CloseGeoLiteDB closes the MaxMind database. Should be deferred after InitGeoLiteDB.
internal/util/geolocation.go:38
↓ 1 callers
Function
GenerateDiffOutput
GenerateDiffOutput takes two strings and generates a side-by-side, colored diff string using lipgloss for rendering, based on LCS.
internal/util/comparison.go:177
↓ 1 callers
Function
GetFormattedHeaderDiffElements
(comp ComparisonResult)
internal/util/comparison.go:406
↓ 1 callers
Function
GetGeoLocationForIP
GetGeoLocationForIP looks up an IP address in the MaxMind database and returns its geolocation.
internal/util/geolocation.go:45
↓ 1 callers
Function
GetMapKeys
GetMapKeys returns a slice of keys from a map. This is a generic function that works with any comparable key type and any value type.
internal/util/stringutil.go:20
↓ 1 callers
Method
GetProcessingError
()
internal/display/display.go:31
↓ 1 callers
Method
GetProviderSubDetails
e.g., "API Gateway Request", "GitHub Action Request"
internal/display/display.go:38
↓ 1 callers
Method
GetTargetGeoCountry
()
internal/display/display.go:28
↓ 1 callers
Method
GetTargetGeoRegion
()
internal/display/display.go:29
↓ 1 callers
Method
GetTargetHostname
()
internal/display/display.go:26
↓ 1 callers
Method
GetTargetResolvedIP
()
internal/display/display.go:27
↓ 1 callers
Method
GetURL
()
internal/display/display.go:25
↓ 1 callers
Function
InitGeoLiteDB
Global variable to hold the opened DB reader InitGeoLiteDB opens the MaxMind GeoLite2 database file. It should be called once during application start
internal/util/geolocation.go:28
↓ 1 callers
Method
IsPotentialBypass
()
internal/display/display.go:41
↓ 1 callers
Function
NewBitbucketProvider
NewBitbucketProvider creates and initializes a new Bitbucket Provider.
internal/providers/bitbucket/bitbucket.go:186
↓ 1 callers
Function
NewEC2Provider
NewEC2Provider creates a new EC2 dual SSH provider instance.
internal/providers/aws/ec2.go:150
↓ 1 callers
Function
NewGitLabProvider
NewGitLabProvider creates and initializes a new GitLab Provider.
internal/providers/gitlab/gitlab.go:123
↓ 1 callers
Function
NewProvider
NewProvider creates a new SSH Comparison provider instance.
internal/providers/ssh/ssh.go:107
↓ 1 callers
Function
NewProvider
(ctx context.Context, accessKeyID, secretAccessKey, regionFlagValue string, allRegionsFlag bool)
internal/providers/aws/apigateway.go:108
↓ 1 callers
Function
NewProvider
NewProvider creates and initializes a new GitHub Provider. workflowFile parameter is removed, uses internal constant newtownerWorkflowFileName.
internal/providers/github/github.go:122
↓ 1 callers
Function
NewProvider
NewProvider creates and initializes a new Cloudflare Provider.
internal/providers/cloudflare/cloudflare.go:130
↓ 1 callers
Function
ReadURLsFromFile
ReadURLsFromFile reads a file line by line, trims whitespace from each line, and returns a slice of non-empty strings (URLs).
internal/util/fileutil.go:12
↓ 1 callers
Method
TransferRunnerScript
TransferRunnerScript copies the http_check_runner.py script (from a hardcoded local path) to the remote server at the path specified by p.remotePython
internal/providers/ssh/ssh.go:502
↓ 1 callers
Method
TransferRunnerScript
TransferRunnerScript copies the http_check_runner.py script to both SSH instances over scp
internal/providers/aws/ec2.go:636
↓ 1 callers
Function
compareBoolAndRecord
Helper function to compare boolean values and record differences
internal/util/comparison.go:693
↓ 1 callers
Function
compareExtKeyUsageAndRecord
Helper function to compare ExtKeyUsage and record differences
internal/util/comparison.go:717
↓ 1 callers
Function
compareExtKeyUsageSlices
Helper function to compare ExtKeyUsage slices (order independent)
internal/util/comparison.go:1156
↓ 1 callers
Function
compareKeyUsageAndRecord
Helper function to compare KeyUsage and record differences
internal/util/comparison.go:705
↓ 1 callers
Function
compareNetIPSlices
Helper function to compare IP addresses
internal/util/comparison.go:1253
↓ 1 callers
Function
compareSANsAndRecord
Helper function to compare Subject Alternative Names and record differences
internal/util/comparison.go:729
↓ 1 callers
Function
compareSSLCertificates
Helper function to compare two SSL certificates and populate comparison result
internal/util/comparison.go:557
↓ 1 callers
Function
compareStringSlices
Helper function to compare string slices (order independent for SANs, etc.)
internal/util/comparison.go:1138
↓ 1 callers
Method
createAPIGatewayV1
createAPIGatewayV1 uses the passed region-specific client.
internal/providers/aws/apigateway.go:366
↓ 1 callers
Method
deleteAPIGatewayV1
deleteAPIGatewayV1 uses the passed region-specific client.
internal/providers/aws/apigateway.go:503
↓ 1 callers
Method
deployWorker
deployWorker deploys the Cloudflare Worker script and returns the worker URL.
internal/providers/cloudflare/cloudflare.go:219
↓ 1 callers
Method
detectRegions
detectRegions attempts to automatically detect geographic regions for both EC2 and SSH hosts using IP geolocation and AWS region mapping.
internal/providers/aws/ec2.go:709
↓ 1 callers
Method
downloadAndParseArtifactsBatch
downloadAndParseArtifact downloads, unzips, and parses the artifact files. This function is now modified to downloadAndParseArtifactsBatch and handle
internal/providers/github/github.go:503
↓ 1 callers
Method
downloadAndParseArtifactsBatch
downloadAndParseArtifactsBatch downloads and parses the result.json artifact from a specific job in a pipeline. It now returns the job ID of the job f
internal/providers/gitlab/gitlab.go:213
↓ 1 callers
Method
downloadAndParseArtifactsBatch
downloadAndParseArtifactsBatch downloads and parses the result.json artifact from a specific step in a pipeline.
internal/providers/bitbucket/bitbucket.go:646
↓ 1 callers
Function
ensureMMDBFile
ensureMMDBFile checks if the MaxMind DB file exists, and if not, or if forceUpdate is true, downloads it.
cmd/newtowner/main.go:137
↓ 1 callers
Method
executeEC2Check
executeEC2Check executes HTTP check via the primary EC2 instance.
internal/providers/aws/ec2.go:451
↓ 1 callers
Method
executeRemoteSshCheck
executeRemoteSshCheck connects to the remote server, runs the http_check_runner.py script (saving output to a temp file), downloads the temp file via
internal/providers/ssh/ssh.go:316
↓ 1 callers
Method
executeSSHCheck
executeSSHCheck executes HTTP check via the secondary SSH instance.
internal/providers/aws/ec2.go:446
↓ 1 callers
Function
formatRequestDetailsTable
formatRequestDetailsTable creates a side-by-side string for direct and provider requests.
internal/display/display.go:176
↓ 1 callers
Function
formatSSLCertificateComparisonTable
formatSSLCertificateComparisonTable creates a side-by-side string for SSL certificate differences.
internal/display/display.go:273
↓ 1 callers
Function
generateLCSDiffOperations
generateLCSDiffOperations performs a line-based LCS diff and returns a sequence of operations.
internal/util/comparison.go:122
↓ 1 callers
Method
getClientForRegion
(targetRegion string)
internal/providers/aws/apigateway.go:178
↓ 1 callers
Function
getKeyFile
(keyPath string, passphrase string)
internal/providers/ssh/ssh.go:294
↓ 1 callers
Method
getWorkerScript
getWorkerScript returns the JavaScript code for the Cloudflare Worker. In a production environment, this could be embedded or read from a file.
internal/providers/cloudflare/cloudflare.go:270
↓ 1 callers
Method
getWorkflowIDByName
getWorkflowIDByName fetches the ID of a workflow by its filename.
internal/providers/github/github.go:168
↓ 1 callers
Function
handleCertParseFailure
Helper to handle cases where certificate parsing failed
internal/util/comparison.go:750
↓ 1 callers
Function
isIgnorableDirectError
isIgnorableDirectError checks if the error message from a direct request indicates a type of error (like TLS handshake failures) that should be consid
internal/util/comparison.go:515
↓ 1 callers
Method
makeWorkerRequest
makeWorkerRequest sends a request to the Cloudflare Worker with the specified URLs.
internal/providers/cloudflare/cloudflare.go:576
↓ 1 callers
Function
make_request
Makes an HTTP GET request and returns details as a dictionary.
scripts/http_check_runner.py:14
↓ 1 callers
Function
max
(a, b int)
internal/util/comparison.go:314
next →
1–100 of 244, ranked by callers