MCPcopy
hub / github.com/smallstep/cli / ParseCaURL

Function ParseCaURL

flags/flags.go:649–656  ·  view source on GitHub ↗

ParseCaURL gets and parses the ca-url from the command context. - Require non-empty value. - Prepend an 'https' scheme if the URL does not have a scheme. - Error if the URL scheme is not implicitly or explicitly 'https'.

(ctx *cli.Context)

Source from the content-addressed store, hash-verified

647// - Prepend an 'https' scheme if the URL does not have a scheme.
648// - Error if the URL scheme is not implicitly or explicitly 'https'.
649func ParseCaURL(ctx *cli.Context) (string, error) {
650 caURL := ctx.String("ca-url")
651 if caURL == "" && !ctx.Bool("offline") {
652 return "", errs.RequiredFlag(ctx, "ca-url")
653 }
654
655 return parseCaURL(ctx, caURL)
656}
657
658// ParseCaURLIfExists gets and parses the ca-url from the command context, if
659// one is present.

Callers 13

GenerateIdentityTokenMethod · 0.92
parseAudienceFunction · 0.92
NewClientFunction · 0.92
newACMEFlowFunction · 0.92
rootActionFunction · 0.92
rekeyCertificateActionFunction · 0.92
rootsAndFederationFlowFunction · 0.92
healthActionFunction · 0.92
renewCertificateActionFunction · 0.92
tokenActionFunction · 0.92
getEncryptedKeyActionFunction · 0.92
listActionFunction · 0.92

Calls 2

parseCaURLFunction · 0.85
StringMethod · 0.65

Tested by 1

TestParseCaURLFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…