-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinterfaces.go
More file actions
96 lines (77 loc) · 2.42 KB
/
interfaces.go
File metadata and controls
96 lines (77 loc) · 2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
package got
// Integer defines numeric types that are integers (signed or unsigned).
type Integer interface {
~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64
}
// Numeric defines numeric types that can be either integers or floating-point numbers.
type Numeric interface {
Integer | ~float32 | ~float64
}
// Ordered defines types that can be ordered.
type Ordered interface {
Integer | ~float32 | ~float64 | ~string
}
// Container defines types that implements the Contains method.
type Container[T any] interface {
Contains(T) bool
}
// Comparable defines types that implements the Compare method.
type Comparable[T any] interface {
Compare(T) int
}
// ZeroCheckable defines types that implements the IsZero method.
type ZeroCheckable interface {
IsZero() bool
}
// Identifiable defines types that implements the ID method.
type Identifiable[T any] interface {
ID() T
}
// ProductIDProvider defines types that implements the ProductID method.
type ProductIDProvider[T any] interface {
ProductID() T
}
// CustomerIDProvider defines types that implements the CustomerID method.
type CustomerIDProvider[T any] interface {
CustomerID() T
}
// EventIDProvider defines types that implements the EventID method.
type EventIDProvider[T any] interface {
EventID() T
}
// AccountIDProvider defines types that implements the AccountID method.
type AccountIDProvider[T any] interface {
AccountID() T
}
// Named defines types that implements the Name method.
type Named[T any] interface {
Name() T
}
// EventNameProvider defines types that implements the EventName method.
type EventNameProvider[T any] interface {
EventName() T
}
// ValueTimeProvider defines types that implements the ValueTime method.
type ValueTimeProvider[T any] interface {
ValueTime() T
}
// CreatedAtProvider defines types that implements the CreatedAt method.
type CreatedAtProvider[T any] interface {
CreatedAt() T
}
// UpdatedAtProvider defines types that implements the UpdatedAt method.
type UpdatedAtProvider[T any] interface {
UpdatedAt() T
}
// AmountProvider defines types that implements the Amount method.
type AmountProvider[T any] interface {
Amount() T
}
// TransactionIDProvider defines types that implements the TransactionID method.
type TransactionIDProvider[T any] interface {
TransactionID() T
}
// PriorityProvider defines types that implements the Priority method.
type PriorityProvider[T any] interface {
Priority() T
}