request

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HookRequest

type HookRequest struct {
	Record   interface{} `json:"record"`
	Original interface{} `json:"original"`
}

HookRequest contains records involved in a database hook.

type Request

type Request struct {
	Context context.Context
	Kind    string
	Name    string
	Param   interface{}
	Async   bool
}

Request represents data in a server to worker plugin request.

func NewAuthRequest

func NewAuthRequest(ctx context.Context, authReq *skyplugin.AuthRequest) *Request

NewAuthRequest creates a new auth request.

func NewEventRequest

func NewEventRequest(name string, data json.RawMessage) *Request

NewEventRequest creates a new event request

func NewHandlerRequest

func NewHandlerRequest(ctx context.Context, name string, input json.RawMessage) *Request

NewHandlerRequest creates a new handler request.

func NewHookRequest

func NewHookRequest(ctx context.Context, hookName string, record *skydb.Record, originalRecord *skydb.Record, async bool) *Request

NewHookRequest creates a new hook request.

func NewLambdaRequest

func NewLambdaRequest(ctx context.Context, name string, args json.RawMessage) *Request

NewLambdaRequest creates a new lambda request.

func NewTimerRequest added in v0.22.0

func NewTimerRequest(name string) *Request

NewTimerRequest creates a new timer request.

func (*Request) MarshalJSON

func (req *Request) MarshalJSON() ([]byte, error)

MarshalJSON converts a request to JSON representation.

Jump to

Keyboard shortcuts

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