Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Logger ¶
Logger is an http middleware that logs some information about requests processed using zerolog.
func RealIP ¶ added in v0.2.0
RealIP is an http middleware that sets the request remote addr to the result of extracting the IP in the requested index from the X-Forwarded-For header. Positives indexes start by 0 and work like usual slice indexes. Negative indexes are allowed being -1 the last entry in the slice, -2 the next, etc.
Types ¶
type Handlers ¶
type Handlers struct { Router http.Handler Organizations *org.Handlers Users *user.Handlers Packages *pkg.Handlers Repositories *repo.Handlers Subscriptions *subscription.Handlers Webhooks *webhook.Handlers APIKeys *apikey.Handlers Static *static.Handlers // contains filtered or unexported fields }
Handlers groups all the http handlers defined for the hub, including the router in charge of sending requests to the right handler.
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics groups some metrics collected from a Handlers instance.
type Services ¶
type Services struct { OrganizationManager hub.OrganizationManager UserManager hub.UserManager RepositoryManager hub.RepositoryManager PackageManager hub.PackageManager SubscriptionManager hub.SubscriptionManager WebhookManager hub.WebhookManager APIKeyManager hub.APIKeyManager ImageStore img.Store Authorizer hub.Authorizer }
Services is a wrapper around several internal services used by the handlers.