amqpxproto

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: 3 Imported by: 0

Documentation

Overview

Package amqpxproto provides encoding body of the message using proto.

Index

Constants

This section is empty.

Variables

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

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

Functions

This section is empty.

Types

type Marshaler

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

func NewMarshaler

func NewMarshaler(opts ...proto.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 ...proto.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