Documentation ¶
Index ¶
- Constants
- func DeductConcealedTicketPoints(ctxCtx context.Context, pointsManager *pointsmanager.Manager, ...) error
- type EnqueueTicket
- type Manager
- func (e *Manager) GetTicket(id string) EnqueueTicket
- func (e *Manager) NewEntriesAlwaysUnskippableForFree() bool
- func (e *Manager) RegisterRequest(ctx context.Context, request media.EnqueueRequest, forceAnonymous bool) (EnqueueTicket, error)
- func (e *Manager) SetNewQueueEntriesAlwaysUnskippableForFree(enabled bool)
- func (e *Manager) UserHasEnoughPointsToEnqueueConcealedEntry(ctxCtx context.Context, user auth.User) (bool, error)
Constants ¶
View Source
const TicketExpiration = 10 * time.Minute
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EnqueueTicket ¶
type EnqueueTicket interface { media.EnqueueRequest ID() string CreatedAt() time.Time RequestedBy() auth.User PaymentAddress() string SerializeForAPI() *proto.EnqueueMediaTicket RequestPricing() pricer.EnqueuePricing SetPaid() error SetFailedDueToInsufficientPoints() Status() proto.EnqueueMediaTicketStatus StatusChanged() event.NoArgEvent ForceEnqueuing(proto.ForcedTicketEnqueueType) EnqueuingForced() (bool, proto.ForcedTicketEnqueueType) }
EnqueueTicket is a request to enqueue media that is pending payment
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages requests for enqueuing that are pending payment
func New ¶
func New( workerContext context.Context, log *log.Logger, statsClient *statsd.Client, mediaQueue *mediaqueue.MediaQueue, pricer *pricer.Pricer, paymentAccountPool *payment.PaymentAccountPool, rewardsHandler *rewards.Handler, pointsManager *pointsmanager.Manager, moderationStore moderation.Store, modLogWebhook api.WebhookClient) (*Manager, error)
New returns a new Manager
func (*Manager) GetTicket ¶
func (e *Manager) GetTicket(id string) EnqueueTicket
func (*Manager) NewEntriesAlwaysUnskippableForFree ¶
func (*Manager) RegisterRequest ¶
func (e *Manager) RegisterRequest(ctx context.Context, request media.EnqueueRequest, forceAnonymous bool) (EnqueueTicket, error)
func (*Manager) SetNewQueueEntriesAlwaysUnskippableForFree ¶
Click to show internal directories.
Click to hide internal directories.