tsm

package
v0.0.0-...-ca90b05 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2022 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadySubscribed = errors.New("Already subscribed")
View Source
var ErrCancelled = errors.New("Recording cancelled")
View Source
var ErrNotFound = errors.New("Not found")
View Source
var ErrUncheckable = errors.New("Unable to check if handler works")

Functions

This section is empty.

Types

type CallbackURLGetter

type CallbackURLGetter interface {
	GetCallbackURL(context.Context) (string, error)
}

type TwitchOnlineSubscriptionService

type TwitchOnlineSubscriptionService interface {
	Subscribe(string) (string, error)
	Unsubscribe(string) error
	Listen(context.Context) (<-chan TwitchStreamOnlineEvent, error)
	List() ([]TwitchStreamOnlineEventSubscription, error)
}

type TwitchStreamOnlineEvent

type TwitchStreamOnlineEvent struct {
	UserID    string    `json:"user_id"`
	UserLogin string    `json:"user_login"`
	UserName  string    `json:"user_name"`
	StartedAt time.Time `json:"started_at"`
}

type TwitchStreamOnlineEventHandler

type TwitchStreamOnlineEventHandler interface {
	Name() string
	Check(context.Context) error
	Handle(context.Context, TwitchStreamOnlineEvent) error
}

type TwitchStreamOnlineEventSubscription

type TwitchStreamOnlineEventSubscription struct {
	ID          string `json:"id"`
	Status      string `json:"status"`
	UserID      string `json:"user_id"`
	CallbackURL string `json:"callback_url"`
}

Directories

Path Synopsis
callback_url_getter
handler
subscription_service

Jump to

Keyboard shortcuts

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