userinput

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const FormFileKey = "form-file"

FormFileKey is the id of the file userinput in the HTML form.

Variables

View Source
var (
	// WAV provides structures required to handle wav files.
	WAV = wavSink{
		BitDepths: map[signal.BitDepth]struct{}{
			signal.BitDepth8:  {},
			signal.BitDepth16: {},
			signal.BitDepth24: {},
			signal.BitDepth32: {},
		},
	}

	// MP3 provides structures required to handle mp3 files.
	MP3 = mp3Sink{
		ChannelModes: map[mp3.ChannelMode]struct{}{
			mp3.JointStereo: {},
			mp3.Stereo:      {},
			mp3.Mono:        {},
		},
		VBR:        "VBR",
		ABR:        "ABR",
		CBR:        "CBR",
		MinBitRate: 8,
		MaxBitRate: 320,
		MinQuality: 0,
		MaxQuality: 9,
		MinVBR:     0,
		MaxVBR:     9,
	}
)

Functions

This section is empty.

Types

type EncodeForm

type EncodeForm struct {
	// contains filtered or unexported fields
}

EncodeForm provides user interaction via http form.

func NewEncodeForm

func NewEncodeForm(limits Limits) EncodeForm

NewEncodeForm creates new form with provided limits.

func (EncodeForm) Bytes

func (f EncodeForm) Bytes() []byte

Bytes returns serialized form, ready to be served.

func (EncodeForm) Parse

func (f EncodeForm) Parse(r *http.Request) (encode.FormData, error)

Parse returns the data provided by the user via submitted form.

type Limits

type Limits map[*fileformat.Format]int64

Limits for user-provided input files.

type Sink

Sink is used to inject WriteSeeker into Sink.

Source Files

  • encode_form.go
  • input.go

Jump to

Keyboard shortcuts

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