misc

package
v0.0.0-...-2ac5be2 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BigInt

type BigInt struct {
	big.Int
}

BigInt contains big.Int and has some extra functions to support storage in the database with the type NUMERIC(78, 0).

func BigIntFromInt64

func BigIntFromInt64(x int64) BigInt

func BigIntFromString

func BigIntFromString(s string) (*BigInt, error)

func BigIntFromUint64

func BigIntFromUint64(x uint64) BigInt

func NewBigIntFromInt

func NewBigIntFromInt(x big.Int) BigInt

func (BigInt) MarshalJSON

func (i BigInt) MarshalJSON() ([]byte, error)

func (*BigInt) Scan

func (int *BigInt) Scan(v interface{}) error

Scan types into BigInt, supporting NUMERIC(78, 0), int64, uint64

func (*BigInt) UnmarshalJSON

func (i *BigInt) UnmarshalJSON(b []byte) error

func (BigInt) Value

func (int BigInt) Value() (sqlDriver.Value, error)

type Blob

type Blob []byte

Blob is the internal representation of a byte array that's encoded as a base64 string when on the wire and in the database

func (Blob) MarshalJSON

func (blob Blob) MarshalJSON() ([]byte, error)

func (*Blob) Scan

func (blob *Blob) Scan(v interface{}) error

func (*Blob) UnmarshalJSON

func (blob *Blob) UnmarshalJSON(b []byte) (err error)

func (Blob) Value

func (blob Blob) Value() (sqlDriver.Value, error)

Jump to

Keyboard shortcuts

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