MCPcopy
hub / github.com/perkeep/perkeep / serverAuth

Function serverAuth

pkg/client/config.go:348–355  ·  view source on GitHub ↗

serverAuth returns the auth scheme for server from the config, or the empty string if the server was not found in the config.

(server string)

Source from the content-addressed store, hash-verified

346
347// serverAuth returns the auth scheme for server from the config, or the empty string if the server was not found in the config.
348func serverAuth(server string) string {
349 configOnce.Do(parseConfig)
350 alias := config.Alias(server)
351 if alias == "" {
352 return ""
353 }
354 return config.Servers[alias].Auth
355}
356
357// SetupAuthFromString configures the clients authentication mode from
358// an explicit auth string.

Callers 1

SetupAuthMethod · 0.85

Calls 1

AliasMethod · 0.80

Tested by

no test coverage detected