Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/WCY-dt/ponghub
/ functions
Functions
191 in github.com/WCY-dt/ponghub
⨍
Functions
191
◇
Types & classes
32
↓ 48 callers
Method
resolveSpecialParameter
resolveSpecialParameter resolves non-datetime special parameters
internal/common/params/params.go:31
↓ 42 callers
Method
Error
()
internal/notifier/channels/utils.go:20
↓ 32 callers
Function
writeToFile
writeToFile is a helper function that writes to file and handles errors
internal/notifier/notify.go:311
↓ 30 callers
Function
NewParameterResolver
NewParameterResolver creates a new parameter resolver with current time
internal/common/params/params.go:23
↓ 29 callers
Method
ResolveParameters
ResolveParameters resolves dynamic parameters in a string
internal/common/params/params.go:222
↓ 10 callers
Function
NewWebhookNotifier
NewWebhookNotifier creates a new generic webhook notifier
internal/notifier/channels/webhook.go:25
↓ 9 callers
Method
Send
Send sends a generic webhook notification with enhanced configuration support
internal/notifier/channels/webhook.go:30
↓ 8 callers
Function
NewEmailNotifier
NewEmailNotifier creates a new email notifier
internal/notifier/channels/email.go:20
↓ 7 callers
Method
String
String returns the string representation of the CheckResult
internal/types/types/chk_result/chk_result.go:20
↓ 7 callers
Function
logIfTest
logIfTest logs the message only if we're in test mode
internal/checker/utils.go:25
↓ 6 callers
Function
GetLogPath
GetLogPath returns the default path to the data file where logs are stored
internal/types/types/default_config/default_config.go:105
↓ 5 callers
Function
countEndpoints
countEndpoints counts the total number of endpoints in the map
internal/notifier/notify.go:302
↓ 5 callers
Method
generateRandomString
generateRandomString generates a random string of specified length
internal/common/params/handlers.go:18
↓ 4 callers
Function
GetConfigPath
GetConfigPath returns the default path to the configuration file
internal/types/types/default_config/default_config.go:100
↓ 4 callers
Function
GetReportPath
GetReportPath returns the default path to the HTML report file
internal/types/types/default_config/default_config.go:110
↓ 4 callers
Function
loadLinesFromFile
loadLinesFromFile loads lines from a text file
internal/common/params/file_loader.go:12
↓ 4 callers
Method
mathOperation
(input, operation string)
internal/common/params/handlers.go:120
↓ 4 callers
Function
writeResponseBody
writeResponseBody writes response body if available and not too long
internal/notifier/notify.go:235
↓ 3 callers
Method
HighlightChanges
HighlightChanges creates a highlighted version showing what parts were replaced
internal/common/params/params.go:306
↓ 3 callers
Function
NewDefaultNotifier
NewDefaultNotifier creates a new default notifier
internal/notifier/channels/default.go:18
↓ 3 callers
Method
Send
Send sends an email notification with secure SMTP connection
internal/notifier/channels/email.go:25
↓ 3 callers
Method
buildEmailBody
buildEmailBody constructs the email body with proper headers
internal/notifier/channels/email.go:167
↓ 3 callers
Function
collectCertProblemEndpoints
collectCertProblemEndpoints finds all endpoints whose certificates are expired or expiring soon
internal/notifier/notify.go:149
↓ 3 callers
Function
collectUnavailableEndpoints
collectUnavailableEndpoints finds all endpoints with status NONE
internal/notifier/notify.go:136
↓ 3 callers
Function
convertToHistory
convertToHistory converts logger history entries to reporter history format, sorts them by time and returns only the last displayNum entries.
internal/types/structures/reporter/utils.go:13
↓ 3 callers
Method
formatTimeWithPattern
formatTimeWithPattern converts Go time format patterns to actual values
internal/common/params/handlers.go:41
↓ 3 callers
Method
maskSensitiveValue
maskSensitiveValue creates a masked version of a sensitive value
internal/common/params/params.go:202
↓ 3 callers
Function
removeExistingNotifyFile
removeExistingNotifyFile removes the existing notify file if it exists
internal/notifier/notify.go:162
↓ 3 callers
Method
sendMessage
sendMessage sends the actual email message using the SMTP client
internal/notifier/channels/email.go:135
↓ 3 callers
Function
writeFailureDetails
writeFailureDetails writes failure details if available
internal/notifier/notify.go:223
↓ 2 callers
Method
AddEntry
AddEntry adds a new entry to the history entry list.
internal/types/structures/logger/utils.go:33
↓ 2 callers
Function
CheckServices
CheckServices checks all services defined in the configuration
internal/checker/services.go:12
↓ 2 callers
Method
CleanExpiredEntries
CleanExpiredEntries removes entries older than maxDays from the history entry list.
internal/types/structures/logger/utils.go:9
↓ 2 callers
Function
FilterLogs
FilterLogs filters the previous log to include only services and endpoints present in the current check results
internal/common/logger.go:39
↓ 2 callers
Function
GetLog
GetLog writes check results to JSON file
internal/logger/log_result.go:12
↓ 2 callers
Function
GetReport
GetReport generates a report based on the check results and log data
internal/reporter/report.go:18
↓ 2 callers
Function
ReadConfigs
ReadConfigs loads the configuration from a YAML file at the specified path
internal/configure/config.go:15
↓ 2 callers
Function
ReadLogs
ReadLogs loads log data from file or returns empty data
internal/common/logger.go:12
↓ 2 callers
Function
SendNotifications
SendNotifications sends notifications through various channels using the notification manager
internal/notifier/notify.go:51
↓ 2 callers
Function
SetDefaultMaxRetryTimes
SetDefaultMaxRetryTimes sets the default maxRetryTimes count for a given configuration pointer
internal/types/types/default_config/default_config.go:45
↓ 2 callers
Function
SetDefaultTimeout
SetDefaultTimeout sets the default timeout for a given configuration pointer
internal/types/types/default_config/default_config.go:38
↓ 2 callers
Function
WriteLog
WriteLog writes log data to file
internal/logger/log_result.go:30
↓ 2 callers
Function
WriteNotifications
WriteNotifications sends notifications based on the service check results
internal/notifier/notify.go:22
↓ 2 callers
Function
WriteReport
WriteReport generates an HTML report from the provided log data
internal/reporter/report.go:98
↓ 2 callers
Function
createHTTPClient
HTTPClient creates an HTTP client with optional TLS configuration
internal/notifier/channels/utils.go:37
↓ 2 callers
Method
formatRecipients
formatRecipients formats the recipient list for the To header
internal/notifier/channels/email.go:192
↓ 2 callers
Method
getServiceName
getServiceName returns the name of the service at the given index
internal/notifier/manager.go:105
↓ 2 callers
Function
getTestResult
getTestResult determines the test result based on the success count and actual attempts
internal/checker/utils.go:32
↓ 2 callers
Method
resolveSpecialParameterWithSecret
resolveSpecialParameterWithSecret resolves parameters for display with sensitive data masking
internal/common/params/params.go:184
↓ 2 callers
Function
runMainFunctionality
runMainFunctionality runs the main functionality for testing purposes. If copyExistingLog is true, it copies the existing log file to a temporary loca
cmd/ponghub/main_test.go:30
↓ 2 callers
Method
timeCalculation
(input, operation string)
internal/common/params/handlers.go:225
↓ 2 callers
Function
writeCertificateStatus
writeCertificateStatus writes the certificate status with appropriate emoji and message
internal/notifier/notify.go:276
↓ 2 callers
Function
writeNotificationReport
writeNotificationReport writes the complete notification report to the file
internal/notifier/notify.go:171
↓ 1 callers
Function
GetDefaultCertNotifyDays
GetDefaultCertNotifyDays returns the default number of days to notify before certificate expiration
internal/types/types/default_config/default_config.go:33
↓ 1 callers
Function
GetDefaultMaxLogDays
GetDefaultMaxLogDays returns the default maximum number of days to keep logs
internal/types/types/default_config/default_config.go:28
↓ 1 callers
Function
GetDefaultMaxRetryTimes
GetDefaultMaxRetryTimes returns the default maxRetryTimes count for service checks
internal/types/types/default_config/default_config.go:23
↓ 1 callers
Function
GetDefaultTimeout
GetDefaultTimeout returns the default timeout for service checks
internal/types/types/default_config/default_config.go:18
↓ 1 callers
Function
GetDisplayNum
GetDisplayNum returns the default number of logs per endpoint to display in the HTML report
internal/types/types/default_config/default_config.go:71
↓ 1 callers
Function
GetNotifyPath
GetNotifyPath returns the default path to the notification template file
internal/types/types/default_config/default_config.go:120
↓ 1 callers
Method
GetOriginalValue
GetOriginalValue returns the original template value for configuration display
internal/common/params/params.go:301
↓ 1 callers
Method
GetResolvedValue
GetResolvedValue returns the resolved value for display purposes
internal/common/params/params.go:296
↓ 1 callers
Function
GetTemplatePath
GetTemplatePath returns the default path to the HTML template file
internal/types/types/default_config/default_config.go:115
↓ 1 callers
Function
IsALL
IsALL checks if the CheckResult is ALL
internal/types/types/chk_result/chk_result.go:39
↓ 1 callers
Method
IsEnabled
IsEnabled returns whether notifications are enabled
internal/notifier/manager.go:113
↓ 1 callers
Function
LoadFakeDomains
LoadFakeDomains loads fake domains from file
internal/common/params/file_loader.go:72
↓ 1 callers
Function
LoadFirstNames
LoadFirstNames loads first names from file
internal/common/params/file_loader.go:52
↓ 1 callers
Function
LoadLastNames
LoadLastNames loads last names from file
internal/common/params/file_loader.go:62
↓ 1 callers
Function
LoadUserAgents
LoadUserAgents loads user agent strings from file
internal/common/params/file_loader.go:39
↓ 1 callers
Function
MergeLogs
MergeLogs merges previous log data with current check results and cleans up old entries
internal/common/logger.go:88
↓ 1 callers
Function
NewNotificationManager
NewNotificationManager creates a new notification manager
internal/notifier/manager.go:19
↓ 1 callers
Function
ParseCheckResult
ParseCheckResult parses a string into a CheckResult
internal/types/types/chk_result/chk_result.go:44
↓ 1 callers
Function
ParseLogResult
ParseLogResult converts logger.Logger data into a reporter.Reporter format preserving config order
internal/types/structures/reporter/utils.go:37
↓ 1 callers
Method
Send
(title, message string)
internal/notifier/notify.go:18
↓ 1 callers
Method
SendNotification
SendNotification sends notification through all configured services
internal/notifier/manager.go:79
↓ 1 callers
Function
SetDefaultCertNotifyDays
SetDefaultCertNotifyDays sets the default number of days to notify before certificate expiration for a given configuration pointer
internal/types/types/default_config/default_config.go:59
↓ 1 callers
Function
SetDefaultDisplayNum
SetDefaultDisplayNum sets the default number of logs per endpoint to display in the HTML report for a given configuration pointer
internal/types/types/default_config/default_config.go:76
↓ 1 callers
Function
SetDefaultMaxLogDays
SetDefaultMaxLogDays sets the default maximum number of days to keep logs for a given configuration pointer
internal/types/types/default_config/default_config.go:52
↓ 1 callers
Function
WriteLogs
WriteLogs writes log data to file
internal/common/logger.go:30
↓ 1 callers
Method
base64Encode
(input string)
internal/common/params/handlers.go:99
↓ 1 callers
Method
base64Encode
base64Encode encodes string to base64
internal/notifier/channels/webhook.go:292
↓ 1 callers
Method
buildCustomPayload
buildCustomPayload builds payload using custom payload configuration
internal/notifier/channels/webhook.go:102
↓ 1 callers
Method
buildPayload
buildPayload constructs the webhook payload based on configuration
internal/notifier/channels/webhook.go:75
↓ 1 callers
Method
buildTemplatePayloadWithData
buildTemplatePayloadWithData builds payload using a template with provided data and content type
internal/notifier/channels/webhook.go:145
↓ 1 callers
Function
calcMergedStatus
calcMergedStatus merges multiple statuses into a single status
internal/common/status.go:6
↓ 1 callers
Function
checkEndpoint
checkEndpoint checks a single port based on the provided configuration
internal/checker/endpoints.go:19
↓ 1 callers
Function
checkSSLCertificates
checkSSLCertificates checks the SSL certificates of the URL
internal/checker/cert.go:21
↓ 1 callers
Function
contains
Helper function to check if string contains substring
internal/notifier/channels/webhook_test.go:432
↓ 1 callers
Function
copyLogFile
copyLogFile copies the log file from srcPath to dstPath. If srcPath doesn't exist, it creates an empty JSON object file at dstPath.
cmd/ponghub/main_test.go:82
↓ 1 callers
Function
createTemplateFunc
createTemplateFunc defines custom template functions for the report
internal/reporter/report.go:148
↓ 1 callers
Method
generateFakeDomain
()
internal/common/params/handlers.go:221
↓ 1 callers
Method
generateFakeEmail
()
internal/common/params/handlers.go:209
↓ 1 callers
Method
generateFakeName
()
internal/common/params/handlers.go:217
↓ 1 callers
Method
generateFakePhone
()
internal/common/params/handlers.go:213
↓ 1 callers
Method
generateFileExtension
()
internal/common/params/handlers.go:205
↓ 1 callers
Method
generateHSLColor
()
internal/common/params/handlers.go:194
↓ 1 callers
Method
generateHexColor
()
internal/common/params/handlers.go:183
↓ 1 callers
Method
generateMimeType
()
internal/common/params/handlers.go:201
↓ 1 callers
Function
generateNotificationMessage
generateNotificationMessage creates a formatted message for notifications
internal/notifier/notify.go:76
↓ 1 callers
Method
generateRGBColor
()
internal/common/params/handlers.go:187
↓ 1 callers
Method
generateSecureRandomString
generateSecureRandomString generates a cryptographically secure random string
internal/common/params/handlers.go:31
next →
1–100 of 191, ranked by callers