Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Checksum ¶
type Checksum interface {
// String returns the string representation form of the Checksum.
// The String method is used to use the Checksum in functions
// where it needs to be compared or hashed.
String() string
}
Checksum is a unique identifier of an entity.
type Checksumer ¶
type Checksumer interface {
Checksum() Checksum // Checksum returns the Checksum.
SetChecksum(Checksum) // SetChecksum sets the Checksum.
}
Checksumer is implemented by every entity with a checksum.
type Equaler ¶
type Equaler interface {
// Equal returns whether the receiver is equal to the other entity.
Equal(other any) bool
}
Equaler is implemented by any entity that can be compared with another entity of the same type. The Equal method should return true if the receiver is equal to the other entity.