types

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// No  二态值 否
	No int8 = 0

	// Yes  二态值 是
	Yes int8 = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Boxes added in v0.3.0

type Boxes[T any] interface {
	Box(t T)
	Unbox() T
}

Boxes Box/Unbox interface

type Empty

type Empty = struct{}

Empty empty alias type

type Fn

type Fn = func()

Fn empty argument func alias type

type Integer added in v0.5.0

type Integer interface {
	~int8 | ~int16 | ~int32 | ~int64 | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~int | ~uint
}

type JsonBox added in v0.3.0

type JsonBox[T any] struct {
	// contains filtered or unexported fields
}

JsonBox Json box for process database/sql json data

func NewJsonBox added in v0.3.0

func NewJsonBox[T any](t ...T) *JsonBox[T]

NewJsonBox create a new JsonBox instance

func (*JsonBox[T]) Box added in v0.3.0

func (j *JsonBox[T]) Box(t T)

func (*JsonBox[T]) MarshalJSON added in v0.3.0

func (j *JsonBox[T]) MarshalJSON() ([]byte, error)

func (*JsonBox[T]) Scan added in v0.3.0

func (j *JsonBox[T]) Scan(value any) error

func (*JsonBox[T]) Unbox added in v0.3.0

func (j *JsonBox[T]) Unbox() T

func (*JsonBox[T]) UnmarshalJSON added in v0.3.0

func (j *JsonBox[T]) UnmarshalJSON(data []byte) error

func (*JsonBox[T]) Value added in v0.3.0

func (j *JsonBox[T]) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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