MCPcopy Create free account
hub / github.com/netlify/gotrue / getConfig

Method getConfig

api/api.go:239–260  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

237}
238
239func (a *API) getConfig(ctx context.Context) *conf.Configuration {
240 obj := ctx.Value(configKey)
241 if obj == nil {
242 return nil
243 }
244
245 config := obj.(*conf.Configuration)
246
247 extConfig := (*a.config).External
248 if err := mergo.MergeWithOverwrite(&extConfig, config.External); err != nil {
249 return nil
250 }
251 config.External = extConfig
252
253 smtpConfig := (*a.config).SMTP
254 if err := mergo.MergeWithOverwrite(&smtpConfig, config.SMTP); err != nil {
255 return nil
256 }
257 config.SMTP = smtpConfig
258
259 return config
260}

Callers 15

isAdminMethod · 0.95
requestAudMethod · 0.95
getReferrerMethod · 0.95
MailerMethod · 0.95
samlCallbackMethod · 0.95
requireEmailProviderMethod · 0.95
parseJWTClaimsMethod · 0.95
RecoverMethod · 0.95
processInviteMethod · 0.95
ProviderMethod · 0.95

Calls 1

ValueMethod · 0.45

Tested by

no test coverage detected