goproxy

package
v0.0.0-...-3ee71c1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2014 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultCacheDir = os.Getenv("HOME") + "/.goproxy/cache"

Functions

This section is empty.

Types

type Handler

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

func (*Handler) DoStore

func (handler *Handler) DoStore(r *Resource) bool

func (*Handler) Ignore

func (handler *Handler) Ignore(name string)

func (*Handler) Ignored

func (handler *Handler) Ignored(p string) bool

func (*Handler) ServeHTTP

func (handler *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Message

type Message struct {
	Type   string
	Status string

	Duration time.Duration
	Resource *Resource
	Error    error
	// contains filtered or unexported fields
}

func NewMessage

func NewMessage(t string, r *Resource) *Message

type Resource

type Resource struct {
	Method string
	Url    *url.URL
	Header http.Header

	Response *Response

	CacheDir string
}

func (*Resource) Load

func (r *Resource) Load() (fetched bool, e error)

type Response

type Response struct {
	Header    http.Header
	Body      []byte
	StatuCode int
	FetchedAt time.Time
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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