integer

package
v0.0.0-...-286231f Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Error = errs.Class("integer")

Error is the class for this package's errors.

Functions

This section is empty.

Types

type Block

type Block struct {
	Value    []byte
	Negative bool
}

Block is a signed integer number.

func (Block) MarshalBinary

func (b Block) MarshalBinary() (data []byte, err error)

MarshalBinary implements encoding.BinaryMarshaler.

func (*Block) UnmarshalBinary

func (b *Block) UnmarshalBinary(data []byte) (err error)

UnmarshalBinary implements encoding.BinaryUnmarshaler.

type Decoder

type Decoder struct {
	// contains filtered or unexported fields
}

Decoder is a decoder.

func NewDecoder

func NewDecoder(schema Schema, cd *control.Decoder) *Decoder

NewDecoder returns a new decoder.

func (*Decoder) Decode

func (d *Decoder) Decode(b *Block) (err error)

Decode parses a block from the reader.

type Encoder

type Encoder struct {
	// contains filtered or unexported fields
}

Encoder is an encoder.

func NewEncoder

func NewEncoder(schema Schema, ce *control.Encoder) *Encoder

NewEncoder returns a new encoder.

func (*Encoder) Encode

func (e *Encoder) Encode(b *Block) (err error)

Encode write a block to the writer.

type Schema

type Schema struct {
	Signed bool

	Nullable    bool
	Key         bool
	ContentType string
}

Schema for an integer.

Jump to

Keyboard shortcuts

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