Documentation ¶
Index ¶
- Variables
- type CleanupService
- type MemoryStore
- func (m *MemoryStore) DeleteExpired(ctx context.Context, before time.Time) error
- func (m *MemoryStore) GetLastUpdated(ctx context.Context, identifier string) (*Webhook, error)
- func (m *MemoryStore) Remove(ctx context.Context, pubkey, url string) error
- func (m *MemoryStore) Set(ctx context.Context, webhook Webhook) (*Webhook, error)
- type PgStore
- func (s *PgStore) DeleteExpired(ctx context.Context, before time.Time) error
- func (s *PgStore) GetLastUpdated(ctx context.Context, identifier string) (*Webhook, error)
- func (s *PgStore) Remove(ctx context.Context, pubkey, url string) error
- func (s *PgStore) Set(ctx context.Context, webhook Webhook) (*Webhook, error)
- type PubkeyUsername
- type Store
- type Webhook
Constants ¶
This section is empty.
Variables ¶
View Source
var CleanupInterval time.Duration = time.Hour
The interval to clean expired webhook urls.
View Source
var ExpiryDuration time.Duration = time.Hour * 24 * 30
The expiry duration is the time until a non-refreshed webhook url expires. Currently set to 30 days.
Functions ¶
This section is empty.
Types ¶
type CleanupService ¶
type CleanupService struct {
// contains filtered or unexported fields
}
func NewCleanupService ¶
func NewCleanupService(store Store) *CleanupService
func (*CleanupService) Start ¶
func (c *CleanupService) Start(ctx context.Context)
Periodically cleans up expired webhook urls.
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
func (*MemoryStore) DeleteExpired ¶
func (*MemoryStore) GetLastUpdated ¶
type PgStore ¶
type PgStore struct {
// contains filtered or unexported fields
}
func NewPgStore ¶
func (*PgStore) DeleteExpired ¶
func (*PgStore) GetLastUpdated ¶
type PubkeyUsername ¶
Click to show internal directories.
Click to hide internal directories.