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

Method GetTrustDomain

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

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