fake

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package fake is a fake Vault LogicalClient.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogicalClient

type LogicalClient struct {
	ReadFn   func(path string) (*api.Secret, error)
	WriteFn  func(path string, data map[string]any) (*api.Secret, error)
	DeleteFn func(path string) (*api.Secret, error)
}

LogicalClient is a fake LogicalClient

func (*LogicalClient) Delete

func (l *LogicalClient) Delete(path string) (*api.Secret, error)

Delete deletes secret at the given path.

func (*LogicalClient) Read

func (l *LogicalClient) Read(path string) (*api.Secret, error)

Read reads secret at the given path.

func (*LogicalClient) Write

func (l *LogicalClient) Write(path string, data map[string]any) (*api.Secret, error)

Write writes data to the given path.

Jump to

Keyboard shortcuts

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