parcel

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultErrorPacket = NewErrorPacket()
)

Functions

func Recycle

func Recycle(p ...*RocPacket)

Types

type ErrorPackager

type ErrorPackager interface {
	Error400(c *context.Context) []byte
	Error500(c *context.Context) []byte
	Error404(c *context.Context) []byte
	Error405(c *context.Context) []byte
}

type ErrorPacket

type ErrorPacket struct{}

func NewErrorPacket

func NewErrorPacket() *ErrorPacket

func (*ErrorPacket) Error400 added in v1.1.1

func (e *ErrorPacket) Error400(c *context.Context) []byte

func (*ErrorPacket) Error404 added in v1.1.1

func (e *ErrorPacket) Error404(c *context.Context) []byte

func (*ErrorPacket) Error405 added in v1.1.1

func (e *ErrorPacket) Error405(c *context.Context) []byte

func (*ErrorPacket) Error500 added in v1.1.1

func (e *ErrorPacket) Error500(c *context.Context) []byte

type RocPacket

type RocPacket struct {
	B *bytes.Buffer
}

func NewPacket

func NewPacket() (p *RocPacket)

func Payload

func Payload(b []byte) *RocPacket

func PayloadIo added in v1.0.6

func PayloadIo(body io.ReadCloser) *RocPacket

func (*RocPacket) Bytes

func (r *RocPacket) Bytes() []byte

func (*RocPacket) Len

func (r *RocPacket) Len() int

func (*RocPacket) String

func (r *RocPacket) String() string

func (*RocPacket) Write

func (r *RocPacket) Write(b []byte)

Directories

Path Synopsis
Package metadata for websocket or socket from rsocket-rpc-go Metadata
Package metadata for websocket or socket from rsocket-rpc-go Metadata

Jump to

Keyboard shortcuts

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