args

package
v0.0.0-...-0c4cfe8 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPrefixToVKVPath

func AddPrefixToVKVPath(p, mountPath, apiPrefix string) string

AddPrefixToVKVPath does stuff

func EnsureNoLeadingSlash

func EnsureNoLeadingSlash(s string) string

EnsureNoLeadingSlash ensures the given string has a trailing slash.

func EnsureNoTrailingSlash

func EnsureNoTrailingSlash(s string) string

EnsureNoTrailingSlash ensures the given string has a trailing slash.

func EnsureTrailingSlash

func EnsureTrailingSlash(s string) string

EnsureTrailingSlash ensures the given string has a trailing slash.

func IsKVv2

func IsKVv2(path string, client *api.Client) (string, bool, error)

IsKVv2 check version

func KVPreflightVersionRequest

func KVPreflightVersionRequest(client *api.Client, path string) (string, int, error)

KVPreflightVersionRequest do a preflight call

func ParseArgsData

func ParseArgsData(stdin io.Reader, args []string) (map[string]interface{}, error)

ParseArgsData parses the given args in the format key=value into a map of the provided arguments. The given reader can also supply key=value pairs.

func ParseArgsDataString

func ParseArgsDataString(stdin io.Reader, args []string) (map[string]string, error)

ParseArgsDataString parses the args data and returns the values as strings. If the values cannot be represented as strings, an error is returned.

func SanitizePath

func SanitizePath(s string) string

SanitizePath removes any leading or trailing things from a "path".

func TruncateToSeconds

func TruncateToSeconds(d time.Duration) int

TruncateToSeconds truncates the given duration to the number of seconds. If the duration is less than 1s, it is returned as 0. The integer represents the whole number unit of seconds for the duration.

Types

This section is empty.

Jump to

Keyboard shortcuts

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