...

Package util

import "github.com/googleapis/enterprise-certificate-proxy/client/util"
Overview
Index

Overview ▾

Package util provides helper functions for the client.

Variables

ErrConfigUnavailable is a sentinel error that indicates ECP config is unavailable, possibly due to entire config missing or missing binary path.

var ErrConfigUnavailable = errors.New("Config is unavailable")

func GetConfigFilePathFromEnv

func GetConfigFilePathFromEnv() (path string)

GetConfigFilePathFromEnv returns the path associated with environment variable GOOGLE_API_CERTIFICATE_CONFIG

func GetDefaultConfigFilePath

func GetDefaultConfigFilePath() (path string)

GetDefaultConfigFilePath returns the default path of the enterprise certificate config file created by gCloud.

func LoadSignerBinaryPath

func LoadSignerBinaryPath(configFilePath string) (path string, err error)

LoadSignerBinaryPath retrieves the path of the signer binary from the config file.

type EnterpriseCertificateConfig

EnterpriseCertificateConfig contains parameters for initializing signer.

type EnterpriseCertificateConfig struct {
    Libs Libs `json:"libs"`
}

type Libs

Libs specifies the locations of helper libraries.

type Libs struct {
    ECP string `json:"ecp"`
}