Documentation ¶
Index ¶
Constants ¶
View Source
const ( PromulgatorsGroup = v5.PromulgatorsGroup UsernameAttr = v5.UsernameAttr DelegatableMacaroonExpiry = v5.DelegatableMacaroonExpiry DefaultIcon = v5.DefaultIcon ArchiveCachePublicMaxAge = v5.ArchiveCachePublicMaxAge )
Variables ¶
This section is empty.
Functions ¶
func NewAPIHandler ¶
func NewAPIHandler(pool *charmstore.Pool, config charmstore.ServerParams, rootPath string) charmstore.HTTPCloseHandler
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, rootPath string) Handler
func (*Handler) NewReqHandler ¶
func (h *Handler) NewReqHandler() (ReqHandler, error)
NewReqHandler fetchs a new instance of ReqHandler from h.Pool and returns it. The ReqHandler must be closed when finished with.
type ReqHandler ¶
type ReqHandler struct {
*v5.ReqHandler
}
func (ReqHandler) Close ¶
func (h ReqHandler) Close()
Close closes the ReqHandler. This should always be called when the ReqHandler is done with.
func (ReqHandler) ResolveURL ¶
func (h ReqHandler) ResolveURL(url *charm.URL) (*router.ResolvedURL, error)
ResolveURL implements router.Context.ResolveURL, ensuring that any resulting ResolvedURL always has a non-empty PreferredSeries field.
func (ReqHandler) ResolveURLs ¶
func (h ReqHandler) ResolveURLs(urls []*charm.URL) ([]*router.ResolvedURL, error)
Click to show internal directories.
Click to hide internal directories.