stremio_sidekick

package
v0.0.0-...-f1c669a Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const ADMIN_COOKIE_NAME = "stremio.auth.stremthru.admin"
View Source
const ADMIN_COOKIE_PATH = "/stremio/"
View Source
const COOKIE_NAME = "stremio.sidekick.auth"
View Source
const COOKIE_PATH = "/stremio/sidekick/"

Variables

View Source
var ExtractRequestBaseURL = shared.ExtractRequestBaseURL
View Source
var IsMethod = shared.IsMethod
View Source
var IsPublicInstance = config.IsPublicInstance
View Source
var SendError = shared.SendError

Functions

func AddStremioSidekickEndpoints

func AddStremioSidekickEndpoints(mux *http.ServeMux)

func GetManifest

func GetManifest(r *http.Request) *stremio.Manifest

func LogError

func LogError(r *http.Request, msg string, err error)

func SendHTML

func SendHTML(w http.ResponseWriter, statusCode int, data bytes.Buffer)

func SendResponse

func SendResponse(w http.ResponseWriter, r *http.Request, statusCode int, data any)

Types

type AdminCookieValue

type AdminCookieValue struct {
	url.Values
	IsExpired bool
}

func (*AdminCookieValue) Pass

func (cv *AdminCookieValue) Pass() string

func (*AdminCookieValue) User

func (cv *AdminCookieValue) User() string

type Base

type CookieValue

type CookieValue struct {
	url.Values
	IsExpired bool
}

func (*CookieValue) AuthKey

func (cv *CookieValue) AuthKey() string

func (*CookieValue) Email

func (cv *CookieValue) Email() string

type TemplateData

type TemplateData struct {
	Base
	IsAuthed       bool
	Email          string
	Addons         []stremio.Addon
	AddonOperation string
	AddonError     string
	LastAddonIndex int
	LoginMethod    string
	Login          struct {
		Email    string
		Password string
		Token    string
		Error    struct {
			Email    string
			Password string
			Token    string
		}
	}
	BackupRestore struct {
		AddonsRestoreBlob  string
		LibraryRestoreBlob string
		HasError           struct {
			LibraryRestoreBlob bool
			AddonsReset        bool
		}
		Message struct {
			LibraryRestoreBlob string
			AddonsReset        string
		}
		Error struct {
			AddonsRestoreBlob string
		}
	}

	CanAuthAdmin   bool
	HasAuthAdmin   bool
	AuthAdminError string
}

Jump to

Keyboard shortcuts

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