v4

package
v0.0.0-...-5b1da04 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2015 License: AGPL-3.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAPIHandler

func NewAPIHandler(store *charmstore.Store, config charmstore.ServerParams) http.Handler

NewAPIHandler returns a new Handler as an http Handler. It is defined for the convenience of callers that require a charmstore.NewAPIHandlerFunc.

func ResolveURL

func ResolveURL(store *charmstore.Store, url *charm.Reference) (*router.ResolvedURL, error)

ResolveURL resolves the series and revision of the given URL if either is unspecified by filling them out with information retrieved from the store.

func StatsEnabled

func StatsEnabled(req *http.Request) bool

StatsEnabled reports whether statistics should be gathered for the given HTTP request.

Types

type Handler

type Handler struct {
	*router.Router
	// contains filtered or unexported fields
}

func New

func New(store *charmstore.Store, config charmstore.ServerParams) *Handler

New returns a new instance of the v4 API handler.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, req *http.Request)

type PublishedResponse

type PublishedResponse struct {
	Id        *charm.Reference
	Published time.Time
}

Jump to

Keyboard shortcuts

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