Documentation ¶
Index ¶
- Variables
- func Connect() error
- func DeleteChannel(userID, name string) error
- func GetThumb(channelName string) (d []byte, err error)
- func PutThumb(channelName string, d []byte) error
- func SetUser(userID string, token *oauth2.Token, announce bool) error
- func UpdateChannel(userID, name string, announce bool) error
- type ChannelAuth
- type ChannelDef
- type ChannelInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUserNotFound = errors.New("user not found or wrong key")
Functions ¶
func DeleteChannel ¶
func UpdateChannel ¶
Types ¶
type ChannelAuth ¶
func VerifyFTL ¶
func VerifyFTL(channelID string, nonce, hmacProvided []byte) (auth ChannelAuth, err error)
func VerifyRTMP ¶
func VerifyRTMP(u *url.URL) (auth ChannelAuth, err error)
type ChannelDef ¶
type ChannelDef struct { Name string `json:"name"` Key string `json:"key"` Announce bool `json:"announce"` FTLKey string `json:"ftl_key"` RTMPDir string `json:"rtmp_dir"` RTMPBase string `json:"rtmp_base"` }
func CreateChannel ¶
func CreateChannel(userID, name string) (def *ChannelDef, err error)
func ListChannelDefs ¶
func ListChannelDefs(userID string) (defs []*ChannelDef, err error)
func (*ChannelDef) SetURL ¶
func (d *ChannelDef) SetURL(base string)
type ChannelInfo ¶
type ChannelInfo struct { Name string `json:"name"` Live bool `json:"live"` Last int64 `json:"last"` Thumb string `json:"thumb"` LiveURL string `json:"live_url"` WebURL string `json:"web_url"` NativeURL string `json:"native_url"` Viewers int `json:"viewers"` RTC bool `json:"rtc"` }
func ListChannelInfo ¶
func ListChannelInfo() (ret []*ChannelInfo, err error)
func (*ChannelInfo) Equal ¶
func (i *ChannelInfo) Equal(j *ChannelInfo) bool
Click to show internal directories.
Click to hide internal directories.