helpers

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2018 License: MIT Imports: 7 Imported by: 6

Documentation

Index

Constants

View Source
const (
	// SSHKeySize is the size (in bytes) of SSH key to create
	SSHKeySize = 4096
)

Variables

This section is empty.

Functions

func CreateSSH

func CreateSSH(rg io.Reader, s *i18n.Translator) (privateKey *rsa.PrivateKey, publicKeyString string, err error)

CreateSSH creates an SSH key pair.

func IsTrueBoolPointer

func IsTrueBoolPointer(b *bool) bool

IsTrueBoolPointer is a simple boolean helper function for boolean pointers

func JSONMarshal

func JSONMarshal(content interface{}, escape bool) ([]byte, error)

JSONMarshal marshals JSON w/ optional SetEscapeHTML

func JSONMarshalIndent

func JSONMarshalIndent(content interface{}, prefix, indent string, escape bool) ([]byte, error)

JSONMarshalIndent marshals formatted JSON w/ optional SetEscapeHTML

func NormalizeAzureRegion

func NormalizeAzureRegion(name string) string

NormalizeAzureRegion returns a normalized Azure region with white spaces removed and converted to lower case

func PointerToBool

func PointerToBool(b bool) *bool

PointerToBool returns a pointer to a bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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