Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultOptions = Options{} // DefaultGitHubScopes is the default oauth scopes to obtain when getting an // authorization from GitHub. DefaultGitHubScopes = []string{ "repo_deployment", "read:org", } )
Functions ¶
func NewAuthorizer ¶
func NewAuthorizer(clientID, clientSecret, organization string, apiURL string) authorization.Authorizer
NewAuthorizer returns a new Authorizer. If the client id is present, it will return a real Authorizer that talks to GitHub. If an empty string is provided, then it will just return a fake authorizer.
Types ¶
type HealthHandler ¶
type HealthHandler struct { // A function that returns true if empire is healthy. IsHealthy func() bool }
HealthHandler is an http.Handler that returns the health of empire.
func NewHealthHandler ¶
func NewHealthHandler(e *empire.Empire) *HealthHandler
NewHealthHandler returns a new HealthHandler using the IsHealthy method from an Empire instance.
func (*HealthHandler) ServeHTTPContext ¶
func (h *HealthHandler) ServeHTTPContext(_ context.Context, w http.ResponseWriter, r *http.Request) error
Click to show internal directories.
Click to hide internal directories.