Expand description
APIs for working with Warpgate plugins.
Macros§
- anyhow
- Construct an ad-hoc error from a string or existing non-
anyhowerror 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.
Structs§
- Data
Locator - An inline data locator.
- Empty
Input - Represents an empty input.
- Exec
Command Input - Input passed to the
exec_commandhost function. - Exec
Command Output - Output returned from the
exec_commandhost function. - File
Locator - A file system locator.
- GitHub
Locator - A GitHub release locator.
- Host
Environment - Information about the host environment (the current runtime).
- Host
LogInput - Input passed to the
host_loghost function. - Id
- A compact string identifier for use within records, key lookups, and more.
Supports unicode alphanumeric characters, forward slash
/, period., underscore_, and dash-. A leading@is supported to support npm package names. - IdError
- ID errors.
- Path
Parse Error - Error type for path parsing failures.
- Real
Path - Represents a real absolute path on the host system.
- Registry
Locator - An OCI registry locator.
- Send
Request Input - Input passed to the
send_requesthost function. - Send
Request Output - Output returned from the
send_requesthost function. - Test
Environment - Information about the current testing environment.
- UrlLocator
- A HTTPS URL locator.
- Virtual
Path - Represents a virtual absolute path on the guest system.
Enums§
- Host
Arch - Architecture of the system environment.
- Host
Libc - Libc being used in the system environment.
- Host
LogTarget - Target where host logs should be written to.
- HostOS
- Operating system of the current environment.
- Plugin
Locator - Strategies and protocols for locating plugins.
- Plugin
Locator Error - Errors during plugin locator parsing.
Statics§
- ID_
CLEAN_ PATTERN - Pattern that removes unsupported characters from an identifier.
- ID_
PATTERN - Pattern that all identifiers are matched against. Supports unicode alphanumeric
characters, forward slash
/, period., underscore_, and dash-. A leading@is supported to support npm package names.
Functions§
- convert_
to_ real_ native_ path - Convert the provided virtual guest path to a real host path,
returning a
PathBufinstead of aRealPath. If the guest path does not match any of the provided virtual paths, it will return the original path. - convert_
to_ real_ path - Convert the provided virtual guest path to a real host path.
If the guest path does not match any of the provided virtual paths,
it will return
None. - convert_
to_ virtual_ path - Convert the provided real host path to a virtual guest path.
If the host path does not match any of the provided virtual paths,
it will return
None. - sort_
paths_ list - Sort paths from longest to shortest host path, so that prefix replacing is deterministic and accurate.
Type Aliases§
- AnyResult
- Represents any result (using
anyhow).