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 ¶
- 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) Size() int
- func (r *Raw) Unmarshal(data []byte) error
- func (r *Raw) UnmarshalJSON(data []byte) error
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) 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.