Crate proto_pdk_test_utils

Source

Modules§

flow

Macros§

anyhow
Construct an ad-hoc error from a string or existing non-anyhow error value.
api_enum
Wrap an enum with common derives and serde required attributes.
api_struct
Wrap a struct with common derives and serde required attributes.
api_unit_enum
Wrap a unit-only enum with common derives and serde required attributes.
create_plugin
generate_build_install_tests
generate_download_install_tests
generate_native_install_tests
generate_resolve_versions_tests
generate_shims_test

Structs§

ArchiveSource
Source code is contained in an archive.
BuildInstructionsInput
Input passed to the build_instructions function.
BuildInstructionsOutput
Output returned by the build_instructions function.
BuilderInstruction
A builder and its parameters for installing the builder.
CalVer
Container for a calendar version.
Checksum
Represents a checksum for a specific algorithm.
CommandInstruction
A command and its parameters to be executed as a child process.
DependencyConfig
Configuration for one or many system dependencies (packages).
DetectVersionInput
Input passed to the detect_version_files function.
DetectVersionOutput
Output returned by the detect_version_files function.
DownloadPrebuiltInput
Input passed to the download_prebuilt function.
DownloadPrebuiltOutput
Output returned by the download_prebuilt function.
EmptyInput
Represents an empty input.
ExecCommandInput
Input passed to the exec_command host function.
ExecCommandOutput
Output returned from the exec_command host function.
ExecutableConfig
Configuration for generated shim and symlinked binary files.
FileLocator
A file system locator.
GitHubLocator
A GitHub release locator.
GitSource
Source code is located in a Git repository.
HostEnvironment
Information about the host environment (the current runtime).
HostLogInput
Input passed to the host_log host function.
Id
An identifier for plugins.
InstallHook
Input passed to the pre_install and post_install hooks, while a proto install command is running.
LoadVersionsInput
Input passed to the load_versions function.
LoadVersionsOutput
Output returned by the load_versions function.
LocateExecutablesInput
Input passed to the locate_executables function.
LocateExecutablesOutput
Output returned by the locate_executables function.
NativeInstallInput
Input passed to the native_install function.
NativeInstallOutput
Output returned by the native_install function.
NativeUninstallInput
Input passed to the native_uninstall function.
NativeUninstallOutput
Output returned by the native_uninstall function.
ParseVersionFileInput
Input passed to the parse_version_file function.
ParseVersionFileOutput
Output returned by the parse_version_file function.
ProtoConfig
ProtoEnvironment
ProtoWasmSandbox
RegisterBackendInput
Input passed to the register_backend function.
RegisterBackendOutput
Output returned by the register_backend function.
RegisterToolInput
Input passed to the register_tool function.
RegisterToolOutput
Output returned by the register_tool function.
ResolveVersionInput
Input passed to the resolve_version function.
ResolveVersionOutput
Output returned by the resolve_version function.
RunHook
Input passed to the pre_run hook, before a proto run command or language binary is ran.
RunHookResult
Output returned from the pre_run hook.
SemVer
Container for a semantic version.
SendRequestInput
Input passed to the send_request host function.
SendRequestOutput
Output returned from the send_request host function.
SyncManifestInput
Input passed to the sync_manifest function.
SyncManifestOutput
Output returned by the sync_manifest function.
SyncShellProfileInput
Input passed to the sync_shell_profile function.
SyncShellProfileOutput
Output returned by the sync_shell_profile function.
TestEnvironment
Information about the current testing environment.
Tool
ToolContext
Information about the current state of the tool.
ToolInventoryMetadata
Controls aspects of the tool inventory.
ToolManifest
ToolSpec
ToolUnresolvedContext
Information about the current state of the tool.
UnpackArchiveInput
Input passed to the unpack_archive function.
UnresolvedParser
UrlLocator
A HTTPS URL locator.
VerifyChecksumInput
Output returned by the verify_checksum function.
VerifyChecksumOutput
Output returned by the verify_checksum function.
Version
SemVer version as defined by https://semver.org.
VersionReq
SemVer version requirement describing the intersection of some version comparators, such as >=1.2.3, <1.8.
WasmTestWrapper

Enums§

Backend
BuildInstruction
An instruction to execute.
BuildRequirement
Is required and must exist in the current environment.
ChecksumAlgorithm
Supported checksum algorithms.
ChecksumError
Errors that may occur from within a plugin.
DependencyName
A system dependency name in multiple formats.
HostArch
Architecture of the system environment.
HostLibc
Libc being used in the system environment.
HostLogTarget
Target where host logs should be written to.
HostOS
Operating system of the current environment.
HostPackageManager
Package manager of the system environment.
InstallStrategy
Supported strategies for installing a tool.
ParseKind
ParsePart
PluginError
Errors that may occur from within a plugin.
PluginLocator
Strategies and protocols for locating plugins.
PluginLocatorError
Errors during plugin locator parsing.
PluginType
Supported types of plugins.
SourceLocation
The location in which source code can be acquired.
SpecError
StringOrVec
Either a string, or a list of strings.
Switch
Either a boolean representing on or off, or a string representing on with a message.
SystemDependency
Represents a system dependency (one or many packages) to install.
UnresolvedVersionSpec
Represents an unresolved version or alias that must be resolved to a fully-qualified version.
VersionSpec
Represents a resolved version or alias.
VirtualPath
A container for WASI virtual paths that can also keep a reference to the original real path.
Wasm
The Wasm type specifies how to access a WebAssembly module

Traits§

ProtoConfigBuilder

Functions§

clean_version_req_string
Cleans a version requirement string by removing * version parts, and correcting AND operators.
clean_version_string
Cleans a potential version string by removing a leading v or V.
create_empty_proto_sandbox
create_proto_sandbox
get_calver_regex
Get a regex pattern that matches calendar versions (calver). For example: 2024-02-26, 2024-12, 2024-01-alpha, etc.
get_semver_regex
Get a regex pattern that matches semantic versions (semver). For example: 1.2.3, 6.5.4, 7.8.9-alpha, etc.
is_alias_name
Returns true if the provided value is an alias. An alias is a word that maps to version, for example, “latest” -> “1.2.3”.
is_calver
Returns true if the provided value is a calendar version string.
is_semver
Returns true if the provided value is a semantic version string.
parse
Parse the provided string and determine the output format. Since an unresolved version can be many things, such as an alias, version requirement, semver, or calver, we need to parse this manually to determine the correct output.
parse_multi
Parse the provided string as a list of version requirements, as separated by ||. Each requirement will be parsed individually with parse.

Type Aliases§

AnyResult
Represents any result (using anyhow).
ProtoConsole
ToolMetadataInputDeprecated
ToolMetadataOutputDeprecated