Vaultx.Types (Vaultx v0.7.0)

View Source

Comprehensive type definitions for Vaultx HashiCorp Vault client.

This module centralizes all type definitions used throughout the Vaultx library, providing type safety, documentation, and consistency across all modules and operations.

Type Categories

Core Types

Basic types used throughout the library for options and results.

HTTP Transport Types

Types for HTTP communication with Vault servers.

Usage

These types are primarily used for:

  • Function specifications (@spec)
  • Documentation and IDE support
  • Runtime validation where appropriate
  • Dialyzer static analysis

References

Summary

Types

body()

@type body() :: map() | String.t() | nil

headers()

@type headers() :: [{String.t(), String.t()}]

http_method()

@type http_method() :: :get | :post | :put | :delete | :patch | :list

http_result()

@type http_result() :: result(response())

options()

@type options() :: keyword()

response()

@type response() :: %{status: integer(), headers: headers(), body: term()}

result()

@type result() :: result(term())

result(success_type)

@type result(success_type) :: {:ok, success_type} | {:error, Vaultx.Base.Error.t()}