MCPcopy Create free account
hub / github.com/docker/cli / GetTLSData

Method GetTLSData

cli/command/defaultcontextstore.go:183–195  ·  view source on GitHub ↗

GetTLSData implements store.Store's GetTLSData

(contextName, endpointName, fileName string)

Source from the content-addressed store, hash-verified

181
182// GetTLSData implements store.Store's GetTLSData
183func (s *ContextStoreWithDefault) GetTLSData(contextName, endpointName, fileName string) ([]byte, error) {
184 if contextName == DefaultContextName {
185 defaultContext, err := s.Resolver()
186 if err != nil {
187 return nil, err
188 }
189 if defaultContext.TLS.Endpoints[endpointName].Files[fileName] == nil {
190 return nil, notFound(fmt.Errorf("TLS data for %s/%s/%s does not exist", DefaultContextName, endpointName, fileName))
191 }
192 return defaultContext.TLS.Endpoints[endpointName].Files[fileName], nil
193 }
194 return s.Store.GetTLSData(contextName, endpointName, fileName)
195}
196
197// GetStorageInfo implements store.Store's GetStorageInfo
198func (s *ContextStoreWithDefault) GetStorageInfo(contextName string) store.StorageInfo {

Callers

nothing calls this directly

Calls 2

notFoundFunction · 0.70
GetTLSDataMethod · 0.65

Tested by

no test coverage detected