protobsonoptions

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageCodecOptions

type MessageCodecOptions struct {
	UseProtoNames *bool // Specifies if field names should be marshaled/unmarshaled using their proto names. Defaults to false.
	*bsonoptions.StructCodecOptions
}

MessageCodecOptions represents all possible options for proto.Message encoding and decoding.

func MergeMessageCodecOptions

func MergeMessageCodecOptions(opts ...*MessageCodecOptions) *MessageCodecOptions

MergeMessageCodecOptions combines the given *MessageCodecOptions into a single *MessageCodecOptions in a last one wins fashion.

func MessageCodec

func MessageCodec() *MessageCodecOptions

MessageCodec creates a new *MessageCodecOptions.

func (*MessageCodecOptions) SetUseProtoNames

func (t *MessageCodecOptions) SetUseProtoNames(b bool) *MessageCodecOptions

SetUseProtoNames specifies if field names should be marshaled/unmarshaled using their proto names. Defaults to false.

Jump to

Keyboard shortcuts

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