Documentation
¶
Index ¶
- Constants
- Variables
- type AcceptedJobLedger
- type AcceptedJobPosting
- type EconomicsReport
- type PayoutBatch
- type Store
- func (s Store) ConfirmPayoutBatch(ctx context.Context, batchID string, confirmation io.Reader, now time.Time) (PayoutBatch, error)
- func (s Store) CreatePayoutBatch(ctx context.Context, organizationID string, now time.Time) (PayoutBatch, error)
- func (s Store) EconomicsReport(ctx context.Context, from, until time.Time) (EconomicsReport, error)
- func (s Store) ExportPayoutBatch(ctx context.Context, batchID string, now time.Time) ([]byte, PayoutBatch, error)
- func (s Store) PostAcceptedJob(ctx context.Context, posting AcceptedJobPosting) (AcceptedJobLedger, error)
- func (s Store) PostAcceptedJobTx(ctx context.Context, tx pgx.Tx, posting AcceptedJobPosting) (AcceptedJobLedger, error)
- func (s Store) PostVerificationOverhead(ctx context.Context, posting VerificationOverheadPosting) (AcceptedJobLedger, error)
- func (s Store) PromoteAvailableCredits(ctx context.Context, now time.Time) (int64, error)
- func (s Store) ReverseTransaction(ctx context.Context, transactionID, memo string, now time.Time) (string, error)
- func (s Store) VoidPayoutBatch(ctx context.Context, batchID, memo string, now time.Time) (PayoutBatch, error)
- type VerificationOverheadPosting
Constants ¶
View Source
const ( CurrencyUSDMicro = "USD_MICRO" AccountCustomerUsage = "customer_usage_charge" AccountHostPendingCredit = "host_pending_credit" AccountHostAvailableCredit = "host_available_credit" AccountPlatformMargin = "platform_margin" AccountPlatformVerification = "platform_verification_overhead" AccountPlatformPayoutCash = "platform_payout_cash" AccountPlatformFailed = "platform_failed_attempt_overhead" TransactionJobAcceptance = "job_acceptance" TransactionHostCreditRelease = "host_credit_release" TransactionHostPayout = "host_payout" TransactionLedgerReversal = "ledger_reversal" TransactionVerificationCost = "verification_overhead" TransactionFailedAttemptCost = "failed_attempt_overhead" DefaultPlatformLedgerOwnerID = "platform_thirdshift" DefaultPayoutMemoPrefix = "Thirdshift host payout" DefaultCreditHoldDurationHours = 24 )
Variables ¶
View Source
var ( ErrDuplicatePosting = errors.New("ledger posting already exists") ErrNoAvailableCredit = errors.New("no available host credit") )
Functions ¶
This section is empty.
Types ¶
type AcceptedJobLedger ¶
type AcceptedJobPosting ¶
type EconomicsReport ¶
type PayoutBatch ¶
type Store ¶
func (Store) ConfirmPayoutBatch ¶
func (Store) CreatePayoutBatch ¶
func (Store) EconomicsReport ¶
func (Store) ExportPayoutBatch ¶
func (Store) PostAcceptedJob ¶
func (s Store) PostAcceptedJob(ctx context.Context, posting AcceptedJobPosting) (AcceptedJobLedger, error)
func (Store) PostAcceptedJobTx ¶
func (s Store) PostAcceptedJobTx(ctx context.Context, tx pgx.Tx, posting AcceptedJobPosting) (AcceptedJobLedger, error)
func (Store) PostVerificationOverhead ¶
func (s Store) PostVerificationOverhead(ctx context.Context, posting VerificationOverheadPosting) (AcceptedJobLedger, error)
func (Store) PromoteAvailableCredits ¶
func (Store) ReverseTransaction ¶
func (Store) VoidPayoutBatch ¶
Click to show internal directories.
Click to hide internal directories.