serializer

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API[T any] interface {
	API() T
	FromAPI(in T)
}

API holds a method to convert an underlying implementation to its API counterpart. This method uses generics to support different API entities.

type Format

type Format string
const (
	FormatJSON Format = "json"
	FormatYAML Format = "yaml"
)

type JSON

type JSON interface {
	JSON() ([]byte, error)
	FromJSON(data []byte) error
}

JSON holds a method to convert an underlying implementation to JSON format.

type YAML

type YAML interface {
	YAML() ([]byte, error)
	FromYAML(data []byte) error
}

YAML holds a method to convert an underlying implementation to YAML format.

Jump to

Keyboard shortcuts

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