Documentation ¶
Index ¶
- Constants
- func BadRequestHandler(w http.ResponseWriter, err error)
- func DisconnectInboundConnection(w http.ResponseWriter, r *http.Request)
- func ExternalGetChatMessages(integration user.ExternalAPIUser, w http.ResponseWriter, r *http.Request)
- func GetAllSocialPlatforms(w http.ResponseWriter, r *http.Request)
- func GetChatMessages(u user.User, w http.ResponseWriter, r *http.Request)
- func GetCompatibleLogo(w http.ResponseWriter, r *http.Request)
- func GetCustomEmojiImage(w http.ResponseWriter, r *http.Request)
- func GetCustomEmojiList(w http.ResponseWriter, r *http.Request)
- func GetFollowers(offset int, limit int, w http.ResponseWriter, r *http.Request)
- func GetLogo(w http.ResponseWriter, r *http.Request)
- func GetPreview(w http.ResponseWriter, r *http.Request)
- func GetRobotsDotTxt(w http.ResponseWriter, r *http.Request)
- func GetStatus(w http.ResponseWriter, r *http.Request)
- func GetThumbnail(w http.ResponseWriter, r *http.Request)
- func GetVideoStreamOutputVariants(w http.ResponseWriter, r *http.Request)
- func GetWebConfig(w http.ResponseWriter, r *http.Request)
- func HandleHLSRequest(w http.ResponseWriter, r *http.Request)
- func IndexHandler(w http.ResponseWriter, r *http.Request)
- func InternalErrorHandler(w http.ResponseWriter, err error)
- func Ping(w http.ResponseWriter, r *http.Request)
- func RegisterAnonymousChatUser(w http.ResponseWriter, r *http.Request)
- func RegisterForLiveNotifications(u user.User, w http.ResponseWriter, r *http.Request)
- func RemoteFollow(w http.ResponseWriter, r *http.Request)
- func ReportPlaybackMetrics(w http.ResponseWriter, r *http.Request)
- func ServeCustomJavascript(w http.ResponseWriter, r *http.Request)
- func WriteResponse(w http.ResponseWriter, response interface{})
- func WriteSimpleResponse(w http.ResponseWriter, success bool, message string)
- func WriteString(w http.ResponseWriter, text string, status int) error
- type MetadataPage
- type PaginatedResponse
Constants ¶
const GET = "GET"
GET is the HTTP GET method.
const POST = "POST"
POST is the HTTP POST method.
Variables ¶
This section is empty.
Functions ¶
func BadRequestHandler ¶ added in v0.0.6
func BadRequestHandler(w http.ResponseWriter, err error)
BadRequestHandler will return an HTTP 500 as an HTTP response.
func DisconnectInboundConnection ¶
func DisconnectInboundConnection(w http.ResponseWriter, r *http.Request)
DisconnectInboundConnection will force-disconnect an inbound stream.
func ExternalGetChatMessages ¶ added in v0.0.8
func ExternalGetChatMessages(integration user.ExternalAPIUser, w http.ResponseWriter, r *http.Request)
ExternalGetChatMessages gets all of the chat messages.
func GetAllSocialPlatforms ¶ added in v0.0.6
func GetAllSocialPlatforms(w http.ResponseWriter, r *http.Request)
GetAllSocialPlatforms will return a list of all social platform types.
func GetChatMessages ¶
GetChatMessages gets all of the chat messages.
func GetCompatibleLogo ¶ added in v0.0.9
func GetCompatibleLogo(w http.ResponseWriter, r *http.Request)
GetCompatibleLogo will return the logo unless it's a SVG and in that case will return a default placeholder. Used for sharing to external social networks that generally don't support SVG.
func GetCustomEmojiImage ¶ added in v0.1.0
func GetCustomEmojiImage(w http.ResponseWriter, r *http.Request)
GetCustomEmojiImage returns a single emoji image.
func GetCustomEmojiList ¶ added in v0.1.0
func GetCustomEmojiList(w http.ResponseWriter, r *http.Request)
GetCustomEmojiList returns a list of emoji via the API.
func GetFollowers ¶ added in v0.0.11
GetFollowers will handle an API request to fetch the list of followers (non-activitypub response).
func GetLogo ¶ added in v0.0.6
func GetLogo(w http.ResponseWriter, r *http.Request)
GetLogo will return the logo image as a response.
func GetPreview ¶ added in v0.1.0
func GetPreview(w http.ResponseWriter, r *http.Request)
GetPreview will return the preview gif as a response.
func GetRobotsDotTxt ¶ added in v0.1.1
func GetRobotsDotTxt(w http.ResponseWriter, r *http.Request)
GetRobotsDotTxt returns the contents of our robots.txt.
func GetStatus ¶
func GetStatus(w http.ResponseWriter, r *http.Request)
GetStatus gets the status of the server.
func GetThumbnail ¶ added in v0.1.0
func GetThumbnail(w http.ResponseWriter, r *http.Request)
GetThumbnail will return the thumbnail image as a response.
func GetVideoStreamOutputVariants ¶ added in v0.0.7
func GetVideoStreamOutputVariants(w http.ResponseWriter, r *http.Request)
GetVideoStreamOutputVariants will return the video variants available.
func GetWebConfig ¶
func GetWebConfig(w http.ResponseWriter, r *http.Request)
GetWebConfig gets the status of the server.
func HandleHLSRequest ¶ added in v0.0.9
func HandleHLSRequest(w http.ResponseWriter, r *http.Request)
HandleHLSRequest will manage all requests to HLS content.
func IndexHandler ¶
func IndexHandler(w http.ResponseWriter, r *http.Request)
IndexHandler handles the default index route.
func InternalErrorHandler ¶ added in v0.0.6
func InternalErrorHandler(w http.ResponseWriter, err error)
InternalErrorHandler will return an error message as an HTTP response.
func Ping ¶ added in v0.0.8
func Ping(w http.ResponseWriter, r *http.Request)
Ping is fired by a client to show they are still an active viewer.
func RegisterAnonymousChatUser ¶ added in v0.0.8
func RegisterAnonymousChatUser(w http.ResponseWriter, r *http.Request)
RegisterAnonymousChatUser will register a new user.
func RegisterForLiveNotifications ¶ added in v0.0.12
RegisterForLiveNotifications will register a channel + destination to be notified when a stream goes live.
func RemoteFollow ¶ added in v0.0.11
func RemoteFollow(w http.ResponseWriter, r *http.Request)
RemoteFollow handles a request to begin the remote follow redirect flow.
func ReportPlaybackMetrics ¶ added in v0.0.12
func ReportPlaybackMetrics(w http.ResponseWriter, r *http.Request)
ReportPlaybackMetrics will accept playback metrics from a client and save them for future video health reporting.
func ServeCustomJavascript ¶ added in v0.1.0
func ServeCustomJavascript(w http.ResponseWriter, r *http.Request)
ServeCustomJavascript will serve optional custom Javascript.
func WriteResponse ¶ added in v0.0.6
func WriteResponse(w http.ResponseWriter, response interface{})
WriteResponse will return an object as a JSON encoded uncacheable response.
func WriteSimpleResponse ¶
func WriteSimpleResponse(w http.ResponseWriter, success bool, message string)
WriteSimpleResponse will return a message as a response.
func WriteString ¶ added in v0.0.12
func WriteString(w http.ResponseWriter, text string, status int) error
WriteString will return a basic string and a status code to the client.
Types ¶
type MetadataPage ¶
type MetadataPage struct { RequestedURL string Image string Thumbnail string TagsString string Summary string Name string Tags []string SocialHandles []models.SocialHandle }
MetadataPage represents a server-rendered web page for bots and web scrapers.
type PaginatedResponse ¶ added in v0.0.12
type PaginatedResponse struct { Results interface{} `json:"results"` Total int `json:"total"` }
PaginatedResponse is a structure for returning a total count with results.