serverdb

package
v0.1.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2024 License: ISC Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyStoredRV = errors.New("already stored payload at the RV point")

Functions

This section is empty.

Types

type FetchPayloadResult

type FetchPayloadResult struct {
	Payload    []byte
	InsertTime time.Time
}

type ServerDB

type ServerDB interface {
	StorePayload(ctx context.Context, rv ratchet.RVPoint, payload []byte, insertTime time.Time) error
	FetchPayload(ctx context.Context, rv ratchet.RVPoint) (*FetchPayloadResult, error)
	RemovePayload(ctx context.Context, rv ratchet.RVPoint) error
	IsSubscriptionPaid(ctx context.Context, rv ratchet.RVPoint) (bool, error)
	StoreSubscriptionPaid(ctx context.Context, rv ratchet.RVPoint, insertTime time.Time) error
	Expire(ctx context.Context, date time.Time) (uint64, error)
	IsPushPaymentRedeemed(ctx context.Context, payID []byte) (bool, error)
	StorePushPaymentRedeemed(ctx context.Context, payID []byte, insertTime time.Time) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL