Documentation ¶
Index ¶
- Constants
- func CloseNoError(c io.Closer)
- func CreateCACertificate(commonName string) (cert []byte, key []byte, err error)
- func CreateClientCertificate(commonName string, signer *x509.Certificate, signerKey *rsa.PrivateKey, ...) (cert []byte, key []byte, err error)
- func CreateDirectoryPath(path string) error
- func CreateFile(fileName string, perm os.FileMode) (*os.File, error)
- func CreateServerCertificate(commonName string, signer *x509.Certificate, signerKey *rsa.PrivateKey, ...) (cert []byte, key []byte, err error)
- func DirectoryExists(path string) (bool, error)
- func DownloadHTTP(url string) (io.ReadCloser, error)
- func ExecCommandAndWait(name string, arg ...string) error
- func ExtractTar(in io.Reader, outDir string) error
- func FileExists(path string) (bool, error)
- func GenerateTextTemplate(templateStr string, params interface{}) []byte
- func GetUserDefaultSSHPublicKeyPath() string
- func GetUserHomeDir() string
- func IsDNS1123Label(value string) error
- func ParseCertificate(data []byte) (*x509.Certificate, error)
- func ParsePrivateKey(data []byte) (*rsa.PrivateKey, error)
- func RemoveDirectory(path string) error
- func WriteExecutableFile(path string, data []byte) error
- func WriteFile(path string, data []byte) error
- type NetworkInfo
- type TabWriter
Constants ¶
View Source
const DNS1123LabelMaxLength int = 63
Variables ¶
This section is empty.
Functions ¶
func CloseNoError ¶
func CreateCACertificate ¶
func CreateClientCertificate ¶
func CreateClientCertificate(commonName string, signer *x509.Certificate, signerKey *rsa.PrivateKey, hosts ...string) (cert []byte, key []byte, err error)
func CreateDirectoryPath ¶
func CreateServerCertificate ¶
func CreateServerCertificate(commonName string, signer *x509.Certificate, signerKey *rsa.PrivateKey, hosts ...string) (cert []byte, key []byte, err error)
func DirectoryExists ¶
func DownloadHTTP ¶
func DownloadHTTP(url string) (io.ReadCloser, error)
func ExecCommandAndWait ¶
func FileExists ¶
func GenerateTextTemplate ¶
func GetUserDefaultSSHPublicKeyPath ¶
func GetUserDefaultSSHPublicKeyPath() string
func GetUserHomeDir ¶
func GetUserHomeDir() string
func IsDNS1123Label ¶
stolen from here: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/util/validation/validation.go IsDNS1123Label tests for a string that conforms to the definition of a label in DNS (RFC 1123).
func ParseCertificate ¶
func ParseCertificate(data []byte) (*x509.Certificate, error)
func ParsePrivateKey ¶
func ParsePrivateKey(data []byte) (*rsa.PrivateKey, error)
func RemoveDirectory ¶
func WriteExecutableFile ¶
Types ¶
type NetworkInfo ¶
type NetworkInfo struct { Family string // ipv4 or ipv6 BridgeIP net.IP DHCPRangeStart net.IP DHCPRangeEnd net.IP Net *net.IPNet }
func ParseNetworkCIDR ¶
func ParseNetworkCIDR(cidr string) (*NetworkInfo, error)
type TabWriter ¶
type TabWriter struct {
// contains filtered or unexported fields
}
func NewTabWriter ¶
Click to show internal directories.
Click to hide internal directories.