Documentation ¶
Index ¶
- Constants
- Variables
- func FetchVersionFrom(url string) (string, error)
- func LatestLinuxVersion() (string, error)
- func ReportLogSearch(results map[string]LogSearchResult) (string, error)
- func VerifyDefaultExcludedCIDRs(cidrs []string) ([]string, bool)
- type CheckResult
- type FileContent
- type FileContentMap
- type IssueStruct
- type LatestVersions
- type LogSearchResult
- type ParsedAccount
- type ParsedDaemonLog
- type ParsedDiag
- type ParsedNetwork
- type ParsedSettings
- type Printer
- type Releases
Constants ¶
View Source
const ( DefaultStringValue = "unknown" DefaultBoolValue = false DefaultIntValue = 0 )
Default values for struct fields
View Source
const ( WindowsReleaseURL = "https://warp-diag-checker.pages.dev/api/warp-version/windows-release" WindowsBetaURL = "https://warp-diag-checker.pages.dev/api/warp-version/windows-beta" MacReleaseURL = "https://warp-diag-checker.pages.dev/api/warp-version/mac-release" MacBetaURL = "https://warp-diag-checker.pages.dev/api/warp-version/mac-beta" LinuxVersionURL = "https://warp-diag-checker.pages.dev/api/warp-version/linux" WindowsDownloadURL = "https://install.appcenter.ms/orgs/cloudflare/apps/1.1.1.1-windows-1/distribution_groups/release" WindowsBetaDownloadURL = "https://install.appcenter.ms/orgs/cloudflare/apps/1.1.1.1-windows/distribution_groups/beta" MacDownloadURL = "https://install.appcenter.ms/orgs/cloudflare/apps/1.1.1.1-macos-1/distribution_groups/release" MacBetaDownloadURL = "https://install.appcenter.ms/orgs/cloudflare/apps/1.1.1.1-macos/distribution_groups/beta" LinuxPKGurl = "https://pkg.cloudflareclient.com/" )
Variables ¶
View Source
var Cidrs []string
View Source
var DefaultExcludedCIDRs = []string{
"10.0.0.0/8",
"100.64.0.0/10",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.168.0.0/16",
"224.0.0.0/24",
"240.0.0.0/4",
"255.255.255.255/32",
"fe80::/10",
"fd00::/8",
"ff01::/16",
"ff02::/16",
"ff03::/16",
"ff04::/16",
"ff05::/16",
}
View Source
var LogSearchOutput = map[string]LogSearchResult{}
View Source
var ZipPath string
Functions ¶
func FetchVersionFrom ¶
func LatestLinuxVersion ¶
func ReportLogSearch ¶
func ReportLogSearch(results map[string]LogSearchResult) (string, error)
Types ¶
type CheckResult ¶
type CheckResult struct { CheckName string CheckPass bool IssueType string Evidence string ReplyMessage string }
func (CheckResult) MarkdownCheckResult ¶
func (result CheckResult) MarkdownCheckResult() (string, error)
type FileContent ¶
type FileContent struct {
Data []byte
}
type FileContentMap ¶
type FileContentMap map[string]FileContent
func ExtractToMemory ¶
func ExtractToMemory(zipPath string) (zipContent FileContentMap, err error)
func (FileContentMap) DumpFiles ¶
func (zipContent FileContentMap) DumpFiles(filename string)
func (FileContentMap) GetInfo ¶
func (zipContent FileContentMap) GetInfo(zipPath string) (info ParsedDiag)
func (FileContentMap) LogSearch ¶
func (zipContent FileContentMap) LogSearch(info ParsedDiag) map[string]LogSearchResult
type IssueStruct ¶
type IssueStruct struct {
SearchTerms []string `yaml:"search_term"`
}
type LatestVersions ¶
func LatestMacVersions ¶
func LatestMacVersions() (MacVersions LatestVersions, err error)
func LatestWinVersions ¶
func LatestWinVersions() (WinVersions LatestVersions, err error)
type LogSearchResult ¶
type ParsedAccount ¶
type ParsedDaemonLog ¶
type ParsedDaemonLog struct {
DeviceProfile string
}
type ParsedDiag ¶
type ParsedDiag struct { DiagName string InstalledVersion string PlatformType string Settings ParsedSettings Account ParsedAccount Network ParsedNetwork }
func (ParsedDiag) DefaultExcludeCheck ¶
func (info ParsedDiag) DefaultExcludeCheck() (CheckResult, error)
func (ParsedDiag) ReportInfo ¶
func (info ParsedDiag) ReportInfo() (string, error)
func (ParsedDiag) SplitTunnelCheck ¶
func (info ParsedDiag) SplitTunnelCheck() (CheckResult, error)
func (ParsedDiag) VersionCheck ¶
func (info ParsedDiag) VersionCheck() (VersionCheckResult CheckResult, err error)
type ParsedNetwork ¶
type ParsedSettings ¶
type ParsedSettings struct { WarpConectionStatus bool SplitTunnelMode string SplitTunnelList []string WarpMode string FallbackDomains []string AlwaysOn bool SwitchLocked bool WiFiDisabled bool EthernetDisabled bool ResolveVia string OnboardingDialogShown bool TeamsAuth bool AutoFallback bool CaptivePortalTimeout int AllowModeSwitch bool AllowUpdates bool AllowLeaveOrg bool }
type Printer ¶
func NewPrinter ¶
func NewPrinter() *Printer
func (*Printer) PrintCheckResult ¶
func (p *Printer) PrintCheckResult(result CheckResult, err error)
func (*Printer) PrintString ¶
Click to show internal directories.
Click to hide internal directories.