router

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2020 License: GPL-3.0, GPL-3.0-or-later Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create() *chi.Mux

Create sets up the router and middleware, and defines all API routes.

func GetCorsOptions

func GetCorsOptions() cors.Options

GetCorsOptions returns the CORS options for the API based on the environment.

func GetHealth

func GetHealth(writer http.ResponseWriter, request *http.Request)

GetHealth returns a health status.

func GetPing

func GetPing(writer http.ResponseWriter, request *http.Request)

GetPing ...

func GraphHandler

func GraphHandler(writer http.ResponseWriter, request *http.Request)

GraphHandler handles all incoming GraphQL requests.

func RefreshSchemaHandler

func RefreshSchemaHandler(writer http.ResponseWriter, request *http.Request)

RefreshSchemaHandler ...

Types

type Status

type Status struct {
	API string `json:"api"`
}

Status represents the results of a health check.

type StatusResponse

type StatusResponse struct {
	*Status
}

StatusResponse is the response payload for the Status data model.

func (*StatusResponse) Render

func (res *StatusResponse) Render(w http.ResponseWriter, r *http.Request) error

Render - renders an InvitationResponse.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL