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

Function ParseTemplateData

flags/flags.go:600–609  ·  view source on GitHub ↗

ParseTemplateData parses the set and set-file flags and returns a json message to be used in certificate templates.

(ctx *cli.Context)

Source from the content-addressed store, hash-verified

598// ParseTemplateData parses the set and set-file flags and returns a json
599// message to be used in certificate templates.
600func ParseTemplateData(ctx *cli.Context) (json.RawMessage, error) {
601 data, err := GetTemplateData(ctx)
602 if err != nil {
603 return nil, err
604 }
605 if len(data) == 0 {
606 return nil, nil
607 }
608 return json.Marshal(data)
609}
610
611// GetTemplateData parses the set and set-file flags and returns a map to be
612// used in certificate templates.

Callers 7

SignMethod · 0.92
doLoginIfNeededFunction · 0.92
loginOnUnauthorizedFunction · 0.92
loginActionFunction · 0.92
certificateActionFunction · 0.92
TestParseTemplateDataFunction · 0.85

Calls 1

GetTemplateDataFunction · 0.85

Tested by 2

TestParseTemplateDataFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…