record

package
v0.0.0-...-a26ebea Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Record

type Record struct {
	Headers  headers.Headers   `json:"headers"`
	Metadata metadata.Metadata `json:"metadata"`
	Key      key.Key           `json:"key"`
	Val      val.Val           `json:"val"`
}

func Generate

func Generate(rand *rand.Rand) Record

Generate a random Record value.

func New

New creates and validates new Record from the given values.

func (Record) Check

func (r Record) Check() validation.ErrorGroup

Check runs default validation checks for the Record.

func (Record) Equals

func (r Record) Equals(v any) bool

Equals compares two Record instances for equality.

Interface: comparison.Equaler

func (Record) Generate

func (Record) Generate(rand *rand.Rand, size int) reflect.Value

Generate random Record values.

Interface: quick.Generator

func (Record) MarshalBinary

func (r Record) MarshalBinary() (data []byte, err error)

MarshalBinary coverts the Record instance to binary form.

Interface: encoding.BinaryMarshaler

func (Record) MarshalBinaryWriter

func (r Record) MarshalBinaryWriter(w io.Writer) error

MarshalBinaryWriter populates the io.Writer with Record fields in its binary form.

func (Record) String

func (r Record) String() string

String value of the Record.

Interface: fmt.Stringer.

func (*Record) UnmarshalBinary

func (r *Record) UnmarshalBinary(data []byte) error

UnmarshalBinary converts the binary form to a Record instance.

Interface: encoding.BinaryUnmarshaler

func (*Record) UnmarshalBinaryReader

func (r *Record) UnmarshalBinaryReader(rd io.Reader) error

UnmarshalBinaryReader populates Record fields from an io.Reader returning the binary form.

Jump to

Keyboard shortcuts

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