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

Method GetTrustDomain

pkg/cmd/attestation/api/client.go:291–297  ·  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

289// GetTrustDomain returns the current trust domain. If the default is used
290// the empty string is returned
291func (c *LiveClient) GetTrustDomain() (string, error) {
292 u, err := safeurl.JoinPath(MetaPath)
293 if err != nil {
294 return "", err
295 }
296 return c.getTrustDomain(u)
297}
298
299func (c *LiveClient) getTrustDomain(u safeurl.SafeURL) (string, error) {
300 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