Documentation ¶
Overview ¶
Package server contains all the server related functions of the ConfigServer app
Index ¶
- Constants
- func HTTPInternalServerError(w http.ResponseWriter, r *http.Request, detail string, params ...interface{})
- func HTTPNotFound(w http.ResponseWriter, r *http.Request, detail string, params ...interface{})
- func HTTPUnauthorized(w http.ResponseWriter, r *http.Request, detail string, params ...interface{})
- func HTTPUnsupportedMediaType(w http.ResponseWriter, r *http.Request, detail string, params ...interface{})
- func Ok(w http.ResponseWriter, content []byte, mimetype string)
- type ConfigServer
- type ProblemDetail
- type RegisterClientResponse
Constants ¶
const ( ClientSecretSeparatorChar = "|" // ClientSecretSeparatorChar is the Char used to separate client secret component ClientSecretComponents = 2 // ClientSecretComponents is the number of components used in client secrets )
const HTTPRequestDuration = "http.request.duration"
HTTPRequestDuration represents the logging key for the http request Duration
const HTTPRequestID = "http.request.id"
HTTPRequestID represents the logging key for the http request Id
const HTTPRequestMethod = "http.request.method"
HTTPRequestMethod represents the logging key for the http request Method
const HTTPRequestPath = "http.request.path"
HTTPRequestPath represents the logging key for the http request Path
const HTTPRequestStatus = "http.request.status"
HTTPRequestStatus represents the logging key for the http request Status
Variables ¶
This section is empty.
Functions ¶
func HTTPInternalServerError ¶
func HTTPInternalServerError(w http.ResponseWriter, r *http.Request, detail string, params ...interface{})
HTTPInternalServerError returns an HTTP 500 error along a RFC9457 compliant error detail
func HTTPNotFound ¶
func HTTPNotFound(w http.ResponseWriter, r *http.Request, detail string, params ...interface{})
HTTPNotFound returns an HTTP 404 error along a RFC9457 compliant error detail
func HTTPUnauthorized ¶
func HTTPUnauthorized(w http.ResponseWriter, r *http.Request, detail string, params ...interface{})
HTTPUnauthorized returns an HTTP 401 error along a RFC9457 compliant error detail
func HTTPUnsupportedMediaType ¶
func HTTPUnsupportedMediaType(w http.ResponseWriter, r *http.Request, detail string, params ...interface{})
HTTPUnsupportedMediaType returns an HTTP 415 error along a RFC9457 compliant error detail
Types ¶
type ConfigServer ¶
type ConfigServer struct {
Configuration *configuration.Configuration
}
ConfigServer is a standalone server which aims to securely serve git repositories via http
func NewConfigServer ¶
func NewConfigServer(c *configuration.Configuration) *ConfigServer
NewConfigServer initializes a new ConfigServer instance