utils

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Token string
)

Functions

func CustomMarshal

func CustomMarshal(v interface{}) ([]byte, error)

CustomMarshal marshals based on type

Types

type Options

type Options struct {
	Cas int `json:"cas,omitempty"`
}

Options check-and-set

type Request

type Request struct {
	Data     map[string]string `json:"data"`
	Options  Options           `json:"options,omitempty"`
	Versions []int             `json:"versions,omitempty"`
}

Request json type to push data

type Result

type Result struct {
	Renewable bool
	Warnings  string
	Auth      string
	Errors    []string

	Data     data
	Metadata resultMetadata

	LeaseID       string `json:"lease_id"`
	WrapInfo      string `json:"wrap_info"`
	RequestID     string `json:"request_id"`
	LeaseDuration int    `json:"lease_duration"`
}

Result json type to loop over keys

func DeleteStore

func DeleteStore(vaultEndpoint string) (Result, error)

DeleteStore deletes item with key

func FormatResult

func FormatResult(data []byte) Result

FormatResult unmarshals in to Result type

func ListStore

func ListStore(vaultEndpoint string) Result

ListStore connects to vault's pki store

func LoadStore

func LoadStore(vaultEndpoint string, data []byte) (Result, error)

LoadStore loads store with data regarding

func QueryStore

func QueryStore(vaultEndpoint string) Result

QueryStore connects to vault's pki store

Jump to

Keyboard shortcuts

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