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"`
Drivers Drivers `json:"drivers"`
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:"-"`
// 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 DriversCloseError ¶
type DriversCloseError []error
DriversCloseError is a list of errors
func (DriversCloseError) Error ¶
func (d DriversCloseError) Error() string
type Server ¶
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