Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAPIHandler ¶
func NewAPIHandler(p charmstore.APIHandlerParams) (charmstore.HTTPCloseHandler, error)
Types ¶
type Handler ¶
func New ¶
func New(p charmstore.APIHandlerParams) (Handler, error)
func (*Handler) NewReqHandler ¶
func (h *Handler) NewReqHandler(req *http.Request) (ReqHandler, error)
NewReqHandler returns an instance of a *ReqHandler suitable for handling the given HTTP request. After use, the ReqHandler.Close method should be called to close it.
If no handlers are available, it returns an error with a charmstore.ErrTooManySessions cause.
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.