rest

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	// contains filtered or unexported fields
}

func (*Context) Fill

func (ctx *Context) Fill(requestID uint64, constructor int64, p proto.Message, kvs ...*rony.KeyValue)

func (*Context) GetInt32

func (ctx *Context) GetInt32(key string, defaultValue int32) int32

func (*Context) GetInt64

func (ctx *Context) GetInt64(key string, defaultValue int64) int64

func (*Context) GetString

func (ctx *Context) GetString(key string, defaultValue string) string

func (*Context) MultiPart

func (ctx *Context) MultiPart() (*multipart.Form, error)

func (*Context) Set

func (ctx *Context) Set(key string, value interface{})

type Factory

type Factory struct {
	// contains filtered or unexported fields
}

func NewFactory

func NewFactory(
	onRequest func(ctx *Context) error,
	onResponse func(envelope *rony.MessageEnvelope) (*pools.ByteBuffer, map[string]string),
) *Factory

func (*Factory) Get

func (f *Factory) Get() gateway.ProxyHandle

func (*Factory) Release

func (f *Factory) Release(h gateway.ProxyHandle)

type Handle

type Handle struct {
	// contains filtered or unexported fields
}

func (*Handle) OnRequest

func (h *Handle) OnRequest(conn rony.Conn, ctx *gateway.RequestCtx) []byte

func (*Handle) OnResponse

func (h *Handle) OnResponse(data []byte) (*pools.ByteBuffer, map[string]string)

Jump to

Keyboard shortcuts

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