Documentation ¶
Index ¶
Constants ¶
View Source
const BoltDBFile = "subscriptions.db"
BoltDBFile is the filename to store the boltdb database
View Source
const BucketName = "subscriptions"
BucketName is the bucket name to store the invitations on the bolt db
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { Has(sub *Subscription) bool Store(sub *Subscription) error Remove(sub *Subscription) error }
Repository is the interface that needs to be implemented by subscription storage
func NewBoltRepository ¶
func NewBoltRepository(dbpath string) Repository
NewBoltRepository initializes a new repository
func NewRedisRepository ¶
func NewRedisRepository(opts *redis.Options) Repository
NewRedisRepository initializes a new repository
type Subscription ¶
Subscription is a tuple that can be used to identify a mailing list user. If one is found, we are allowed to skip proof-of-work during uploading messages.
Click to show internal directories.
Click to hide internal directories.