serializablebigint

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

README

A simple math/big.Int wrapper to allow serialization to MessagePack and storage in SQL-based DBs.

This is also mirrored on Codeberg.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidType = errors.New("serializablebigint: invalid type")
)

Functions

This section is empty.

Types

type SerializableBigInt

type SerializableBigInt big.Int

func SerializableBigIntFromMathBigInt

func SerializableBigIntFromMathBigInt(b *big.Int) *SerializableBigInt

func (*SerializableBigInt) AsMathBigInt

func (s *SerializableBigInt) AsMathBigInt() *big.Int

func (*SerializableBigInt) ExtensionType

func (s *SerializableBigInt) ExtensionType() int8

func (*SerializableBigInt) Len

func (s *SerializableBigInt) Len() int

func (*SerializableBigInt) MarshalBinaryTo

func (s *SerializableBigInt) MarshalBinaryTo(buf []byte) error

func (*SerializableBigInt) Scan

func (s *SerializableBigInt) Scan(value any) error

func (*SerializableBigInt) UnmarshalBinary

func (s *SerializableBigInt) UnmarshalBinary(buf []byte) error

func (*SerializableBigInt) Value

func (s *SerializableBigInt) Value() (driver.Value, error)

Source Files

  • bigint.go

Jump to

Keyboard shortcuts

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