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

Method ResetEndpointTLSMaterial

cli/context/store/store.go:179–192  ·  view source on GitHub ↗

ResetEndpointTLSMaterial removes TLS data for the given context and endpoint, and replaces it with the new data.

(contextName string, endpointName string, data *EndpointTLSData)

Source from the content-addressed store, hash-verified

177// ResetEndpointTLSMaterial removes TLS data for the given context and endpoint,
178// and replaces it with the new data.
179func (s *ContextStore) ResetEndpointTLSMaterial(contextName string, endpointName string, data *EndpointTLSData) error {
180 if err := s.tls.removeEndpoint(contextName, endpointName); err != nil {
181 return err
182 }
183 if data == nil {
184 return nil
185 }
186 for fileName, data := range data.Files {
187 if err := s.tls.createOrUpdate(contextName, endpointName, fileName, data); err != nil {
188 return err
189 }
190 }
191 return nil
192}
193
194// ListTLSFiles returns the list of TLS files present for each endpoint in the
195// context.

Callers

nothing calls this directly

Calls 2

removeEndpointMethod · 0.80
createOrUpdateMethod · 0.45

Tested by

no test coverage detected