endpoint

package
v0.0.0-...-d5ce8da Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExecuteTemplate = func() func(data *RootTemplateData) (bytes.Buffer, error) {
	tmpl := template.Must(template.New("root.html").Parse(templateBlob))
	return func(data *RootTemplateData) (bytes.Buffer, error) {
		var buf bytes.Buffer
		err := tmpl.Execute(&buf, data)
		return buf, err
	}
}()
View Source
var GetQueryInt = shared.GetQueryInt
View Source
var SendError = shared.SendError
View Source
var SendHTML = shared.SendHTML
View Source
var SendResponse = shared.SendResponse

Functions

func AddHealthEndpoints

func AddHealthEndpoints(mux *http.ServeMux)

func AddProxyEndpoints

func AddProxyEndpoints(mux *http.ServeMux)

func AddRootEndpoint

func AddRootEndpoint(mux *http.ServeMux)

func AddStoreEndpoints

func AddStoreEndpoints(mux *http.ServeMux)

func AddStremioEndpoints

func AddStremioEndpoints(mux *http.ServeMux)

func ProxyAuthContext

func ProxyAuthContext(next http.HandlerFunc) http.HandlerFunc

func ProxyAuthRequired

func ProxyAuthRequired(next http.HandlerFunc) http.HandlerFunc

func StoreContext

func StoreContext(next http.HandlerFunc) http.HandlerFunc

func StoreRequired

func StoreRequired(next http.HandlerFunc) http.HandlerFunc

Types

type AddMagnetPayload

type AddMagnetPayload struct {
	Magnet string `json:"magnet"`
}

type GenerateLinkPayload

type GenerateLinkPayload struct {
	Link string `json:"link"`
}

type HealthData

type HealthData struct {
	Status string `json:"status"`
}

type HealthDebugData

type HealthDebugData struct {
	Time    string               `json:"time"`
	Version string               `json:"version"`
	User    *HealthDebugDataUser `json:"user,omitempty"`
	IP      *HealthDebugDataIP   `json:"ip,omitempty"`
}

type HealthDebugDataIP

type HealthDebugDataIP struct {
	Exposed string `json:"exposed"`
	Machine string `json:"machine"`
}

type HealthDebugDataStore

type HealthDebugDataStore struct {
	Default string   `json:"default"`
	Names   []string `json:"names"`
}

type HealthDebugDataUser

type HealthDebugDataUser struct {
	Name  string               `json:"name"`
	Store HealthDebugDataStore `json:"store"`
}

type MiddlewareFunc

type MiddlewareFunc func(http.HandlerFunc) http.HandlerFunc

func Middleware

func Middleware(middlewares ...MiddlewareFunc) MiddlewareFunc

type RootTemplateData

type RootTemplateData struct {
	Title       string                    `json:"-"`
	Description template.HTML             `json:"description"`
	Version     string                    `json:"-"`
	Addons      []rootTemplateDataAddon   `json:"-"`
	Sections    []rootTemplateDataSection `json:"sections"`
}

type TrackMagnetData

type TrackMagnetData struct {
}

type TrackMagnetPayload

type TrackMagnetPayload struct {
	Hash   string             `json:"hash"`
	Files  []store.MagnetFile `json:"files"`
	IsMiss bool               `json:"is_miss"`
	SId    string             `json:"sid"`
}

Jump to

Keyboard shortcuts

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