raw

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2016 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

package raw contains Raw type (alias to slice of bytes). This type used by Centrifugo as type for fields in structs which value we want to left untouched. For example custom application specific JSON payload data in published message. This is very similar to json.RawMessage type but have some extra methods to fit gogoprotobuf custom type interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Raw

type Raw []byte

func NewPopulatedRaw

func NewPopulatedRaw(r intn) *Raw

func (Raw) Compare

func (r Raw) Compare(other Raw) int

func (Raw) Equal

func (r Raw) Equal(other Raw) bool

func (Raw) Marshal

func (r Raw) Marshal() ([]byte, error)

func (*Raw) MarshalJSON

func (r *Raw) MarshalJSON() ([]byte, error)

MarshalJSON returns *r as the JSON encoding of r.

func (Raw) MarshalTo

func (r Raw) MarshalTo(data []byte) (n int, err error)

func (*Raw) Size

func (r *Raw) Size() int

func (*Raw) Unmarshal

func (r *Raw) Unmarshal(data []byte) error

func (*Raw) UnmarshalJSON

func (r *Raw) UnmarshalJSON(data []byte) error

UnmarshalJSON sets *r to a copy of data.

Jump to

Keyboard shortcuts

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