Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RequestLoggerKey = contextKey("logger")
RequestLoggerKey is the key that holds the logger instance in a request context
Functions ¶
Types ¶
type Config ¶
type Config struct { Addr string TLSDisable bool TLSCert string TLSKey string Logger *logrus.Logger Auth authenticator.Authenticator Princs principals.Principals Signer signer.Signer }
Config represents the config of the API webserver.
type Login ¶
type Login struct { User string `json:"user" binding:"required"` Password string `json:"password" binding:"required"` PubKey string `json:"public_key" binding:"required"` }
Login represents credentials expected by SMK server
type StatusRecorder ¶ added in v0.5.0
type StatusRecorder struct { http.ResponseWriter Status int }
StatusRecorder is an object allowing http response status code to be logger
func (*StatusRecorder) WriteHeader ¶ added in v0.5.0
func (r *StatusRecorder) WriteHeader(status int)
WriteHeader set StatusRecorder Status field with http response status code
Click to show internal directories.
Click to hide internal directories.