componentized

interface componentized:secrets/types@0.1.1-dev

since 0.1.1-dev pre-release

Types

variant secretsince 0.1.1-dev

The value of a secret.

  • string: string

    A secret that is text.

  • bytes: list<u8>

    A secret that is binary.

    Encoded text is discouraged, favor a string.

variant error-codesince 0.1.1-dev

An error getting a secret.

  • not-initialized

    The store is not initialized, call init() first.

  • not-found

    The store has no secret for the key.

  • other: option<string>

    Any other error, e.g. the store is unavailable or access to the secret is denied, with a message describing the error, when there is one.

WIT

@since(version = 0.1.1-dev)
interface types {
  /// The value of a secret.
  @since(version = 0.1.1-dev)
  variant secret {
    /// A secret that is text.
    %string(string),
    /// A secret that is binary.
    ///
    /// Encoded text is discouraged, favor a string.
    bytes(list<u8>),
  }

  /// An error getting a secret.
  @since(version = 0.1.1-dev)
  variant error-code {
    /// The store is not initialized, call `init()` first.
    not-initialized,
    /// The store has no secret for the key.
    not-found,
    /// Any other error, e.g. the store is unavailable or access to the secret is denied, with
    /// a message describing the error, when there is one.
    other(option<string>),
  }
}