controllers

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const GET = "GET"

GET is the HTTP GET method.

View Source
const POST = "POST"

POST is the HTTP POST method.

Variables

This section is empty.

Functions

func BadRequestHandler

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

func ExternalGetChatMessages(integration user.ExternalAPIUser, w http.ResponseWriter, r *http.Request)

ExternalGetChatMessages gets all of the chat messages.

func GetAllSocialPlatforms

func GetAllSocialPlatforms(w http.ResponseWriter, r *http.Request)

GetAllSocialPlatforms will return a list of all social platform types.

func GetChatEmbedreadonly

func GetChatEmbedreadonly(w http.ResponseWriter, r *http.Request)

GetChatEmbedreadonly gets the embed for readonly chat.

func GetChatEmbedreadwrite

func GetChatEmbedreadwrite(w http.ResponseWriter, r *http.Request)

GetChatEmbedreadwrite gets the embed for readwrite chat.

func GetChatMessages

func GetChatMessages(w http.ResponseWriter, r *http.Request)

GetChatMessages gets all of the chat messages.

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 GetCustomEmoji

func GetCustomEmoji(w http.ResponseWriter, r *http.Request)

GetCustomEmoji returns a list of custom emoji via the API.

func GetLogo(w http.ResponseWriter, r *http.Request)

GetLogo will return the logo image as a response.

func GetStatus

func GetStatus(w http.ResponseWriter, r *http.Request)

GetStatus gets the status of the server.

func GetVideoEmbed

func GetVideoEmbed(w http.ResponseWriter, r *http.Request)

GetVideoEmbed gets the embed for video.

func GetVideoStreamOutputVariants

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

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

func InternalErrorHandler(w http.ResponseWriter, err error)

InternalErrorHandler will return an error message as an HTTP response.

func Ping

func Ping(w http.ResponseWriter, r *http.Request)

Ping is fired by a client to show they are still an active viewer.

func RegisterAnonymousChatUser

func RegisterAnonymousChatUser(w http.ResponseWriter, r *http.Request)

RegisterAnonymousChatUser will register a new user.

func WriteResponse

func WriteResponse(w http.ResponseWriter, response interface{})

WriteResponse will return an object as a JSON encoded response.

func WriteSimpleResponse

func WriteSimpleResponse(w http.ResponseWriter, success bool, message string)

WriteSimpleResponse will return a message as a response.

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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