raw

package
v0.0.0-...-ca8e307 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package raw contains Raw type (alias to slice of bytes).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Raw

type Raw []byte

Raw 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.

func NewPopulatedRaw

func NewPopulatedRaw(r intn) *Raw

NewPopulatedRaw required for gogoprotobuf custom type.

func (Raw) Compare

func (r Raw) Compare(other Raw) int

Compare exists to fit gogoprotobuf custom type interface.

func (Raw) Equal

func (r Raw) Equal(other Raw) bool

Equal exists to fit gogoprotobuf custom type interface.

func (Raw) Marshal

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

Marshal encodes Raw to slice of bytes. Exists to fit gogoprotobuf custom type interface.

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)

MarshalTo exists to fit gogoprotobuf custom type interface.

func (*Raw) Scan

func (r *Raw) Scan(value interface{}) error

Scan scan value into Jsonb

func (*Raw) Size

func (r *Raw) Size() int

Size exists to fit gogoprotobuf custom type interface.

func (*Raw) Unmarshal

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

Unmarshal exists to fit gogoprotobuf custom type interface.

func (*Raw) UnmarshalJSON

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

UnmarshalJSON sets *r to a copy of data.

func (Raw) Value

func (r Raw) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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