webhooks

package
v0.0.0-...-4c708ec Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheEntry

type CacheEntry struct {
	Time     time.Time
	Webhooks []Webhook
}

type CachedStore

type CachedStore struct {
	Store
	TTL   time.Duration
	Cache map[string]CacheEntry
}

func NewCachedStore

func NewCachedStore(i Store, ttl time.Duration) *CachedStore

func (*CachedStore) List

func (s *CachedStore) List(ctx context.Context, twitch_id string) ([]Webhook, error)

type Store

type Store interface {
	List(context.Context, string) ([]Webhook, error)
	Create(context.Context, string, Webhook) (string, error)
	Read(context.Context, string) (Webhook, error)
	Update(context.Context, Webhook) error
	Delete(context.Context, string) error
}

type Webhook

type Webhook interface {
	GetID() string
	GetURL() string
	GetSecret() string
}

Jump to

Keyboard shortcuts

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