utils

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APICommandSetup added in v0.11.0

func APICommandSetup(individualURLVariables map[misc.AstarteService]string, keyVariable, keyFileVariable string) (*client.Client, error)

APICommandSetup is a helper for setting up a generic command using Astarte API. individualURLs must contain the service->variable association.

func AskForConfirmation added in v0.10.4

func AskForConfirmation(s string) (bool, error)

AskForConfirmation asks the user if he wants to continue.

func PromptChoice added in v0.10.4

func PromptChoice(question string, defaultValue string, allowEmpty, nonInteractive bool) (string, error)

PromptChoice gets input from the user

func UnmarshalYAMLToJSON added in v0.10.4

func UnmarshalYAMLToJSON(content []byte) (map[string]interface{}, error)

UnmarshalYAMLToJSON converts a valid Kubernetes YAML resource to its JSON representation

Types

This section is empty.

Jump to

Keyboard shortcuts

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