amqpxprotojson

package module
v0.0.0-...-49591b2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package amqpxprotojson provides encoding body of the message using protojson.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrProtoType = fmt.Errorf("amqpxprotojson: expecting a value type proto.Message")

	DefaultMarshalOptions   = &protojson.MarshalOptions{}
	DefaultUnmarshalOptions = &protojson.UnmarshalOptions{
		DiscardUnknown: true,
	}
)

Functions

This section is empty.

Types

type Marshaler

type Marshaler struct {
	// contains filtered or unexported fields
}

func NewMarshaler

func NewMarshaler(opts ...protojson.MarshalOptions) *Marshaler

func (*Marshaler) ContentType

func (m *Marshaler) ContentType() string

func (*Marshaler) Marshal

func (m *Marshaler) Marshal(v any) ([]byte, error)

type Unmarshaler

type Unmarshaler struct {
	// contains filtered or unexported fields
}

func NewUnmarshaler

func NewUnmarshaler(opts ...protojson.UnmarshalOptions) *Unmarshaler

func (*Unmarshaler) ContentType

func (u *Unmarshaler) ContentType() string

func (*Unmarshaler) Unmarshal

func (u *Unmarshaler) Unmarshal(b []byte, v any) error

Jump to

Keyboard shortcuts

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