types

package
v0.0.0-...-a839d2f Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 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 Marshaler

type Marshaler struct {
	ContentType func() string
	Marshal     func(interface{}) ([]byte, error)
}

func NewJSONMarshaler

func NewJSONMarshaler() *Marshaler

func NewXMLMarshaler

func NewXMLMarshaler() *Marshaler

type Responser

type Responser interface {
	// SetPayload - sets response payload into object.
	SetPayload(payload interface{})
	// SetError - sets error response into object.
	SetError(err error)
}

type Unmarshaler

type Unmarshaler func([]byte, interface{}) error

Marshaler func(interface{}) ([]byte, error).

Jump to

Keyboard shortcuts

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