Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { router.Config Pretty *bool `json:"pretty"` GraphiQL *bool `json:"graphiql"` DefaultEnvironment router.Environment `json:"defaultEnvironment"` }
Config is a GraphQL http server configuration
func (*Config) UnmarshalJSON ¶
UnmarshalJSON implements json unmarshaler
func (*Config) UnmarshalYAML ¶
UnmarshalYAML implements yaml unmarshaler
type Driver ¶
type Driver struct { driver.Config Type DriverKind `json:"type"` Attributes map[string]interface{} `json:"-"` Optional bool `json:"optional"` // contains filtered or unexported fields }
Driver is a driver definition for server
func (*Driver) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
type DriverKind ¶
type DriverKind uint8
DriverKind represents one of implemented drivers for handling functions
const ( Unknown DriverKind = iota Plugin Azure )
Enums representing supported drivers
func (DriverKind) MarshalJSON ¶
func (d DriverKind) MarshalJSON() (b []byte, err error)
MarshalJSON implements json.Marshaler
func (*DriverKind) UnmarshalJSON ¶
func (d *DriverKind) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements Unmarshaler
type Drivers ¶
type Drivers []Driver
Drivers is a list of supported by router
func NewDefaultDrivers ¶ added in v0.9.8
func NewDefaultDrivers() Drivers
NewDefaultDrivers returns default drivers which include local and azure driver for localhost
type DriversCloseError ¶
type DriversCloseError []error
DriversCloseError is a list of errors
func (DriversCloseError) Error ¶
func (d DriversCloseError) Error() string
type Server ¶
type Server struct { Handler http.Handler WebhookHandler http.Handler Health http.Handler Addr string }
Server default simple server that has two endpoints. /graphql which uses Handler as a handler and /health that uses Health as a handler or just returns 200. It handles SIGTERM.
func (*Server) ListenAndServe ¶
ListenAndServe is a simple wrapper around http.Server.ListenAndServe with two endpoints. It is blocking