Documentation ¶
Overview ¶
Package raw contains Raw type (alias to slice of bytes).
Index ¶
- type Raw
- func (r Raw) Compare(other Raw) int
- func (r Raw) Equal(other Raw) bool
- func (r Raw) Marshal() ([]byte, error)
- func (r Raw) MarshalJSON() ([]byte, error)
- func (r Raw) MarshalTo(data []byte) (n int, err error)
- func (r *Raw) Scan(value interface{}) error
- func (r *Raw) Size() int
- func (r *Raw) Unmarshal(data []byte) error
- func (r *Raw) UnmarshalJSON(data []byte) error
- func (r Raw) Value() (driver.Value, error)
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) Marshal ¶
Marshal encodes Raw to slice of bytes. Exists to fit gogoprotobuf custom type interface.
func (Raw) MarshalJSON ¶
MarshalJSON returns *r as the JSON encoding of r.
func (*Raw) UnmarshalJSON ¶
UnmarshalJSON sets *r to a copy of data.
Click to show internal directories.
Click to hide internal directories.