web

package
v0.0.0-...-8a4eff6 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapRequest

func WrapRequest(next func(*Request) (interface{}, error)) papernet.HandlerFunc

Types

type ArxivHandler

type ArxivHandler struct {
	Store papernet.PaperStore
	Index papernet.PaperIndex
}

func (*ArxivHandler) Routes

func (h *ArxivHandler) Routes() []papernet.EndPoint

func (*ArxivHandler) Search

func (h *ArxivHandler) Search(req *Request) (interface{}, error)

type ImportHandler

type ImportHandler struct {
	Importer papernet.Importer
}

func (*ImportHandler) Import

func (h *ImportHandler) Import(req *Request) (interface{}, error)

func (*ImportHandler) ImportChromeBookmarks

func (h *ImportHandler) ImportChromeBookmarks(req *Request) (interface{}, error)

func (*ImportHandler) Routes

func (h *ImportHandler) Routes() []papernet.EndPoint

type PaperHandler

type PaperHandler struct {
	Store papernet.PaperStore
	Index papernet.PaperIndex

	TagIndex papernet.TagIndex

	PaperOwnershipRegistry PaperOwnershipRegistry
}

func (*PaperHandler) Delete

func (h *PaperHandler) Delete(req *Request) (interface{}, error)

func (*PaperHandler) Get

func (h *PaperHandler) Get(req *Request) (interface{}, error)

func (*PaperHandler) Insert

func (h *PaperHandler) Insert(req *Request) (interface{}, error)

func (*PaperHandler) List

func (h *PaperHandler) List(req *Request) (interface{}, error)

func (*PaperHandler) Routes

func (h *PaperHandler) Routes() []papernet.EndPoint

func (*PaperHandler) Update

func (h *PaperHandler) Update(req *Request) (interface{}, error)

type PaperOwnershipRegistry

type PaperOwnershipRegistry interface {
	CreatePaper(userID, paperID int) (auth.User, error)
}

type Request

type Request struct {
	*papernet.Request
}

func (*Request) Query

func (r *Request) Query(key string, v interface{}) error

type TagHandler

type TagHandler struct {
	Searcher papernet.TagIndex
}

func (*TagHandler) List

func (h *TagHandler) List(req *Request) (interface{}, error)

func (*TagHandler) Routes

func (h *TagHandler) Routes() []papernet.EndPoint

Jump to

Keyboard shortcuts

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