types

package
v0.6.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

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

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

Variables

This section is empty.

Functions

func PureReader

func PureReader(r io.Reader) io.Reader

PureReader wrap a pure io.Reader object

Types

type Bitmap

type Bitmap = types.Binary[*roaringBitmap]

Bitmap alias type of types.Binary[*roaringBitmap]

func MustBitmap

func MustBitmap(data ...[]byte) (res *Bitmap)

MustBitmap create a Bitmap instance

func NewBitmap

func NewBitmap() (res *Bitmap)

NewBitmap create a Bitmap instance

type Bitmap64

type Bitmap64 = types.Binary[*roaring64Bitmap]

Bitmap64 alias type of types.Binary[*roaring64Bitmap]

func MustBitmap64

func MustBitmap64(data ...[]byte) (res *Bitmap64)

MustBitmap64 create a Bitmap64 instance

func NewBitmap64

func NewBitmap64() *Bitmap64

NewBitmap64 create a Bitmap64 instance

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)

type NullBitmap

type NullBitmap = types.NullBinary[*roaringBitmap]

NullBitmap alias type of types.NullBinary[*roaringBitmap]

func MustNullBitmap

func MustNullBitmap(data ...[]byte) (res *NullBitmap)

MustNullBitmap create a NullBitmap instance

func NewNullBitmap

func NewNullBitmap() *NullBitmap

NewNullBitmap create a NullBitmap instance

type NullBitmap64

type NullBitmap64 = types.NullBinary[*roaring64Bitmap]

NullBitmap64 alias type of types.NullBinary[*roaring64Bitmap]

func MustNullBitmap64

func MustNullBitmap64(data ...[]byte) (res *NullBitmap64)

MustNullBitmap64 create a NullBitmap64 instance

func NewNullBitmap64

func NewNullBitmap64() *NullBitmap64

NewNullBitmap64 create a NullBitmap64 instance

type PasswordProvider

type PasswordProvider interface {
	Generate(password []byte) ([]byte, error)
	Compare(hashedPassword, password []byte) error
}

func NewBcryptPasswordProvider

func NewBcryptPasswordProvider(cost int) PasswordProvider

Jump to

Keyboard shortcuts

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