common

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DatabaseName added in v0.1.2

func DatabaseName(cmd *cobra.Command) string

DatabaseName - gets the most preferred database name from the command flags. This is meant to be used to pick the best option when multiple flags are provided for the database-name through its different aliases. A warning is logged at the warn level if multiple flags are populated.

database name is resolved in accordance with the following note: Note: --database-name and -d are the preferred way to supply the database name. However, --database and --workspace can also be used as well. In the event that more than one of them is supplied database-name and d are preferred over all and workspace is preferred over database. The most preferred option that is supplied will be used and a message will be displayed letting you know which option was chosen if more than one were supplied.

func RestructureVersions

func RestructureVersions(in string) (objects.VaultVersionList, error)

RestructureVersions - Vault Version JSON is not well, needs some help.

func WantJSON

func WantJSON(raw []byte) ([]byte, error)

WantJSON - This function takes in JSON or YAML and will return JSON, or err

Types

type SessionData

type SessionData struct {
	SessionID  string `json:"session_id"`
	ValidUntil string `json:"valid_until"`
}

SessionData - Session Authorization Info

Jump to

Keyboard shortcuts

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