plugins

package
v4.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lifecycle

type Lifecycle interface {
	BeforeTransaction(ctx context.Context, requestCtx *fasthttp.RequestCtx) context.Context
	AfterTransaction(ctx context.Context, requestCtx *fasthttp.RequestCtx) context.Context
	BeforeQuery(ctx context.Context, query string, queryCtx restql.QueryContext) context.Context
	AfterQuery(ctx context.Context, query string, result domain.Resources) context.Context
	BeforeRequest(ctx context.Context, request restql.HTTPRequest) context.Context
	AfterRequest(ctx context.Context, request restql.HTTPRequest, response restql.HTTPResponse, err error) context.Context
}

Lifecycle represent the hooks on the query execution.

var NoOpLifecycle Lifecycle = noOpLifecycle{}

NoOpLifecycle is Lifecycle implementation with no handlers.

func NewLifecycle

func NewLifecycle(log restql.Logger) (Lifecycle, error)

NewLifecycle constructs a Lifecycle instance.

Jump to

Keyboard shortcuts

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