types

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EqualFunc

func EqualFunc[T constraints.Ordered](a T, b T) bool

func FloatConvert

func FloatConvert[T, V constraints.Float](v V) T

func GreaterFunc

func GreaterFunc[T constraints.Ordered](a T, b T) bool

func IntegerConvert

func IntegerConvert[T, V constraints.Integer](v V) T

func LessFunc

func LessFunc[T constraints.Ordered](a T, b T) bool

func NumberConvert

func NumberConvert[T, V constraintsi.Number](v V) T

func SignedConvert

func SignedConvert[T, V constraints.Signed](v V) T

func UnsignedConvert

func UnsignedConvert[T, V constraints.Unsigned](v V) T

func ZeroValue added in v1.0.10

func ZeroValue[T any]() T

Types

type Basic

type Basic struct {
}

type Bool

type Bool int8

func (Bool) IsFalse

func (b Bool) IsFalse() bool

func (Bool) IsNone

func (b Bool) IsNone() bool

func (Bool) IsTrue

func (b Bool) IsTrue() bool

func (Bool) MarshalBinary

func (b Bool) MarshalBinary() ([]byte, error)

MarshalBinary

func (Bool) MarshalJSON

func (b Bool) MarshalJSON() ([]byte, error)

func (Bool) MarshalText

func (b Bool) MarshalText() ([]byte, error)

MarshalText

func (Bool) String

func (b Bool) String() string

String implements Stringer.

func (*Bool) UnmarshalBinary

func (b *Bool) UnmarshalBinary(data []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler.

func (*Bool) UnmarshalJSON

func (b *Bool) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*Bool) UnmarshalText

func (b *Bool) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

type CompareFunc

type CompareFunc[T any] func(T, T) bool

type Enum

type Enum[T constraints.Integer] struct {
	Value T
}

type FloatGTValue

type FloatGTValue float64

func (FloatGTValue) Compare

func (a FloatGTValue) Compare(b FloatGTValue) bool

type FloatLTValue

type FloatLTValue float64

func (FloatLTValue) Compare

func (a FloatLTValue) Compare(b FloatLTValue) bool

type Func

type Func func()

type FuncWithErr

type FuncWithErr func() error

type GTValue

type GTValue[T constraints.Ordered] struct {
	Value T
}

func (GTValue[T]) Compare

func (a GTValue[T]) Compare(b GTValue[T]) bool

type GrpcServiceMethod added in v1.2.12

type GrpcServiceMethod[REQ, RES any] func(context.Context, REQ) (RES, error)

type ID added in v1.1.0

type ID[T constraintsi.ID] struct {
	Id T `json:"id"`
}

type Int

type Int int

func (Int) Key

func (s Int) Key() int

type LTValue

type LTValue[T constraints.Ordered] struct {
	Value T
}

func (LTValue[T]) Compare

func (a LTValue[T]) Compare(b GTValue[T]) bool

type String

type String string

func (String) Key

func (s String) Key() string

type TaskFunc

type TaskFunc func(context.Context)

type TaskFuncWithErr

type TaskFuncWithErr func(context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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