Documentation
¶
Index ¶
- func And[T any](preds ...func(T) bool) func(T) bool
- func False[T any](T) bool
- func Flip[T, R any](f func(T, T) R) func(T, T) R
- func InContainer[T any](s Container[T]) func(T) bool
- func InMap[K comparable, V any](m map[K]V) func(K) bool
- func InSeq[T comparable](s iter.Seq[T]) func(T) bool
- func InSet[T comparable](s map[T]struct{}) func(T) bool
- func InSlice[T comparable](s []T) func(T) bool
- func Not[T any](f func(T) bool) func(T) bool
- func Or[T any](preds ...func(T) bool) func(T) bool
- func Ternary[T any](a T, b T, f func() bool) T
- func True[T any](T) bool
- type AccountIDProvider
- type AmountProvider
- type Comparable
- type Container
- type CreatedAtProvider
- type CustomerIDProvider
- type EventIDProvider
- type EventNameProvider
- type Identifiable
- type Integer
- type Named
- type Numeric
- type Ordered
- type PriorityProvider
- type ProductIDProvider
- type TransactionIDProvider
- type UpdatedAtProvider
- type ValueTimeProvider
- type ZeroCheckable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Flip ¶
func Flip[T, R any](f func(T, T) R) func(T, T) R
Flip returns a function that swaps the arguments of a binary function.
func InContainer ¶
InContainer returns a predicate that checks if a value is in container.
func InMap ¶
func InMap[K comparable, V any](m map[K]V) func(K) bool
InMap returns a predicate that checks if a key is in a map.
func InSeq ¶
func InSeq[T comparable](s iter.Seq[T]) func(T) bool
InSeq returns a predicate that checks if a value is in a sequence.
func InSet ¶
func InSet[T comparable](s map[T]struct{}) func(T) bool
InSet returns a predicate that checks if a value is in a set.
func InSlice ¶
func InSlice[T comparable](s []T) func(T) bool
InSlice returns a predicate that checks if a value is in a slice.
Types ¶
type AccountIDProvider ¶
type AccountIDProvider[T any] interface { AccountID() T }
AccountIDProvider defines types that implements the AccountID method.
type AmountProvider ¶
type AmountProvider[T any] interface { Amount() T }
AmountProvider defines types that implements the Amount method.
type Comparable ¶
Comparable defines types that implements the Compare method.
type CreatedAtProvider ¶
type CreatedAtProvider[T any] interface { CreatedAt() T }
CreatedAtProvider defines types that implements the CreatedAt method.
type CustomerIDProvider ¶
type CustomerIDProvider[T any] interface { CustomerID() T }
CustomerIDProvider defines types that implements the CustomerID method.
type EventIDProvider ¶
type EventIDProvider[T any] interface { EventID() T }
EventIDProvider defines types that implements the EventID method.
type EventNameProvider ¶
type EventNameProvider[T any] interface { EventName() T }
EventNameProvider defines types that implements the EventName method.
type Identifiable ¶
type Identifiable[T any] interface { ID() T }
Identifiable defines types that implements the ID method.
type Integer ¶
type Integer interface {
~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64
}
Integer defines numeric types that are integers (signed or unsigned).
type Named ¶
type Named[T any] interface { Name() T }
Named defines types that implements the Name method.
type PriorityProvider ¶
type PriorityProvider[T any] interface { Priority() T }
PriorityProvider defines types that implements the Priority method.
type ProductIDProvider ¶
type ProductIDProvider[T any] interface { ProductID() T }
ProductIDProvider defines types that implements the ProductID method.
type TransactionIDProvider ¶
type TransactionIDProvider[T any] interface { TransactionID() T }
TransactionIDProvider defines types that implements the TransactionID method.
type UpdatedAtProvider ¶
type UpdatedAtProvider[T any] interface { UpdatedAt() T }
UpdatedAtProvider defines types that implements the UpdatedAt method.
type ValueTimeProvider ¶
type ValueTimeProvider[T any] interface { ValueTime() T }
ValueTimeProvider defines types that implements the ValueTime method.
type ZeroCheckable ¶
type ZeroCheckable interface {
IsZero() bool
}
ZeroCheckable defines types that implements the IsZero method.