helper

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 9 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFullPolicyVariableID

func GetFullPolicyVariableID(client *conjurapi.Client, policyBranch string) string

func GetHomeDirectory

func GetHomeDirectory() (string, error)

func GetNamespaceLocation

func GetNamespaceLocation(namespaceName string) (string, error)

func GetPolicyVariableID

func GetPolicyVariableID(policyBranch string) string

func JsonPrettyPrint

func JsonPrettyPrint(response *conjurapi.PolicyResponse) string

func JsonPrettyPrintAppResponse

func JsonPrettyPrintAppResponse(response AppResponse) string

func JsonPrettyPrintMap

func JsonPrettyPrintMap(response map[string]interface{}) string

func JsonPrettyPrintMapArray

func JsonPrettyPrintMapArray(response []map[string]interface{}) string

func JsonPrettyPrintMembersResponse

func JsonPrettyPrintMembersResponse(response []conjurapi.MemberResponse) string

func MakeFullID

func MakeFullID(client *conjurapi.Client, kind string, id string) string

func NewResourceFilter

func NewResourceFilter(kind string, annotation string) *conjurapi.ResourceFilter

func PromptUser

func PromptUser(message string) string

func ReadFile

func ReadFile(fileName string) ([]byte, error)

func ReadMandatoryArg

func ReadMandatoryArg(index int, name string, help string, validArguments ...string) string

ReadMandatoryArg read arg, if it does not exist call WriteStdErrAndExit()

func WriteNamespaceLocation

func WriteNamespaceLocation(namespaceName string) error

func WriteStdErrAndExit

func WriteStdErrAndExit(err error)

WriteStdErrAndExit write error to stderr and os.Exit(1)

Types

type AppResponse

type AppResponse struct {
	Namespace      string
	App            string
	Safes          []string
	Authenticators []string
	ApiKey         string
}

Should I put all my structs in one file, I could not reference it from camapi without getting an error

Jump to

Keyboard shortcuts

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