Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultPathsToCheckPermission = []string{filepath.Join(folderutil.HomeDirOrDefault(""), ".config", fileutil.ExecutableName())} DefaultHostsToCheckConnectivity = []string{"scanme.sh"} DefaultResolver = "1.1.1.1:53" )
View Source
var DefaultOptions = Options{ Paths: DefaultPathsToCheckPermission, Hosts: DefaultHostsToCheckConnectivity, Resolver: DefaultResolver, }
Functions ¶
This section is empty.
Types ¶
type ConnectionInfo ¶
func CheckConnection ¶
type DnsResolveInfo ¶
type DnsResolveInfo struct { Host string Resolver string Successful bool IPAddresses []net.IPAddr Error error }
func DnsResolve ¶
func DnsResolve(host string, resolver string) DnsResolveInfo
type EnvironmentInfo ¶
type EnvironmentInfo struct { ExternalIPv4 string Admin bool Arch string Compiler string GoVersion string OSName string ProgramVersion string OutboundIPv4 string OutboundIPv6 string Ulimit Ulimit PathEnvVar string Error error }
func CollectEnvironmentInfo ¶
func CollectEnvironmentInfo(appVersion string) EnvironmentInfo
type HealthCheckInfo ¶
type HealthCheckInfo struct { EnvironmentInfo EnvironmentInfo PathPermissions []PathPermission DnsResolveInfos []DnsResolveInfo }
func Do ¶
func Do(programVersion string, options *Options) (healthCheckInfo HealthCheckInfo)
type PathPermission ¶
type PathPermission struct { Error error // contains filtered or unexported fields }
func CheckPathPermission ¶
func CheckPathPermission(path string) (pathPermission PathPermission)
CheckPathPermission checks the permissions of the given file or directory.
Click to show internal directories.
Click to hide internal directories.