MCPcopy Create free account
hub / github.com/cli/cli / GetTrustDomain

Method GetTrustDomain

pkg/cmd/attestation/api/client.go:292–298  ·  view source on GitHub ↗

GetTrustDomain returns the current trust domain. If the default is used the empty string is returned

()

Source from the content-addressed store, hash-verified

290// GetTrustDomain returns the current trust domain. If the default is used
291// the empty string is returned
292func (c *LiveClient) GetTrustDomain() (string, error) {
293 u, err := safeurl.JoinPath(MetaPath)
294 if err != nil {
295 return "", err
296 }
297 return c.getTrustDomain(u)
298}
299
300func (c *LiveClient) getTrustDomain(u safeurl.SafeURL) (string, error) {
301 var resp MetaResponse

Callers 3

NewInspectCmdFunction · 0.95
NewTrustedRootCmdFunction · 0.95
TestGetTrustDomainFunction · 0.95

Calls 2

getTrustDomainMethod · 0.95
JoinPathFunction · 0.92

Tested by 1

TestGetTrustDomainFunction · 0.76