Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddEventInfo ¶
type AuthHeader ¶
type DeleteEventInfo ¶
type DeleteEventInfo struct {
RootUIDs []string `json:"rootUIDs"`
}
type Directive ¶
type Directive struct {
Name string `json:"name"`
Arguments map[string]json.RawMessage `json:"arguments"`
}
type Event ¶
type Event struct {
TypeName string `json:"__typename"`
CommitTs uint64 `json:"commitTs"`
Operation string `json:"operation"`
Add *AddEventInfo `json:"add"`
Update *UpdateEventInfo `json:"update"`
Delete *DeleteEventInfo `json:"delete"`
}
type ExecuterInterface ¶
type ExecuterInterface interface {
Resolve(ctx context.Context, request *Request) ([]byte, *LambdaError)
}
type HandlerFunc ¶
type HttpResponseStatus ¶
type HttpResponseStatus int
type InfoField ¶
type InfoField struct {
Field SelectionField `json:"field"`
}
type Lambda ¶
type Lambda struct {
Executor ExecuterInterface
}
func New ¶
func New(executer ExecuterInterface) *Lambda
type LambdaError ¶
type LambdaError struct {
Underlying error
Status HttpResponseStatus
}
func (*LambdaError) Error ¶
func (l *LambdaError) Error() string
type MiddlewareContext ¶
type MiddlewareFunc ¶
type MiddlewareFunc func(MiddlewareContext) MiddlewareContext
type Request ¶
type Request struct {
AccessToken string `json:"X-Dgraph-AccessToken"`
Args map[string]json.RawMessage `json:"args"`
Field InfoField `json:"info"`
AuthHeader AuthHeader `json:"authHeader"`
Resolver string `json:"resolver"`
Parents json.RawMessage `json:"parents"`
Event *Event `json:"event"`
}
type SelectionField ¶
type SelectionField struct {
Alias string `json:"alias"`
Name string `json:"name"`
Arguments map[string]json.RawMessage `json:"arguments"`
Directives []Directive `json:"directives"`
SelectionSet []SelectionField `json:"slectionSet"`
}
type UpdateEventInfo ¶
Click to show internal directories.
Click to hide internal directories.