web

package
v0.0.0-...-9ff5dc0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrXSRFInvalid = errors.New("xsrf token invalid")

Functions

func NewReadOnlyAPI

func NewReadOnlyAPI(PublicURL tmpl.PublicURLGenerator, FS files.FileSystem, Repo videostore.VideoRepo) http.Handler

func NewReadOnlyCUI2

func NewReadOnlyCUI2(
	publicRootURL tmpl.PublicURLGenerator,
	publicAssetURL tmpl.PublicURLGenerator,
	repo videostore.VideoRepo,
) http.Handler

func NewWriteableAPI

func NewWriteableAPI(PublicURL tmpl.PublicURLGenerator, FS files.FileSystem, Repo videostore.VideoRepo) http.Handler

func NewWriteableCUI2

func NewWriteableCUI2(
	publicRootURL tmpl.PublicURLGenerator,
	publicAssetURL tmpl.PublicURLGenerator,
	fs files.FileSystem,
	repo videostore.VideoRepo,
	xsrfKey []byte,
) http.Handler

Types

type CreamyVideosAPI

type CreamyVideosAPI interface {
	ListVideos(w http.ResponseWriter, r *http.Request)

	UploadVideo(w http.ResponseWriter, r *http.Request)

	ShowVideo(w http.ResponseWriter, r *http.Request)
	EditVideo(w http.ResponseWriter, r *http.Request)
	DeleteVideo(w http.ResponseWriter, r *http.Request)
}

type CreamyVideosUI2

type CreamyVideosUI2 interface {
	Home(w http.ResponseWriter, r *http.Request)
	Search(w http.ResponseWriter, r *http.Request)
	Watch(w http.ResponseWriter, r *http.Request)

	UploadForm(w http.ResponseWriter, r *http.Request)
	Upload(w http.ResponseWriter, r *http.Request)

	EditForm(w http.ResponseWriter, r *http.Request)
	Edit(w http.ResponseWriter, r *http.Request)

	DeleteForm(w http.ResponseWriter, r *http.Request) // skipped for JS clients
	Delete(w http.ResponseWriter, r *http.Request)
}

Jump to

Keyboard shortcuts

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