Documentation
¶
Index ¶
Constants ¶
const Size = 8
Size is a size of Epoch in a binary form.
Variables ¶
This section is empty.
Functions ¶
func EQ ¶
EQ reports whether e and e2 are the same Epoch.
Function defines the relation of equality between two Epoch. Try to avoid comparison through "==" operator for better portability.
func GE ¶
GE reports whether e1 is greater or equal Epoch than e2.
Method defines the "greater or equal" relation between two Epoch. Try to avoid comparison through ">=" operator for better portability.
func GT ¶
GT reports whether e1 is greater Epoch than e2.
Method defines the "greater than" relation between two Epoch. Try to avoid comparison through ">" operator for better portability.
func LE ¶
LE reports whether e1 is less or equal Epoch than e2.
Method defines the "less or equal" relation between two Epoch. Try to avoid comparison through "<=" operator for better portability.
func LT ¶
LT reports whether e1 is less Epoch than e2.
Method defines the "less than" relation between two Epoch. Try to avoid comparison through "<" operator for better portability.
func Marshal ¶
Marshal encodes Epoch into a binary form and returns the result.
Result slice has Size length.
Types ¶
type Epoch ¶
type Epoch uint64
Epoch represents the number of NeoFS epoch.
func FromUint64 ¶
FromUint64 converts builtin uint64 value to Epoch.
Try to avoid direct cast for better portability.
func Sum ¶
Sum returns the result of summing up two Epoch.
Function defines a binary operation of summing two Epoch. Try to avoid using operator "+" for better portability.
func (*Epoch) UnmarshalBinary ¶
UnmarshalBinary unmarshals Epoch from a binary representation.
If buffer size is insufficient, io.ErrUnexpectedEOF is returned.