Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAPIHandler ¶
func NewAPIHandler(pool *charmstore.Pool, 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 ¶
StatsEnabled reports whether statistics should be gathered for the given HTTP request.
Types ¶
type Handler ¶
func New ¶
func New(pool *charmstore.Pool, config charmstore.ServerParams) *Handler
New returns a new instance of the v4 API handler.
func (*Handler) AuthorizeEntity ¶
AuthorizeEntity checks that the given HTTP request can access the entity with the given id.
type PublishedResponse ¶
Click to show internal directories.
Click to hide internal directories.