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

Struct BasicAuth

config/http_config.go:139–148  ·  view source on GitHub ↗

BasicAuth contains basic HTTP authentication credentials.

Source from the content-addressed store, hash-verified

137
138// BasicAuth contains basic HTTP authentication credentials.
139type BasicAuth struct {
140 Username string `yaml:"username,omitempty" json:"username,omitempty"`
141 UsernameFile string `yaml:"username_file,omitempty" json:"username_file,omitempty"`
142 // UsernameRef is the name of the secret within the secret manager to use as the username.
143 UsernameRef string `yaml:"username_ref,omitempty" json:"username_ref,omitempty"`
144 Password Secret `yaml:"password,omitempty" json:"password,omitempty"`
145 PasswordFile string `yaml:"password_file,omitempty" json:"password_file,omitempty"`
146 // PasswordRef is the name of the secret within the secret manager to use as the password.
147 PasswordRef string `yaml:"password_ref,omitempty" json:"password_ref,omitempty"`
148}
149
150// SetDirectory joins any relative file paths with dir.
151func (a *BasicAuth) SetDirectory(dir string) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected