showroom

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2019 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommentURLFromRoomID

func CommentURLFromRoomID(ctx context.Context, id int) url.URL

CommentURLFromRoomID given an id gives the url comments can be fetched from

func RecordEvent

func RecordEvent(ev []byte)

RecordEvent stores the event in the database

func WatchEvents

func WatchEvents(ctx context.Context)

WatchEvents tracks websockets events

Types

type Comment

type Comment struct {
	User
	Text string
	At   time.Time
}

Comment from chat

func FetchComments

func FetchComments(ctx context.Context, id int) []Comment

FetchComments from url

type Gift

type Gift struct {
	User
	ID     int
	Amount int
	At     time.Time
}

Gift sent

type Module

type Module struct{}

Module is the showroom module

func (Module) AddTarget

func (m Module) AddTarget(ctx context.Context, link string) (track.Target, error)

AddTarget to track

func (Module) CheckUpcoming

func (m Module) CheckUpcoming(ctx context.Context, targets []track.Target) error

CheckUpcoming streams and snipe them

func (Module) Hostname

func (m Module) Hostname() string

Hostname gives the hostname for this module

type User

type User struct {
	Name string
	ID   int
}

User in showroom

Jump to

Keyboard shortcuts

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