Documentation ¶
Index ¶
- Variables
- func GitController(_ context.Context, r *mux.Router)
- func NewContextHandler(ctx context.Context) func(http.Handler) http.Handler
- func NewLoggingMiddleware(next http.Handler, logger *log.Logger) http.Handler
- func NewRouter(ctx context.Context) http.Handler
- type GitRoute
- type GoGetHandler
- type HTTPServer
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidHeader = errors.New("invalid authorization header")
ErrInvalidHeader is returned when the authorization header is invalid.
View Source
var ErrInvalidPassword = errors.New("invalid password")
ErrInvalidPassword is returned when the password is invalid.
View Source
var ErrInvalidToken = errors.New("invalid token")
ErrInvalidToken is returned when a token is invalid.
Functions ¶
func GitController ¶
GitController is a router for git services.
func NewContextHandler ¶
NewContextHandler returns a new context middleware. This middleware adds the config, backend, and logger to the request context.
func NewLoggingMiddleware ¶
NewLoggingMiddleware returns a new logging middleware.
Types ¶
type GitRoute ¶
type GitRoute struct {
// contains filtered or unexported fields
}
GitRoute is a route for git services.
type GoGetHandler ¶
type GoGetHandler struct{}
GoGetHandler handles go get requests.
func (GoGetHandler) ServeHTTP ¶
func (g GoGetHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
HTTPServer is an http server.
func NewHTTPServer ¶
func NewHTTPServer(ctx context.Context) (*HTTPServer, error)
NewHTTPServer creates a new HTTP server.
func (*HTTPServer) ListenAndServe ¶
func (s *HTTPServer) ListenAndServe() error
ListenAndServe starts the HTTP server.
Click to show internal directories.
Click to hide internal directories.