gm

package module
v0.100.18 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

README

go-modules

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeginGormTx

func BeginGormTx() *gorm.DB

func CommitGormTx added in v0.100.8

func CommitGormTx(tx *gorm.DB) error

func InitGorm

func InitGorm(host string, port int64, user, password, db_name string) (err error)

func NewBigIntFromUint64 added in v0.100.13

func NewBigIntFromUint64(i uint64) *big.Int

func NewGormSession

func NewGormSession() *gorm.DB

func ReadFileBytes

func ReadFileBytes(filePath string) ([]byte, error)

func ReadFileHash

func ReadFileHash(data []byte) (string, error)

func ValidateJsonUnmarshal

func ValidateJsonUnmarshal(data []byte, v any) error

func ValidateStruct

func ValidateStruct(v any) error

Types

type Marshaler added in v0.100.13

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

Marshaler customizes the marshalling behavior for a type

type Uint128 added in v0.100.13

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

Powered By https://github.com/fardream/go-bcs.git Uint128 is like `u128` in move.

func NewUint128 added in v0.100.13

func NewUint128(s string) (*Uint128, error)

func NewUint128FromBigInt added in v0.100.13

func NewUint128FromBigInt(bigI *big.Int) (*Uint128, error)

func NewUint128FromUint64 added in v0.100.13

func NewUint128FromUint64(lo, hi uint64) *Uint128

func (Uint128) Big added in v0.100.13

func (i Uint128) Big() *big.Int

func (*Uint128) Cmp added in v0.100.13

func (i *Uint128) Cmp(j *Uint128) int

func (Uint128) MarshalBCS added in v0.100.13

func (i Uint128) MarshalBCS() ([]byte, error)

func (Uint128) MarshalJSON added in v0.100.13

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

func (*Uint128) SetBigInt added in v0.100.13

func (i *Uint128) SetBigInt(bigI *big.Int) error

func (Uint128) String added in v0.100.13

func (u Uint128) String() string

func (*Uint128) UnmarshalJSON added in v0.100.13

func (i *Uint128) UnmarshalJSON(data []byte) error

func (*Uint128) UnmarshalText added in v0.100.13

func (i *Uint128) UnmarshalText(data []byte) error

type Uint256 added in v0.100.15

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

Uint256 is like `u256` in move.

func NewUint256 added in v0.100.15

func NewUint256(s string) (*Uint256, error)

func NewUint256FromBigInt added in v0.100.15

func NewUint256FromBigInt(bigI *big.Int) (*Uint256, error)

func (Uint256) Big added in v0.100.15

func (u Uint256) Big() *big.Int

func (*Uint256) Cmp added in v0.100.15

func (i *Uint256) Cmp(j *Uint256) int

func (Uint256) MarshalBCS added in v0.100.15

func (u Uint256) MarshalBCS() ([]byte, error)

func (Uint256) MarshalJSON added in v0.100.15

func (u Uint256) MarshalJSON() ([]byte, error)

func (*Uint256) SetBigInt added in v0.100.15

func (u *Uint256) SetBigInt(bigI *big.Int) error

func (Uint256) String added in v0.100.15

func (u Uint256) String() string

func (*Uint256) UnmarshalJSON added in v0.100.15

func (u *Uint256) UnmarshalJSON(data []byte) error

func (*Uint256) UnmarshalText added in v0.100.15

func (u *Uint256) UnmarshalText(data []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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