Documentation
¶
Index ¶
- func AddPagenationToRequest(url string, limit, offset int) (string, error)
- func AddPagenationToRequestWithCmd(cmd *cobra.Command, url string) string
- func ExpandFile(path string) (string, error)
- func FileExists(filename string) bool
- func FormatYamlMessage(data interface{}) (string, error)
- func FullPagenationToRequest(url string) string
- func FullPath(parentFile, path string) string
- func FullPaths(parentFile, path string) string
- func GetAsMap(array []string) map[string]string
- func GetAsString(i interface{}) string
- func GetUserHome() string
- func IsJSON(s string) bool
- func JoinYAML(srcs [][]byte) ([]byte, error)
- func ListAllInstances(baseUri string, getObjects func(string) ([]interface{}, int, error)) ([]interface{}, int, error)
- func PrettyPrint(responseStr string)
- func ProcessValueFiles(valuesFilePath string) (string, error)
- func ReadYAMLFileContents(filePath string) ([]byte, error)
- func SplitYAML(src []byte) ([][]byte, error)
- func SplitYamlAndGetListByKind(src []byte) (map[string][][]byte, error)
- func StringInSlice(a string, list []string) bool
- func StringInSliceCaseInsensitive(a string, list []string) bool
- func StringOrNone(name string) string
- func StringSliceContainsDuplicates(strSlice []string) (string, bool)
- func StringsAreEqualCaseInsensitive(a, b string) bool
- type ErrorDetails
- type ParalusErrorMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPagenationToRequest ¶
Add pagination flags to a URL request
func AddPagenationToRequestWithCmd ¶
Add pagination flags to a URL request
func ExpandFile ¶
func FileExists ¶
fileExists checks if a file exists and is not a directory before we try using it to prevent further errors.
func FormatYamlMessage ¶
func GetAsString ¶
func GetAsString(i interface{}) string
func GetUserHome ¶
func GetUserHome() string
func ListAllInstances ¶
func ListAllInstances( baseUri string, getObjects func(string) ([]interface{}, int, error)) ([]interface{}, int, error)
Get all data from paginated API
func PrettyPrint ¶
func PrettyPrint(responseStr string)
func ProcessValueFiles ¶
func ReadYAMLFileContents ¶
func SplitYamlAndGetListByKind ¶
SplitYaml splits multiple yaml contents by given delimiter and returns map of kind to list of yaml(string).
func StringInSlice ¶
func StringOrNone ¶
func StringSliceContainsDuplicates ¶
StringSliceContainsDuplicates checks if the string slice contains duplicates, and returns the first duplicate, if there are multiple
Types ¶
type ErrorDetails ¶
type ParalusErrorMessage ¶
type ParalusErrorMessage struct { StatusCode int `json:"status_code,omitempty" yaml:"status_code,omitempty"` Details []ErrorDetails `json:"details,omitempty" yaml:"details,omitempty"` }
Click to show internal directories.
Click to hide internal directories.