datadef

package
v0.0.0-...-236808b Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package datadef defines some common types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalWrite

func MarshalWrite(w io.Writer, o Marshaler) error

func ReadUnmarshal

func ReadUnmarshal(r io.Reader, o Unmarshaler) error

func ReadUnmarshalValid

func ReadUnmarshalValid(r io.Reader, o ValidUnmarshaler) error

Types

type Marshaler

type Marshaler interface {
	Marshal() ([]byte, error)
}

type Unmarshaler

type Unmarshaler interface {
	Unmarshal([]byte) error
}

type ValidMarshaler

type ValidMarshaler interface {
	Valider
	Marshaler
}

type ValidUnmarshaler

type ValidUnmarshaler interface {
	Valider
	Unmarshaler
}

type Valider

type Valider interface {
	Valid() bool
}

Jump to

Keyboard shortcuts

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