handler

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: Apache-2.0 Imports: 47 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExampleIndex_indexing

func ExampleIndex_indexing()

func ExampleNew

func ExampleNew()

Types

type Handler

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

func New

func New(log loggers.Logger, db *database.Database,
	contentApp *contentEntity.Content, adminApp *adminEntity.Admin) *Handler

func (*Handler) AdminHandler

func (s *Handler) AdminHandler(res http.ResponseWriter, req *http.Request)

func (*Handler) ApiContentsHandler

func (s *Handler) ApiContentsHandler(res http.ResponseWriter, req *http.Request)

func (*Handler) ApproveContentHandler

func (s *Handler) ApproveContentHandler(res http.ResponseWriter, req *http.Request)

func (*Handler) BuildContentHandler

func (s *Handler) BuildContentHandler(res http.ResponseWriter, req *http.Request)

func (*Handler) ConfigHandler

func (s *Handler) ConfigHandler(res http.ResponseWriter, req *http.Request)

func (*Handler) ContentHandler

func (s *Handler) ContentHandler(res http.ResponseWriter, req *http.Request)

func (*Handler) ContentsHandler

func (s *Handler) ContentsHandler(res http.ResponseWriter, req *http.Request)

func (*Handler) DeleteContentHandler

func (s *Handler) DeleteContentHandler(res http.ResponseWriter, req *http.Request)

func (*Handler) DeleteHandler

func (s *Handler) DeleteHandler(res http.ResponseWriter, req *http.Request)

func (*Handler) DeleteUploadHandler

func (s *Handler) DeleteUploadHandler(res http.ResponseWriter, req *http.Request)

func (*Handler) DeployContentHandler

func (s *Handler) DeployContentHandler(res http.ResponseWriter, req *http.Request)

func (*Handler) EditHandler

func (s *Handler) EditHandler(res http.ResponseWriter, req *http.Request)

func (*Handler) EditUploadHandler

func (s *Handler) EditUploadHandler(res http.ResponseWriter, req *http.Request)

func (*Handler) HashHandler

func (s *Handler) HashHandler(res http.ResponseWriter, req *http.Request)

func (*Handler) InitHandler

func (s *Handler) InitHandler(res http.ResponseWriter, req *http.Request)

func (*Handler) LoginHandler

func (s *Handler) LoginHandler(res http.ResponseWriter, req *http.Request)

func (*Handler) LogoutHandler

func (s *Handler) LogoutHandler(res http.ResponseWriter, req *http.Request)

func (*Handler) PreviewContentHandler

func (s *Handler) PreviewContentHandler(res http.ResponseWriter, req *http.Request)

func (*Handler) PreviewContentHandlerLocal

func (s *Handler) PreviewContentHandlerLocal(res http.ResponseWriter, req *http.Request)

func (*Handler) SearchContentHandler

func (s *Handler) SearchContentHandler(res http.ResponseWriter, req *http.Request)

func (*Handler) SearchContentHandler2

func (s *Handler) SearchContentHandler2(res http.ResponseWriter, req *http.Request)

func (*Handler) SearchHandler

func (s *Handler) SearchHandler(res http.ResponseWriter, req *http.Request)

func (*Handler) StoreFiles

func (s *Handler) StoreFiles(req *http.Request) (map[string]string, error)

StoreFiles stores file uploads at paths like /YYYY/MM/filename.ext

func (*Handler) UploadContentsHandler

func (s *Handler) UploadContentsHandler(res http.ResponseWriter, req *http.Request)

func (*Handler) UploadSearchHandler

func (s *Handler) UploadSearchHandler(res http.ResponseWriter, req *http.Request)

func (*Handler) UserConfigHandler

func (s *Handler) UserConfigHandler(res http.ResponseWriter, req *http.Request)

func (*Handler) UserLoginHandler

func (s *Handler) UserLoginHandler(res http.ResponseWriter, req *http.Request)

func (*Handler) UserRegisterHandler

func (s *Handler) UserRegisterHandler(res http.ResponseWriter, req *http.Request)

type Response

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

func NewResponse

func NewResponse(errView ResponseErrView) *Response

func (*Response) FmtJSON

func (s *Response) FmtJSON(data ...json.RawMessage) ([]byte, error)

func (*Response) Json

func (s *Response) Json(res http.ResponseWriter, data []byte)

Json should be used any time you want to communicate data back to a foreign client

type ResponseErrView

type ResponseErrView interface {
	Error400() ([]byte, error)
	Error500() ([]byte, error)
}

Jump to

Keyboard shortcuts

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