Documentation ¶
Index ¶
- type Handlers
- func (h *Handlers) Add(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) Delete(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) Get(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetOwnedByUser(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) Update(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handlers ¶
type Handlers struct {
// contains filtered or unexported fields
}
Handlers represents a group of http handlers in charge of handling api keys operations.
func NewHandlers ¶
func NewHandlers(apiKeyManager hub.APIKeyManager) *Handlers
NewHandlers creates a new Handlers instance.
func (*Handlers) Add ¶
func (h *Handlers) Add(w http.ResponseWriter, r *http.Request)
Add is an http handler that adds the provided api key to the database.
func (*Handlers) Delete ¶
func (h *Handlers) Delete(w http.ResponseWriter, r *http.Request)
Delete is an http handler that deletes the provided api key from the database.
func (*Handlers) Get ¶
func (h *Handlers) Get(w http.ResponseWriter, r *http.Request)
Get is an http handler that returns the requested api key.
func (*Handlers) GetOwnedByUser ¶
func (h *Handlers) GetOwnedByUser(w http.ResponseWriter, r *http.Request)
GetOwnedByUser is an http handler that returns the api keys owned by the user doing the request.
Click to show internal directories.
Click to hide internal directories.