web

package module
v0.0.0-...-a2e4baf Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2015 License: MIT Imports: 9 Imported by: 0

README

web

web stuff for GOMedia

Documentation

Overview

GoMedia's web package contains all of the logic and HTTPHandlers need to serve the music from your iTunes library or any other place on your computer's HD

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileHandler

func FileHandler(w http.ResponseWriter, r *http.Request) *types.AppError

FileHandler is the HTTPHandler that determines if you have selected a directory or a music file, that reacts accordingly. If you have selected a directory then FileHandler calls the serveDirectory function to reveal it's contents. If you have selected a music file, FileHandler will copy it's contents into the http.ResponseWriter's buffer (i.e. writer)

func Setup

func Setup(port string, fullPath string, user string)

Setup should be the first function executed after calling flag.parse() in the main function of the gomedia program. It receives the parsed command line flags, for use inside the handlers

func StaticHandler

func StaticHandler(w http.ResponseWriter, r *http.Request)

StaticHandler is just what it says it is. It serves the static (public) files that are used to display GoMedia's UI/Logic

Types

This section is empty.

Jump to

Keyboard shortcuts

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