Skip to content

Commit

Permalink
Comment methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
beautifulentropy committed Feb 29, 2024
1 parent cd1b41b commit 288d159
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions ratelimits/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,10 @@ func (builder *TransactionBuilder) OrdersPerAccountTransaction(regId int64) (Tra
return newTransaction(limit, bucketKey, 1)
}

// FailedAuthorizationsPerDomainPerAccountCheckOnlyTransactions returns a slice of
// Transactions for the provided order domain names. An error is returned if any
// of the order domain names are invalid.
// FailedAuthorizationsPerDomainPerAccountCheckOnlyTransactions returns a slice
// of Transactions for the provided order domain names. An error is returned if
// any of the order domain names are invalid. This method should be used for
// checking capacity, before allowing more authorizations to be created.
func (builder *TransactionBuilder) FailedAuthorizationsPerDomainPerAccountCheckOnlyTransactions(regId int64, orderDomains []string, maxNames int) ([]Transaction, error) {
if len(orderDomains) > maxNames {
return nil, fmt.Errorf("order contains more than %d DNS names", maxNames)
Expand Down Expand Up @@ -273,6 +274,10 @@ func (builder *TransactionBuilder) FailedAuthorizationsPerDomainPerAccountCheckO
return txns, nil
}

// FailedAuthorizationsPerDomainPerAccountSpendOnlyTransactions returns a slice
// of Transactions for the provided order domain names. An error is returned if
// any of the order domain names are invalid. This method should be used for
// spending capacity, as a result of a failed authorization.
func (builder *TransactionBuilder) FailedAuthorizationsPerDomainPerAccountSpendOnlyTransactions(regId int64, orderDomains []string, maxNames int) ([]Transaction, error) {
if len(orderDomains) > maxNames {
return nil, fmt.Errorf("order contains more than %d DNS names", maxNames)
Expand Down

0 comments on commit 288d159

Please sign in to comment.