Documentation
¶
Index ¶
- Constants
- Variables
- func GetMachineID() string
- func GetOSVendor() string
- func GetVersionDescription(current string, latest string) string
- func GetpdtmParams(version string) string
- func IsDevReleaseOutdated(current string, latest string) bool
- func IsOutdated(current, latest string) bool
- type AssetFormat
- type Tool
Constants ¶
const ( Organization = "projectdiscovery" UpdateCheckEndpoint = "https://api.pdtm.sh/api/v1/tools/%v" )
Variables ¶
var ( // By default when tool is updated release notes of latest version are printed HideReleaseNotes = false HideProgressBar = false VersionCheckTimeout = time.Duration(5) * time.Second DownloadUpdateTimeout = time.Duration(30) * time.Second // Note: DefaultHttpClient is only used in GetToolVersionCallback DefaultHttpClient *http.Client )
Aurora instance
Functions ¶
func GetMachineID ¶
func GetMachineID() string
GetMachineID return a unique identifier that is unique to the machine it is a sha256 hashed value with pdtm as salt
func GetOSVendor ¶
func GetOSVendor() string
Get OS Vendor returns the linux distribution vendor if not linux then returns runtime.GOOS
func GetVersionDescription ¶
GetVersionDescription returns tags like (latest) or (outdated) or (dev)
func GetpdtmParams ¶
GetpdtmParams returns encoded query parameters sent to update check endpoint
func IsDevReleaseOutdated ¶
IsDevReleaseOutdated returns true if installed tool (dev version) is outdated ex: if installed tools is v2.9.1-dev and latest release is v2.9.1 then it is outdated since v2.9.1-dev is released and merged into main/master branch
func IsOutdated ¶
IsOutdated returns true if current version is outdated
Types ¶
type AssetFormat ¶
type AssetFormat uint
const ( Zip AssetFormat = iota Tar Unknown )
func IdentifyAssetFormat ¶
func IdentifyAssetFormat(assetName string) AssetFormat
func (AssetFormat) FileExtension ¶
func (a AssetFormat) FileExtension() string
FileExtension of this asset format