errors.gno
0.81 Kb · 26 lines
1package dca
2
3import (
4 "errors"
5)
6
7var (
8 // ErrInvalidInput is returned when an argument is out of its domain.
9 ErrInvalidInput = errors.New("invalid input")
10
11 // ErrOverflow is returned when a result does not fit in int64.
12 ErrOverflow = errors.New("int64 overflow")
13
14 // ErrAccumulatorBackwards is returned when the payout accumulator
15 // is below the order's debt.
16 ErrAccumulatorBackwards = errors.New("accumulator moved backwards")
17
18 // ErrInvalidCursor is returned when a schedule cursor cannot be parsed.
19 ErrInvalidCursor = errors.New("invalid cursor")
20
21 // ErrIntervalExists is returned when adding an interval already allowed.
22 ErrIntervalExists = errors.New("interval already allowed")
23
24 // ErrIntervalNotFound is returned when removing an interval not allowed.
25 ErrIntervalNotFound = errors.New("interval not allowed")
26)