handler

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

A Handler accepts http requests.

func New

func New(db *gorm.DB) *Handler

New creates a new Handler to be used in processing http requests.

func (*Handler) Authenticate

func (h *Handler) Authenticate(w http.ResponseWriter, r *http.Request)

Authenticate will validate a user's password and, if correct, return a JWT

func (*Handler) GetReads

func (h *Handler) GetReads(w http.ResponseWriter, r *http.Request)

GetReads returns a list of books a user has read

func (*Handler) HandleChallenge

func (h *Handler) HandleChallenge(w http.ResponseWriter, r *http.Request)

HandleChallenge will return the value in the environ variable ACME_CHALLENGE for let's encrypt

func (*Handler) HandleInbox

func (h *Handler) HandleInbox(w http.ResponseWriter, r *http.Request)

HandleInbox is the http handler for an ActivityPub user's inbox.

func (*Handler) HandleOutbox

func (h *Handler) HandleOutbox(w http.ResponseWriter, r *http.Request)

func (*Handler) Read

func (h *Handler) Read(w http.ResponseWriter, r *http.Request)

func (*Handler) Register

func (h *Handler) Register(w http.ResponseWriter, r *http.Request)

Register will create a user on the server

func (*Handler) SearchBooks

func (h *Handler) SearchBooks(w http.ResponseWriter, r *http.Request)

SearchBooks will search the Library of Congress api for books. Currently only supports title search.

Jump to

Keyboard shortcuts

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