Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
RetGal committed Aug 19, 2024
1 parent 3ad3a07 commit 1ea4968
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 32 deletions.
48 changes: 16 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# daggerverse Vault Module
# Daggerverse Vault Module

[Dagger](https://dagger.io/) module for [daggerverse](https://daggerverse.dev/) providing Vault functionality.

The Dagger module is located in the [vault-kv](./vault-kv/) directory.

## usage
## Usage

Basic usage guide.

Expand All @@ -14,7 +14,7 @@ Check the official Dagger Module documentation: https://docs.dagger.io/

The [Dagger CLI](https://docs.dagger.io/cli) is needed.

### functions
### Functions

List all functions of the module. This command is provided by the [Dagger CLI](https://docs.dagger.io/reference/cli/).

Expand All @@ -24,46 +24,30 @@ dagger functions -m ./vault-kv/

The vault-kv module is referenced locally.

## development
## Development

Basic development guide.

### setup Dagger module

Setup the Dagger module.

Create the directory for the module and initialize it.
### Set up Dagger module

```bash
mkdir vault-kv/
# enter into the module's directory
cd vault-kv/

# initialize Dagger module
dagger mod init --sdk go --name vault-kv
# initialize the module
dagger develop --sdk go
```

### setup test module

Set up the outer module to test Dagger vault-kv module.

```bash
dagger mod init --sdk go --name vault
dagger mod use ./vault-kv
```

Generate or re-generate the Go definitions file (dagger.gen.go) for use in code completion.

```bash
dagger mod install
```

The functions of the module are available by the `dag` variable. Type `dag.` in your Go file for code completion.

### Testing

Update the module:
This module contains a testing module that aims to test Dagger vault-kv module.

```bash
dagger mod update
# enter into the test module's directory
cd vault-kv/tests
# initialize the module
dagger develop --sdk go
# execute the tests
dagger call test
```

## To Do
Expand Down
4 changes: 4 additions & 0 deletions vault-kv/tests/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/dagger.gen.go linguist-generated
/internal/dagger/** linguist-generated
/internal/querybuilder/** linguist-generated
/internal/telemetry/** linguist-generated

0 comments on commit 1ea4968

Please sign in to comment.