Skip to content

Commit

Permalink
Adds documentation for arbitrary facts (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
bomoko authored Sep 30, 2022
1 parent e1658e6 commit 82b6447
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ We run through each fact Gatherer, which determines whether it is able to be run
* [Extending](#extending)
* [Adding a new gatherer](#adding-a-new-gatherer)
* [Running](#running)
* [Arbitrary Facts](#arbitrary-facts)
* [Building](#building)

## Setup
Expand Down Expand Up @@ -51,6 +52,29 @@ Although you will be doing a scan of your local machine, and will send this info

The recommended way to use this application is from inside a lagoon container, assuming this container does not have go installed you will need to [build](#building) the application.

## Arbitrary Facts

If you would like to generate facts outside of the provided fact gatherers, you can write them to a file, and then have the `file gatherer` parse and write the facts to the backend.

The structure of the file should follow closely the definition of a `GatheredFact` in `/gathers/defs.go`.

The gatherer expects the incoming file to contain an array of facts, of the following format

```
[
{
name: "fact name",
value: "value stored against name",
source: "Where this fact is sourced from",
environment: <environment ID>,
description: "description of fact",
keyFact: true|false,
category: "See /gatheres/categories.go for values"
}
]
```

## Building

To build the project for use inside a container you will need a statically linked binary.
Expand Down

0 comments on commit 82b6447

Please sign in to comment.