toml

package module
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

xk6-ansible-vault

A k6 extension enables k6 tests to comfortably encrypt and decrypt ansible vault values. Using ansible vault in tests makes possible to publish secrets with tests in a safe way. The vault password can be pass as environment variable when test run.

The underlying implementation is https://github.com/sosedoff/ansible-vault-go

Built for k6 using xk6.

Usage

Import an entire module's contents:

import * as vault from "k6/x/ansible-vault";

Import a single export from a module:

import { encrypt, decrypt } from "k6/x/ansible-vault";

API

Functions:

For complete API documentation click here!

Build

To build a k6 binary with this extension, first ensure you have the prerequisites:

Then:

  1. Install xk6:
$ go install go.k6.io/xk6/cmd/xk6@latest
  1. Build the binary:
$ xk6 build --with github.com/szkiba/xk6-ansible-vault@latest

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct{}

func New

func New() *Module

func (*Module) Decrypt

func (m *Module) Decrypt(ciphertext, password string) (string, error)

func (*Module) Encrypt

func (m *Module) Encrypt(text, password string) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址