marshaler

package
v0.0.98 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmptyJSONPbOption

type EmptyJSONPbOption struct{}

EmptyJSONPbOption does not alter the configuration. It can be embedded in another structure to build custom options.

This API is EXPERIMENTAL.

type JSONPb

type JSONPb struct {
	runtime.JSONPb
	// contains filtered or unexported fields
}

func NewDefaultJSONPb

func NewDefaultJSONPb() *JSONPb

func NewJSONPb

func NewJSONPb(options ...JSONPbOption) *JSONPb

func (*JSONPb) ApplyOptions

func (o *JSONPb) ApplyOptions(options ...JSONPbOption) *JSONPb

type JSONPbOption

type JSONPbOption interface {
	// contains filtered or unexported methods
}

A JSONPbOption sets options.

func WithDiscardUnknown

func WithDiscardUnknown(discardUnknown bool) JSONPbOption

func WithEmitUnpopulated

func WithEmitUnpopulated(emitUnpopulated bool) JSONPbOption

func WithIndent

func WithIndent(indent string) JSONPbOption

func WithUseEnumNumbers

func WithUseEnumNumbers(useEnumNumbers bool) JSONPbOption

func WithUseProtoNames

func WithUseProtoNames(useProtoNames bool) JSONPbOption

type JSONPbOptionFunc

type JSONPbOptionFunc func(*JSONPb)

JSONPbOptionFunc wraps a function that modifies Client into an implementation of the JSONPbOption interface.

type ProtoMarshaller

type ProtoMarshaller struct {
	runtime.ProtoMarshaller
}

ProtoMarshaller is a Marshaller which marshals/unmarshals into/from serialize proto bytes

func (*ProtoMarshaller) ContentType

func (*ProtoMarshaller) ContentType(_ interface{}) string

ContentType always returns "application/x-protobuf".

Jump to

Keyboard shortcuts

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