Documentation ¶
Index ¶
- Variables
- func ClosePoll(ctx context.Context, b Backends, poll *poll_db.DBPoll) error
- func CreatePoll(ctx context.Context, b Backends, question, payReq, email string, ...) (int64, error)
- func StartLoops(b Backends)
- func ValidatePayout(ctx context.Context, b Backends, payReq string, expirySeconds int64) error
- type Backends
- type Option
- type Poll
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNonZeroInvoice = errors.New("Payout invoice is non-zero") ErrPayoutExpiry = errors.New("Payout invoice expires too soon") )
Functions ¶
func ClosePoll ¶
closePoll initiates the poll closing process - update the poll to closed, so that it cannot receive any more votes - return payments to voters, according to the chosen repayment scheme - pay the creator the total remaining
func CreatePoll ¶
func StartLoops ¶
func StartLoops(b Backends)
func ValidatePayout ¶
ValidatePayout ensures that the payout invoice provided by the poll creator has a 0 amount, so we can specify any payment amount and that it has a sufficient expiry buffer so that it does not expire before we can pay them out.
Types ¶
Click to show internal directories.
Click to hide internal directories.