apikey

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

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.

func (*Handlers) Update

func (h *Handlers) Update(w http.ResponseWriter, r *http.Request)

Update is an http handler that updates the provided api key in the database.

Jump to

Keyboard shortcuts

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