controllers

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 29 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 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

func GetChatMessages(u user.User, 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 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

func GetFollowers(offset int, limit int, w http.ResponseWriter, r *http.Request)

GetFollowers will handle an API request to fetch the list of followers (non-activitypub response).

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

func RegisterForLiveNotifications(u user.User, w http.ResponseWriter, r *http.Request)

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.

Directories

Path Synopsis
auth

Jump to

Keyboard shortcuts

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