Documentation ¶
Index ¶
- func GetPaths(filenames []string) []string
- func InitConfig()
- func LoadConfig()
- func LoadConfigByPathWOExtension(name string)
- func LoggingHandler(inner http.Handler) http.Handler
- func MakeLogger(w http.ResponseWriter) statResponseWriter
- func SendHeaders(w http.ResponseWriter)
- func SetupSvcLogging(env *string)
- func StatsHandler(w http.ResponseWriter, r *http.Request)
- type Config
- type Error
- type Telemetry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPaths ¶
GetPaths returns absolute paths for input filenames. If file exists in user's config folder, returns path to it, otherwise returns path to file in 'config/' folder. If the file starts with a '/' and exists, leaves it alone - we are using absolute paths for some reason
func InitConfig ¶
func InitConfig()
func LoadConfig ¶
func LoadConfig()
LoadConfig loads configuration using a hard-coded name This is what gets called during normal operation
func LoadConfigByPathWOExtension ¶
func LoadConfigByPathWOExtension(name string)
LoadConfigByName loads a config from a specific file Used for separating test from operational configuration
func MakeLogger ¶
func MakeLogger(w http.ResponseWriter) statResponseWriter
func SendHeaders ¶
func SendHeaders(w http.ResponseWriter)
func SetupSvcLogging ¶
func SetupSvcLogging(env *string)
func StatsHandler ¶
func StatsHandler(w http.ResponseWriter, r *http.Request)
Stats is a handler for displaying API statistics
Types ¶
type Config ¶
type Config struct { Version int Storage struct { Filepath string } Authn struct { MintKeyName string ValidateKeyName string TokenTTL int64 PwdProvider struct { PwdFileName string Salt string } } Authz struct { Provider string LDAPProvider struct { User string Password string } } }
Config is the data structure for passing configuration info
type Telemetry ¶
type Telemetry struct {
// contains filtered or unexported fields
}
Telemetry keeps all the meters for a given route
func NewTelemetry ¶
NewTelemetry generates a new telemetry handler that is properly initialized for the name