Skip to content

Valuable: An Extensible Data Retrieval Module

Atomys edited this page Jun 30, 2023 · 1 revision

Overview

Valuable is a module inspired by Kubernetes manifests, that provides an efficient and flexible way to handle data retrieval. It allows users to fetch data values in various ways, regardless of whether they're simple, non-nested values, or deeply nested data sources.

Valuable's key feature lies in its ability to interact with data structures. Data may exist as a single, unprocessed type or as nested values within more complex data structures. The application never processes or parses unprocessed fields. This feature makes Valuable particularly useful when data values contain commas.

Usage

To leverage Valuable, one should understand its data handling methods. The application employs two types of data: Unprocessed types and Processed types.

Unprocessed Types

These types remain untouched by Valuable and can be presented in three different ways:

Root Plain Text: Here, the value exists without any nesting. For example:

password: '123'

Nested Value: In this format, the value is nested within another value. Example:

password:
  value: '123'

Nested Multiple Values: This is an extension of the nested value type, but instead of a single value, it contains an array of values. Example:

password:
  values: ['123', 'abc']

Processed Types

The processed types get processed by Valuable. The valueFrom key is always processed, and it can be presented in two different ways:

Static Multiple Values: This is a comma-separated string field. For example:

password:
  valueFrom:
    staticRef: "123,456"

Environment Variables: Valuable can extract the value from the given environment variable name. It can also work with a comma-separated list. For example:

password:
  valueFrom:
    envRef: ENV_VARIABLE

By understanding these types and the methods of data handling that Valuable offers, users can customize data retrieval to suit their specific requirements.