handler

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ImageDir image dir path
	ImageDir = "/img"
)
View Source
const LogLimitMax = 100

Variables

This section is empty.

Functions

func CORS

func CORS() gin.HandlerFunc

CORS supports cross origin resource sharing.

Types

type Handler

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

Handler is object for handler function

func NewHandler

func NewHandler(db *db.DB, conf HandlerConf) *Handler

NewHandler generates new Handler instance

func (*Handler) AuthHandler

func (h *Handler) AuthHandler(r *gin.RouterGroup)

AuthHandler is handlers of auth

func (*Handler) CheckAuthMiddleware

func (h *Handler) CheckAuthMiddleware() gin.HandlerFunc

CheckAuthMiddleware generates middleware to check JWT and set UUID

func (*Handler) DocumentHandler

func (h *Handler) DocumentHandler(r *gin.RouterGroup)

DocumentHandler is handlers of documents

func (*Handler) FolderHandler

func (h *Handler) FolderHandler(r *gin.RouterGroup)

FolderHandler is handlers of folders

func (*Handler) ImageHandler

func (h *Handler) ImageHandler(r *gin.RouterGroup)

ImageHandler is handlers of profile

func (*Handler) ProfileHandler

func (h *Handler) ProfileHandler(r *gin.RouterGroup)

ProfileHandler is handlers of profile

func (*Handler) SearchHandler

func (h *Handler) SearchHandler(r *gin.RouterGroup)

SearchHandler is handlers for search

func (*Handler) StopOTManager

func (h *Handler) StopOTManager()

StopOTManager send stop request to OT manager

func (*Handler) TeamHandler

func (h *Handler) TeamHandler(r *gin.RouterGroup)

TeamHandler is handlers of team

type HandlerConf added in v0.10.0

type HandlerConf struct {
	DataDir                string
	MailTemplateResetPW    string
	MailTemplateRegist     string
	CORSHost               string
	PermitUserToCreateTeam bool
}

Jump to

Keyboard shortcuts

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