MCPcopy Create free account
hub / github.com/prometheus/common / UnmarshalJSON

Method UnmarshalJSON

config/http_config.go:247–253  ·  view source on GitHub ↗

UnmarshalJSON implements the json.Marshaler interface for URL.

(data []byte)

Source from the content-addressed store, hash-verified

245
246// UnmarshalJSON implements the json.Marshaler interface for URL.
247func (o *OAuth2) UnmarshalJSON(data []byte) error {
248 type plain OAuth2
249 if err := json.Unmarshal(data, (*plain)(o)); err != nil {
250 return err
251 }
252 return o.ProxyConfig.Validate()
253}
254
255// SetDirectory joins any relative file paths with dir.
256func (a *OAuth2) SetDirectory(dir string) {

Callers

nothing calls this directly

Calls 1

ValidateMethod · 0.45

Tested by

no test coverage detected