hulu

package
v0.0.0-...-0c84e95 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2015 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ADSTATE_FAKE = "" /* 512-byte string literal not displayed */
View Source
var ContentTypeJSON = "application/json; charset=utf-8"
View Source
var FAKERESPONSE = LoadFakeResponse()
View Source
var FILTER = true
View Source
var FILTER_STRINGS = LoadFilterList()
View Source
var FILTER_STRINGS_XFINITY = [...]string{"adserver"}

Functions

func CreateResponse

func CreateResponse(req *http.Request) http.Response

func LoadCommericalFreeResponse

func LoadCommericalFreeResponse() string

func LoadFakeResponse

func LoadFakeResponse() string

func LoadFilterList

func LoadFilterList() []string

func LoadResponseFromFile

func LoadResponseFromFile(filename string) string

func LogToFile

func LogToFile(filename string, b []byte) error

func PrintResponse

func PrintResponse(r http.Response)

Types

type ClosingBuffer

type ClosingBuffer struct {
	io.Reader
}

struct to implement io.ReadCloser

func (ClosingBuffer) Close

func (cb ClosingBuffer) Close() (err error)

type Hulu

type Hulu struct {
	Metadata modules.MetaStruct
	Quiet    bool
}

func NewHulu

func NewHulu(quiet bool) *Hulu

func (Hulu) FilterRequest

func (h Hulu) FilterRequest(req *http.Request, ctx *goproxy.ProxyCtx) (*http.Request, *http.Response)

func (Hulu) FilterResponse

func (h Hulu) FilterResponse(resp *http.Response, ctx *goproxy.ProxyCtx) *http.Response

Block filterStrings from sending a response

func (Hulu) Init

func (h Hulu) Init()

Jump to

Keyboard shortcuts

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