handler

package
v0.0.0-...-08e0fe9 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Localizer

func Localizer(input []string, lang string, bundle *i18n.Bundle) map[string]string

func MdToHTML

func MdToHTML(md []byte) []byte

Types

type Handler

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

func NewHandler

func NewHandler(services *service.Service, bundle *i18n.Bundle) *Handler

func (*Handler) ChangeTheme

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

func (*Handler) DeleteArticle

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

DeleteArticle

func (*Handler) DownloadArticle

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

DownloadArticle

func (*Handler) Editor

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

func (*Handler) GetArticlesList

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

Home page (Articles list)

func (*Handler) GetCurrentUser

func (h *Handler) GetCurrentUser(userID string) *models.User

func (*Handler) Logout

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

func (*Handler) MDConvert

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

func (*Handler) PageNotFound

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

func (*Handler) Run

func (h *Handler) Run(port string) error

func (*Handler) SaveFile

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

SaveFile

func (*Handler) SendCode

func (h *Handler) SendCode(w http.ResponseWriter, r *http.Request, status StatusCode)

func (*Handler) ShowArticle

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

Show article

func (*Handler) SignIn

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

SingIn

func (*Handler) SignInPost

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

func (*Handler) SignUp

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

SingUp

func (*Handler) SignUpPost

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

func (*Handler) Upload

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

Upload

func (*Handler) UploadArticle

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

UploadArticle

type StatusCode

type StatusCode struct {
	Code        string
	Title       string
	Description string
}

Jump to

Keyboard shortcuts

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