Documentation ¶
Index ¶
- Constants
- func AddCommandWithFlags(c *cobra.Command, rootArgs *RootArgs, cmds ...*cobra.Command)
- func Errorf(format string, args ...interface{})
- func FormatFnWriter(fn FormatFn) io.Writer
- func NoPrintf(format string, args ...interface{})
- func Printf(format string, args ...interface{})
- type BuildInfoType
- type FormatFn
- type OverrideEnv
- type RootArgs
- func (r *RootArgs) CreateJWKS(truncate int, verbosef FormatFn) (keyID string, pkBytes, jwksBytes []byte, err error)
- func (r *RootArgs) CreateNewKey() (keyID string, privateKey *rsa.PrivateKey, jwks *jwk.Set, err error)
- func (r *RootArgs) PrintMissingFlags(missingFlagNames []string) error
- func (r *RootArgs) Resolve(skipAuth, requireRuntime bool) error
- func (r *RootArgs) RotateJKWS(jwks *jwk.Set, truncate int) (*jwk.Set, error)
Constants ¶
const ( // GCPExperienceBase is the default management API URL for GCP Experience GCPExperienceBase = "https://apigee.googleapis.com" // LegacySaaSManagementBase is the default base for legacy SaaS management operations LegacySaaSManagementBase = "https://api.enterprise.apigee.com" // DefaultManagementBase is the base URL for GCE Experience management operations DefaultManagementBase = GCPExperienceBase // RuntimeBaseFormat is a format for base of the organization runtime URL (legacy SaaS and OPDK) RuntimeBaseFormat = "https://%s-%s.apigee.net" )
Variables ¶
This section is empty.
Functions ¶
func AddCommandWithFlags ¶
AddCommandWithFlags adds to the root command with standard flags
func Errorf ¶
func Errorf(format string, args ...interface{})
Errorf is a FormatFn that prints the formatted string to os.Stderr.
func FormatFnWriter ¶
FormatFnWriter bridges io.Writer to FormatFn
Types ¶
type BuildInfoType ¶
BuildInfoType holds version information
var BuildInfo BuildInfoType
BuildInfo is populated by main init()
type FormatFn ¶
type FormatFn func(format string, args ...interface{})
FormatFn formats the supplied arguments according to the format string provided and executes some set of operations with the result.
type OverrideEnv ¶
OverrideEnv is subconfig of overrideConfig
type RootArgs ¶
type RootArgs struct { RuntimeBase string // "https://org-env.apigee.net" ManagementBase string // "https://api.enterprise.apigee.com" Verbose bool Org string Env string Username string Password string Token string NetrcPath string IsOPDK bool IsLegacySaaS bool IsGCPManaged bool ConfigPath string InsecureSkipVerify bool Namespace string ServerConfig *server.Config // config loaded from ConfigPath // the following is derived in Resolve() InternalProxyURL string RemoteServiceProxyURL string ApigeeClient *apigee.EdgeClient ClientOpts *apigee.EdgeClientOptions }
RootArgs is the base struct to hold all command arguments
func (*RootArgs) CreateJWKS ¶
func (r *RootArgs) CreateJWKS(truncate int, verbosef FormatFn) (keyID string, pkBytes, jwksBytes []byte, err error)
CreateJWKS returns keyID, private key, jwks, error
func (*RootArgs) CreateNewKey ¶
func (r *RootArgs) CreateNewKey() (keyID string, privateKey *rsa.PrivateKey, jwks *jwk.Set, err error)
CreateNewKey returns keyID, private key, jwks, error
func (*RootArgs) PrintMissingFlags ¶
PrintMissingFlags will aggregate and print an error for the passed set of flags