controllers

package
v0.0.0-...-9129d66 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Text

type Text struct {
	Line  string `xml:",chardata"`
	Start Time   `xml:"start,attr"`
	Dur   Time   `xml:"dur,attr"`
	End   Time   `-`
}

type Time

type Time string

func (Time) String

func (t Time) String() string

type Transcript

type Transcript struct {
	Text []Text `xml:"text"`
}

func (*Transcript) String

func (t *Transcript) String() string

type Video

type Video struct {
	Transcript Transcript
	NewView    *views.View
	ShowView   *views.View
}

func NewVideo

func NewVideo() *Video

func (*Video) New

func (v *Video) New(w http.ResponseWriter, r *http.Request)

New is used to render the form where the end user can enter a link to get the subtitles for that video.

GET /new

func (*Video) Show

func (v *Video) Show(w http.ResponseWriter, r *http.Request)

Show is used to show the end user the appropriate information after they enter the form with an appropriate link.

POST /new

type VideoForm

type VideoForm struct {
	Link string `schema:"link"`
}

Jump to

Keyboard shortcuts

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