twitchevents

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2025 License: CC0-1.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Condition

type Condition struct {
	BroadcasterUserID string `json:"broadcaster_user_id"`
}

type Config

type Config struct {
	BlueskyAuthkey  string
	BlueskyHandle   string
	BlueskyPDS      string
	MastodonToken   string
	MastodonURL     string
	MimiAnnounceURL string
}

func (Config) BlueskyAgent

func (c Config) BlueskyAgent(ctx context.Context) (*bsky.BskyAgent, error)

type Event

type Event struct {
	Subscription Subscription    `json:"subscription"`
	Event        json.RawMessage `json:"event"`
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, dao *models.DAO, cfg Config) (*Server, error)

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Subscription

type Subscription struct {
	ID        string    `json:"id"`
	Status    string    `json:"status"`
	Type      string    `json:"type"`
	Version   string    `json:"version"`
	Condition Condition `json:"condition"`
	Transport Transport `json:"transport"`
	CreatedAt time.Time `json:"created_at"`
	Cost      int       `json:"cost"`
}

type Transport

type Transport struct {
	Method   string `json:"method"`
	Callback string `json:"callback"`
}

Jump to

Keyboard shortcuts

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